I have a windows VNC client(RealVNC) connecting to my Linux VNC server.The default way of connecting is enabling remote desktop in GNOME.You can do this by going to System -> Preferences -> Remote Desktop and checking “Allow other users to view your desktop”
This will give you the address that you need to enter in vncviewer in order to connect to the server which in this case is hoopoe.elk:0.But there is one issue with this kind of setup you’ll not be able to copy from your windows client and paste it to x server and vice versa.To solve this issue you need to remove vino which is the default VNC server and install and enable x11vnc.
Replacing vino with x11vnc
Disable Vino
go to System -> Preferences -> Remote Desktop and uncheck “Allow other users to view your desktop”
Get x11vnc and install it
1.get latest version from here
2.its a tarball file install it
3.create password for x11vnc
sudo <x11vnc installation dir>/bin/x11vnc -storepasswd <yourpswd> <x11vnc installation dir>/etc/x11vnc.pass
change <x11vnc installation dir> with dir where you've installed x11vnc and <yourpswd> with password that you want
4.edit the Init/Default file in GDM.
gedit /etc/gdm/Init/Default
before the end of file, prior to exit, add the following line
# x11vnc
<x11vnc installation dir>/bin/x11vnc -rfbauth <x11vnc installation dir>/etc/x11vnc.pass -o /tmp/x11vnc.log -forever -shared -bg -rfbport 5900
save file and exit gedit
5.create a file in /etc/gdm/gdm.conf
gedit /etc/gdm/gdm.conf
Add the following:
[Debug]KillInitClients=false
All letters here are case sensitive. save file and exit gedit.
6.Restart the server.
VNC is running now you can connect to it from any VNC client use the ip address of the server,you'll be asked for a password that you created in step 3 if you want to change the password later repeat step 3
Note
1.I am using gnome as window manager
2.you should have access to the server from console via ssh(you should be able to login to server from console)
3.ensure that you disable vino
4.ensure that you’ve created the password file
Reference
- Redhat article on vnc setup
- Ubuntu help on vnc setup
- wikipedia article on X11vnc
- blog on using VNC with Redhat
