HOWTO: Share desktops with x11vnc instead of built-in Remote Desktop
This explains how to share individual logged in users desktops using x11vnc instead of the built-in "Remote Desktop" feature of Ubuntu. The reason for this is because "vino" which is used by the "Remote Desktop" option is inadequate for a lot of people (no clipboard support), no accessible configuration options, and quite slow.
This is a decent companion to sharing a VNC -> GDM connection (both these howtos work together!) http://www.ubuntuforums.org/showthread.php?t=42941
OK, we have a two step process here, getting x11vnc to run automagically on a user's login and then installing autocutsel; Autocutsel is used to make sure the VNC Clipboard gets updated from both just selecting and right-click copying. You do not have to install autocutsel, it just makes things work a little nicer.
Before you do anything else, you need to enable the universe repositories: http://www.ubuntuguide.org/#extrarepositories
Setting up x11vnc
- Install x11vnc: sudo apt-get install x11vnc
- Set the password: vncpasswd ~/.vnc/passwd (vncpasswd is included with vnc-common, which is installed by default)
- Make it auto-start when the user logs in and show which port we're running on (useful if you run multiple vnc servers) the port will be put in ~/.vnc/port.txt:
- sudo gedit /usr/local/bin/sharex11vnc Paste in the following:
Code:
#!/bin/sh
x11vnc -nap -bg -many -rfbauth ~/.vnc/passwd -desktop "VNC ${USER}@${HOSTNAME}"|grep -Eo "[0-9]{4}">~/.vnc/port.txt
# comment out the following if you don't want a popup telling you which port you're using.
zenity --info --text="Your VNC port is `cat ~/.vnc/port.txt`"
- sudo chmod 755 /usr/local/bin/sharex11vnc
- System->Preferences->Sessions->Startup Programs then click Add and type in sharex11vnc
Installing autocutsel:
- Download tar.gz from http://www.lepton.fr/tools/autocutsel/
- Move file: sudo mv /home/user/location/autocutsel-0.8.0.tar.gz /usr/src
- Extract file: cd /usr/src;sudo tar -xzvf autocutsel-0.8.0.tar.gz
- Install packages required to compile and install autocutsel into a deb package:
- sudo apt-get install gcc checkinstall libx11-dev libxaw8-dev This may take a while if you don't already have gcc or the xlibs installed installed.
- cd autocutsel-0.8.0
- ./configure --prefix=/usr
- sudo checkinstall -y --nodoc The resulting deb will be installed and the package will be left in the current directory
- Make it auto-start when the user logs in:
System->Preferences->Sessions->Startup Programs then click Add and type in autocutsel
The best VNC client for windows is UltraVNC http://ultravnc.sf.net - I recommend it for all your VNC needs.
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
Once you've set this up, to have it startup for additional users:
1. create a password as them: vncpasswd ~/.vnc/passwd
2. add sharex11vnc and autocutsel to thier System->Preferences->Sessions->Startup Programs (or thier startup scripts).
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
Great GUIDE thanks a lot!
Re: HOWTO: Share desktops with x11vnc instead of built-in Remote Desktop
Quote:
Originally Posted by intangible
This explains how to share individual logged in users desktops using x11vnc instead of the built-in "Remote Desktop" feature of Ubuntu. The reason for this is because "vino" which is used by the "Remote Desktop" option is inadequate for a lot of people (no clipboard support), no accessible configuration options, and quite slow.
[...]
Great! Now I would like to connect remotely to another Kubuntu. I also have a Kubuntu installed. How exactly do I do this?
Thx!
Re: HOWTO: Share desktops with x11vnc instead of built-in Remote Desktop
The same problems. None of VNC to GDM HowTo's posted in this forum by now work with CLEAN Ubuntu Breezy install. Tried all of them.
Server seemed to work, but no connections from clients, even from localhost. The same time Remote Desktop (vivo) works just fine.
It would be nice to have guaranted to work on Breezy VNC to GDM HowTo finaly.
Re: HOWTO: Share desktops with x11vnc instead of built-in Remote Desktop
libxaw8-dev seemed to be missing but libxaw7-dev worked fine for me. I also needed build-essential on my basic 'server + xubuntu' install. Thank you.
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
This guide is for connecting to a session that has logged in directly, and the other guide is for starting new sesssions remotely, right?
Well, what I had going on my FC3 install that I just formatted was a vnc user that would be logged in at startup (the local monitor still shows the login screen, but the user is active), all the users session programs would start up (I had azureus run on login), and I could connect to the users desktop via vnc to perform tasks and such.
Neither of these guides seems to do quite what I'm looking for. I believe I followed this guide under FC3:
http://www.fedoraforum.org/forum/showthread.php?t=42062
but config files and stuff are different from FC3
So any way to get a single VNC user active at boot, with his gnome session started automatically, and be able to log on from VNC or locally, like I used to have set up?
edit: didn't notice that this howto was listed under 5.04, as I'm running 5.10, but any help would still be appreciated :)
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
If you followed this guide, the only additional change you need to make is to make a specific user login at startup through gdm (just sudo gdmsetup).
Let me know if you're having problems.
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
This works great on my local network. I need to change the port to run on port 21. I have the port forwared on my router. I have this working under Windows running UltraVNC server using port 65557, so I connect using mywebaddress.com:65557 and it connects. From work they only have port 21 and 80 open so that is what I have to use to access my home workstation from work.
Re: HOWTO: Share desktops with x11vnc instead of Built in Remote Desktop
Good HowTo intangable. i'm a 7 day linux newbie and i got it working, learnt a few things on the way as well.
Thanks to chaumurky for the tip on Build-essential, needed to install that to get autocutsel to work on my new ubuntu 5.10:) .
Now is there any chance i can get a HowTo on getting this to run inside ssh automatically(or any other security so its not plain text transfers). I started looking myself but my the hack it looks like i will have to do is prodably the hard way and good chance it will not work with alot of HELP?? posts in the future:p.