Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a nx-based session that I want killed. Can I do it via SSH?

Session I want killed

In this session, I can't click on anything or use my keyboard. However, the time in the menu bar is still updating.

I can disconnect the nx session by going to the NX Session administrator, and clicking on "disconnect session", but when I log back in again, the same screenshot usually appears (sometimes the menu bar at the top doesn't appear, and the disconnect session confirmation and the greyness where gnome-do ought to appear is absent).

I assume I have to totally log myself out, and then do a clean login again. Can I do this via SSH, or by going to the physical computer and logging in there (both of which are working fine)?

I tried in a separate SSH session the following:

$ dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
Failed to open connection to "session" message bus: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed .

$ qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed:
/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
share|improve this question

1 Answer 1

In NX session administrator you can try to remove the session files and start a new session. Anyways, if you ssh to the machine and restart NXServer, next time you login you'll have a new clean session. (sudo /usr/NX/bin/nxserver --restart)

share|improve this answer
    
First approach didn't change anything. With respect to the second approach, do I need sudo/root? –  Andrew Grimm Dec 15 '11 at 2:15
    
yes, you need to sudo (corrected answer) –  laurent Dec 15 '11 at 2:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.