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

      Post a Comment

      Popular posts from this blog

      City Code Table for Casio SGW300HD-1AV Watch

      How to force only 4G or LTE network connection for Samsung Galaxy Note 4

      Mounting NFS share directory from D-link DNS 320L on Ubuntu 12.04 LTS