Pages

May 13, 2011

VNC Session







Switching from Windows to Linux environment is pretty easier with VNC .So here is a gist of how to handle VNC

Tool Required :
UltraVNC Viewer



Steps:
  1. Install UltraVnc in windows
  2. Telnet to Linux IP Address
  3. On your linux machine, enable VNC .On bash type "vnc"
  4. Linux will create a folder called vnc under root . cd ~/.vnc
  5. Start the server "vncserver :1 -geometry 1920x1000" depending on your Monitor size choose the geometry size .[To check the Monitor Screen size Right Click->Properties-]>Settings->Screen Resolution
  6. Open Ultravnc viewer in windows and enter Linux IP Adress :1 Eg.,10.20.30.40:1 ,as i started the server as vncserver :1 so i am logging into session 1
  7. Session is number is your choice and each session is independent of the other
Issues
Following error is a frequent issue
Xlib: connection to ":0.0" refused by server 
Xlib: No protocol specified
Error: Can't open display: :0.0
Why?
Usually Xauthority will maintain cookie for all sessions of the Linux Host
vi ~/.Xauthority
If Xauthority is not added for the corresponding session,in our case "1" it wont allow any GUI based applications to run while initiated from bash
How to override
export DISPLAY=127.0.0.1:1
xhost +  [Add the existing host to Xauthority]
So all done ,enjoy your VNC





No comments: