I recently setup a VNC connection to my Linux server over an SSH connection, which is pretty cool if you ask me. Here is how I did it:
- On the Linux system I installed the VNCServer (yum install vncserver)
- I then started the server "vncserver" so the default files are created.
- I then stopped the server "vncserver -kill :1" so I can edit the default files
- I edited the /home/~/.vnc/xstartup file (nano ~/.vnc/xstartup)
- Comment out the line "twm &"
- Insert the line "gnome-session &"
- Save and exit the file
- Set a VNC password "vncpasswd"
- Start the VNCserver "vncserver -geometry 800x600 -depth 24 :99" (will produce a GUI that is 800x600 pixels with a 24-bit colour depth using port 5999"
- Now on my Mac in terminal I run "ssh -L 5999:x.x.x.x:5999 me@x.x.x.x" (assumes the user is "me", replace x.x.x.x with your Linux system IP address)
- Open VNCView, point to "localhost:99" and click connect, enter your vncpasswd created earlier.
No comments:
Post a Comment