Google Ads

How To Start VNC Session With Gnome Desktop


Ever wonder how to start an individual desktop session with VNC? Below are the steps on how to modify the VNC startup script to start the GNOME desktop prior to the login user who started the VCN server command.
  1. Make sure VNC is installed in the system.
  2. Edit $HOME/.vnc/xstartup.
  3. Uncomment : unset SESSION_MANAGER
  4. Uncomment : exec /etc/X11/xinit/xinitrc
  5. Comment : xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  6. Comment : twm &
  7. Add "gnome-session &" under the "exec /etc/X11/xinit/xinitrc" line.
  8. The Xstartup file should look like this (Red: added line, Blue: modified line) :
    ----------
    #!/bin/sh

    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc
    gnome-session &

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    #twm &

    ----------

  9. Run "vncserver :1" to start the vnc session with the GNOME desktop loaded in.
  10. Connect to the machine and the VNC session will present the GNOME desktop. 
Notes:
You can even run extra VNC session with desktop by executing
"vncserver:{session numbers that have not been taken yet}".

      Comments

      1. not working for me , when i connect with vnc it shows blank screen

        ReplyDelete
      2. worked for me. thanks for this post!!!
        i had to do this first:
        > yum group install gnome
        > vncserver -kill :1
        then i modified ~/.vnc/xstartup as per above post
        > vncserver
        opened my vnc client and finally the black screen went away!

        ReplyDelete
      3. it does not workerd for me , its still login in a xfce desktop

        ReplyDelete
      4. not worked for me
        only blank screen

        ReplyDelete
      5. Does this method work for tigervnc?

        ReplyDelete

      Post a Comment

      Thank you for visiting Almost a Technocrat. Due to many spam comments, your comment will be moderated.

      Popular posts from this blog

      A Better SKMEI 1358 Instructions Manual

      A Better SKMEI 1418 / 1427 Instructions Manual

      How to force stop or cancel Android download manager downloading process

      SKMEI 1358 Review