I want to start the vino VNC server ( vino-server ) from the crontab on reboot on Ubuntu 12.10.
My crontab entry looks like:
## Start the vino server
@reboot sleep 20 ; /home/user/Desktop/start_vino_vnc.sh
My script looks like:
#! /bin/bash
export DISPLAY=:0.0
xhost +
nohup /usr/lib/vino/vino-server > /home/user/Desktop/vino_log.txt
I constantly get the following errors in my log file:
user@user:~/Desktop$ cat vino_log.txt
No protocol specified
Cannot open display:
Run 'vino-server --help' to see a full list of available command line options
From the command line if I try to run the server without SSH'ing with X Server forwarded then I get the same error:
user@user:~/Desktop$ /usr/lib/vino/vino-server
No protocol specified
Cannot open display:
Run 'vino-server --help' to see a full list of available command line options
How can I achieve this? I need this to happen via crontab and there is no monitor on the headless Ubuntu server.
There was a command line option for setting the display - for me it worked to set that option:
#! /bin/bash
export DISPLAY=:0.0
xhost +
nohup /usr/lib/vino/vino-server --display=:0.0 > /home/pclass/Desktop/vino_log.txt