this seems to be an old post but the topic might be still interesting for some users. To have vnc to start at boot up, you will need to
- install a vnc server software (here we will be using x11vnc)
- configure a startup script (used to start the vnc service)
Step 1 - install x11vnc server
from a command line, type
sudo apt-get install x11vnc
To add security, you should set a pwd
sudo x11vnc -storepasswd
Step 2 - Configure your startup script
- if your ubuntu version is lower 15.04,
you create the config file under /etc/init.d/x11vnc.conf
and populate it with the correct commands to be executed
start on login-session-start
script
/usr/bin/x11vnc -xkb -auth
/var/run/lightdm/root/:0
-noxrecord -noxfixes -noxdamage
-rfbauth /etc/x11vnc.pass
-forever -bg -rfbport 5900 -o /var/log/x11vnc.log
end script
- if your ubuntu version is 15.04 or later,
these systems are using systemd and you will need to create your service unit file under /lib/systemd/system/x11vnc.service
and populate it with the correct commands to be executed
[Unit] Description=Start x11vnc at startup. After=multi-user.target
[Service] Type=simple ExecStart=/usr/bin/x11vnc -auth guess -forever
-loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared
[Install] WantedBy=multi-user.target
Reload the service
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
You can find detailed information on Help Ubuntu Community wiki page (see here) or you can try to use this quick to use recipice
- For Ubuntu version lower than 15.04, check this post
- For Ubuntu version 15.04 or later, check this post
Hope this is helpful