Thursday, March 22, 2012

Another way to use VNC with Ubuntu

Ubuntu versions 11.10 and 12.04 use LightDM as a login manager. This breaks older methods of using x11vnc as a way to remote into the Linux box. I found one way of fixing this, but I still prefer using xinetd to handle this. Modifying what I found before, with what I have been already using, I have a desirable solution...

1. sudo apt-get install xinetd x11vnc
2. Create a file, /etc/xinetd.d/x11vnc , with the following content...

service x11vnc
{
  type = UNLISTED
  disable = no
  socket_type = stream
  protocol = tcp
  wait = no
  user = root
  server = /usr/bin/x11vnc
  server_args = -inetd -o /var/log/x11vnc.log -display :0 -forever -bg -rfbauth /etc/vncpasswd -shared -enablehttpproxy -forever -nolookup -auth /var/run/lightdm/root/:0   
  port = 5900
    flags = IPv6
}

3. sudo chmod a+x /etc/xinetd.d/x11vnc
4. sudo x11vnc -storepasswd (VNC password) /etc/vncpasswd
5. Reboot

If you're using any firewall functionality in Ubuntu, be sure to permit TCP port 5900.

3 comments:

  1. ¡Perfecto! Problema resuelto. Has utilizado las nuevas funcionalidades de Ubuntu a la perfección. No entiendo porque no se añade esta funcionalidad a la distribución al igual como se hace con el vino, que te obliga a dejar la máquina encendida.

    ReplyDelete
  2. after much teeth gnashing, this worked for me. Thank you for posting a very complete (and working!) solution. It was Lightdm all along...

    ReplyDelete
  3. Hi, it doesn't work for me. I'm running ubuntu 12.10 server with lxde. Please help!!

    ReplyDelete