start x11vnc at boot in ubuntu

By | April 8, 2015

x11vnc

x11vnc is a VNC server that is not dependent on any one particular graphical environment. Also, it facilitates using in a minimal environment, as it has a tcl/tk based GUI. It can be started while your computer is still showing a login screen.

Warning /!\ It is helpful to ensure you have uninstalled any other VNC programs first so that they don’t interfere with x11vnc.

As a quick proof of concept to test your connectivity, as per the man page, one may create a password file via:

x11vnc -storepasswd

It will respond with:

Enter VNC password:
Verify password:
Write password to /home/USERNAME/.vnc/passwd?  [y]/n y
Password written to: /home/USERNAME/.vnc/passwd

One may execute the following in a terminal:

x11vnc -rfbauth ~/.vnc/passwd -bg -gone "popup" -rfbport 5900 -gui tray=minimal,simple,iconfont=14x17 -forever -nevershared

Here a few settings that would be common to adjust depending on your environment:

  • To set x11vnc to request access each time when set without a password, include the -nopw -accept popup:0 options.

  • To set x11vnc to only listen for the next connection, include the -once option.

  • To set x11vnc to continually listen for connections, include the -forever option.

  • To put x11vnc in view-only mode, include the -viewonly option.

  • To set x11vnc to only allow local connections, include the -localhost option.

Have x11vnc start automatically via upstart in any environment (<=Utopic)

sudo nano /etc/init/x11vnc.conf
# description "Start x11vnc at boot"

description "x11vnc"

start on runlevel [2345]
stop on runlevel [^2345]

console log

respawn
respawn limit 20 5

exec /usr/bin/x11vnc -loop -auth guess -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -forever -shared -repeat


Сomments аrchive