View previous topic :: View next topic |
Author |
Message |
carneboy n00b
Joined: 11 May 2004 Posts: 63 Location: Riverside, CA
|
Posted: Tue Dec 21, 2004 12:59 am Post subject: logout of gnome remotely via ssh? |
|
|
i can't seem to find this on google.. but is there a command that i can run remotely (say via ssh) to logout of my gnome session?
short of just killing the process? |
|
Back to top |
|
|
Pithlit l33t
Joined: 27 Dec 2003 Posts: 887 Location: fuhen
|
Posted: Tue Dec 21, 2004 2:24 am Post subject: |
|
|
if you start gnome with # startx ... # killall startx |
|
Back to top |
|
|
psyeye Guru
Joined: 06 Dec 2002 Posts: 409 Location: Germany
|
Posted: Tue Dec 21, 2004 12:42 pm Post subject: Re: logout of gnome remotely via ssh? |
|
|
carneboy wrote: | i can't seem to find this on google.. but is there a command that i can run remotely (say via ssh) to logout of my gnome session?
short of just killing the process? |
IF you log in as root, you can issue
Code: | /etc/init.d/xdm stop |
That way, your user is thrown out of gnome and even X is takin' down.
Might be overkill...
Other idea:
I checked some manpages and came across
Code: | gnome-session-save --kill |
As I understand it, is saves your sessions and exits - but I have not tested it...
(I'm interested to hear if gnome-session-save did the trick - please report... )
psyeye |
|
Back to top |
|
|
carneboy n00b
Joined: 11 May 2004 Posts: 63 Location: Riverside, CA
|
Posted: Tue Dec 21, 2004 6:02 pm Post subject: |
|
|
Pithlit: thanks for the help, although not quite the solution i was looking for. I was looking for something to log me out.. nicely
psyeye: again thanks for the help. the gnome-session-save --kill looked promising, but it only works if I issue it from an xterm within my gnome session, otherwise it says "GTk-WARNING **: cannot open display" (perhaps i need to play with it some more though.. i'll try it from work today) |
|
Back to top |
|
|
swanson Tux's lil' helper
Joined: 04 Jun 2004 Posts: 147 Location: Edinburgh, Scotland
|
Posted: Tue Dec 21, 2004 6:32 pm Post subject: |
|
|
The following works;
$ export DISPLAY=:0
$ export XAUTHORITY=$HOME/.Xauthority
$ export SESSION_MANAGER="local/`hostname`:/tmp/.ICE-unix/`pidof gnome-session`"
$ gnome-session-save --kill
If you don't have pidof installed, use ps with a grep, an awk and a jump.
EDIT: Forgot to mention but if you have non-session aware applications running Metacity will print a warning window which stops the logout. Same thing you get the same in a normal session except without the ability to click. _________________ Alan. |
|
Back to top |
|
|
|