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) :

    # Uncomment the following two lines for normal desktop:
    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. 
You can even run extra VNC session with desktop by executing
"vncserver:{session numbers that have not been taken yet}".


      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

      How to recalibrate your Samsung Note 4 battery

      A Better SKMEI 1418 / 1427 Instructions Manual

      How to import Tasker projects, profiles, tasks and scenes