1

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.

1 Answer 1

0

Same problem to me, but i am using cinnamon-screensaver. The Screensaver-command is using DBUS to commit the "lock".

So you have to set DBUS_SESSION_BUS_ADDRESS instead of DISPLAY, e.g.:

DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus gnome-screensaver-command -l

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .