I want to log out the user session of a remote Ubuntu 12.04 x64 (laptop) by ssh'ing and running a command.
I know I can reboot with a simple sudo reboot but don't want to if I can help it, I'd rather just log out and back in.
gnome-session-quit fails with an error that it can't find the display, and gnome-session-quit DISPLAY=:0.0 also fails with the error:
> gnome-session-quit DISPLAY=:0.0
** (gnome-session-quit:20214): WARNING **: Command line `dbus-launch --autolaunch=429980f04422a721b1ae90a50000000d --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
** (gnome-session-quit:20214): WARNING **: Unable to start: Cannot open display:
Only other thread I could find similar to this doesn't have any more answers than what I've tried. Anyone know the way to do this?