HOWTO install Gnome and VNC on your Linux VPS Print

  • 3

  1. Install Gnome Desktop, VNC Server and Xterm:
    1. yum groupinstall gnome-desktop
    2. yum install vnc-server xterm
  2. Create a normal user:
    1. useradd vncuser
    2. passwd vncuser
  3. Login as vncuser and create VNC password:
    1. vncpasswd
    2. exit
  4. Login as root again
  5. Create xstartup script and edit run Gnome desktop:
    1. vi /home/vncuser/.vnc/xstartup
    2. Edit the contents of the file to look like this:
      #!/bin/sh

      ( while true; do xterm; done ) &

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

      [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
      [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
      xsetroot -solid grey
      vncconfig -iconic &
      xterm -geometry 1024x768 -ls -name "$VNCDESKTOP Desktop" &
      gnome-session &
  6. Edit the file "/etc/sysconfig/vncservers" and add this to the last two lines (change te resolution to what you want):
    VNCSERVERS="1:vncuser"
    VNCSERVERARGS[1]="-geometry 640×480"
  7. Start VNC server: service vncserver start
  8. Connect with a VNC client, using an address like: 1.2.3.4:1 or myvps.mydomain.com:1

Was this answer helpful?

« Back

Powered by WHMCompleteSolution