I'm running Ubuntu 14.04LTS Server and installed a 'light weight' gnome desktop using
sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install
I have also installed x11vnc
sudo apt-get install x11vnc
I have created a file /etc/conf/x11.conf which starts x11vnc on login-session-start
x11vnc -xkb -repeat -forever -auth /var/run/lightdm/root/:0 -display :0 -rfbauth /etc/xllvnc/passwd -rfbport 5900 -bg -o /var/log/x11vnc.log -gone 'DISPLAY:0 gnome-screensaver-command -l'
I want the server to lock the screen when my VNC client (VNC Viewer) disconnects.
The -gone option is executing but the following error is logged and the screen saver / lock screen does not run.
DISPLAY=:0 gnome-screensaver-command -l
** Message: Failed to get session bus: Error spawning command line 'dbus-launch --autolaunch=a0a75ee9873b5792069aaddf5497ed3c --binary-syntax --close-stderr': Child process exited with code 1
Any ideas what may be wrong?
Thanks.