Discussion:
gdm command line logout?
Morgan Read
2006-06-10 22:40:38 UTC
Permalink
Hi Folks,

Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.

Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?

Probably overly complicating things...

Regards,
M.
--
Morgan Read
NEW ZEALAND
<mailto:mstuffATreadDOTorgDOTnz>

get a life; GET FIREFOX!
<www.getfirefox.com>
WHY ME? Read on:
<http://www.theregister.co.uk/2004/06/28/cert_ditch_explorer/>
<http://www.theregister.co.uk/2004/09/13/german_ie_jitters/>
Craig Box
2006-06-11 00:19:21 UTC
Permalink
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.
gnome-session-save --kill.

Craig


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Michael Adams
2006-06-11 01:14:28 UTC
Permalink
On Sun, 11 Jun 2006 12:19:21 +1200
Post by Craig Box
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop
Shut Down)? I know stop, restart and safe-restart, but not logout.
gnome-session-save --kill.
Craig
I use "init 3", works on all desktops, works on most distro's but isn't
a given.
http://en.wikipedia.org/wiki/Init
--
Michael
Those that can, do; those that can't, teach.

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2006-06-11 10:46:01 UTC
Permalink
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.
Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?
Probably overly complicating things...
Do you really want to shut down the desktop or do you just want a
console? If so try Ctrl-Alt-F1 (or F2, F3, etc up to F6). Alt-F7 takes
you back to the desktop. Ctrl-Alt-Backspace used to kill X but I've not
tried that in ages.

Cheers,

Cliff
--
http://barzoomian.blogspot.com

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Morgan Read
2006-06-11 11:52:57 UTC
Permalink
Post by Cliff Pratt
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.
Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?
Probably overly complicating things...
Do you really want to shut down the desktop or do you just want a
console? If so try Ctrl-Alt-F1 (or F2, F3, etc up to F6). Alt-F7 takes
you back to the desktop. Ctrl-Alt-Backspace used to kill X but I've not
tried that in ages.
Hi,
Thanks guys.
Yup, want to shut down the desktop. Some context might help: I've been
ending my 'good-night' script (yum update & backup) with "shutdown -h
now" - which I've been thinking a rather blunt instrument.

Was about to say 'great' re "gnome-session-save --kill" but it's no
different to "gnome-session-save --kill --gui", I get a graphic query
window either way.

I read somewhere that "shutdown" was just a script to "telinit 0"? I
assume "init 3" is a distro variation to "telinit 3"? So, is "telinit
0" (or "shutdown" if it's only a script to the init system) a perfectly
nice way to say 'good-night' to my gnome session when I've long since
hit the sack?

Good-night,
M.
--
Morgan Read
NEW ZEALAND
<mailto:mstuffATreadDOTorgDOTnz>

fedora: Freedom Forever!
http://fedoraproject.org/wiki/Overview
Robin
2006-06-11 13:14:09 UTC
Permalink
Post by Morgan Read
I've been
ending my 'good-night' script (yum update & backup) with "shutdown -h
now" - which I've been thinking a rather blunt instrument.
That should work fine. As part of the shutdown procedure, it should issue a
command the equivalent of:
/etc/init.d/gdm stop
which will ask gdm to shut down (you can also do this from the command line).
It won't very gracefully shut down your X session, but if that's OK (which it
sounds like it is), then that shouldn't be a problem.
--
Robin <***@kallisti.net.nz> JabberID: <***@jabber.kallisti.net.nz>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
Cliff Pratt
2006-06-11 21:06:33 UTC
Permalink
Post by Morgan Read
Post by Cliff Pratt
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.
Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?
Probably overly complicating things...
Do you really want to shut down the desktop or do you just want a
console? If so try Ctrl-Alt-F1 (or F2, F3, etc up to F6). Alt-F7 takes
you back to the desktop. Ctrl-Alt-Backspace used to kill X but I've not
tried that in ages.
Hi,
Thanks guys.
Yup, want to shut down the desktop. Some context might help: I've been
ending my 'good-night' script (yum update & backup) with "shutdown -h
now" - which I've been thinking a rather blunt instrument.
Was about to say 'great' re "gnome-session-save --kill" but it's no
different to "gnome-session-save --kill --gui", I get a graphic query
window either way.
I read somewhere that "shutdown" was just a script to "telinit 0"? I
assume "init 3" is a distro variation to "telinit 3"? So, is "telinit
0" (or "shutdown" if it's only a script to the init system) a perfectly
nice way to say 'good-night' to my gnome session when I've long since
hit the sack?
Like Robin says, 'shutdown -h now' is the way to go. It runs all the
shutdown scripts in /etc/init.d/... so it's pretty tidy!

Incidentally I tried Ctrl-Alt-Backspace at the login screen, and it does
seem to kill X, but it immediately starts up again.....

Cheers,

Cliff
--
http://barzoomian.blogspot.com

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Nick Rout
2006-06-11 22:23:48 UTC
Permalink
On Mon, 12 Jun 2006 09:06:33 +1200
Post by Cliff Pratt
Post by Morgan Read
Post by Cliff Pratt
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop >
Shut Down)? I know stop, restart and safe-restart, but not logout.
Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?
Probably overly complicating things...
Do you really want to shut down the desktop or do you just want a
console? If so try Ctrl-Alt-F1 (or F2, F3, etc up to F6). Alt-F7 takes
you back to the desktop. Ctrl-Alt-Backspace used to kill X but I've not
tried that in ages.
Hi,
Thanks guys.
Yup, want to shut down the desktop. Some context might help: I've been
ending my 'good-night' script (yum update & backup) with "shutdown -h
now" - which I've been thinking a rather blunt instrument.
Was about to say 'great' re "gnome-session-save --kill" but it's no
different to "gnome-session-save --kill --gui", I get a graphic query
window either way.
I read somewhere that "shutdown" was just a script to "telinit 0"? I
assume "init 3" is a distro variation to "telinit 3"? So, is "telinit
0" (or "shutdown" if it's only a script to the init system) a perfectly
nice way to say 'good-night' to my gnome session when I've long since
hit the sack?
Like Robin says, 'shutdown -h now' is the way to go. It runs all the
shutdown scripts in /etc/init.d/... so it's pretty tidy!
Incidentally I tried Ctrl-Alt-Backspace at the login screen, and it does
seem to kill X, but it immediately starts up again.....
Cheers,
Cliff
If you start X on a one-off basis, eg startx or X then killing it will keep it dead. If it is being started by gdm|kdm etc then it is restarted by the gdm|kdm service until you kill that service.
Post by Cliff Pratt
--
http://barzoomian.blogspot.com
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Morgan Read
2006-06-12 06:11:01 UTC
Permalink
...
Post by Nick Rout
Post by Cliff Pratt
Like Robin says, 'shutdown -h now' is the way to go. It runs all
the shutdown scripts in /etc/init.d/... so it's pretty tidy!
Incidentally I tried Ctrl-Alt-Backspace at the login screen, and it
does seem to kill X, but it immediately starts up again.....
Cheers,
Cliff
If you start X on a one-off basis, eg startx or X then killing it
will keep it dead. If it is being started by gdm|kdm etc then it is
restarted by the gdm|kdm service until you kill that service.
Hi, thanks all - I'll now go to sleep content in the knowledge that gdm
will follow me happily in it's own good time.
Regards,
M.
--
Morgan Read
NEW ZEALAND
<mailto:mstuffATreadDOTorgDOTnz>

fedora: Freedom Forever!
http://fedoraproject.org/wiki/Overview
Michael Adams
2006-06-12 08:33:22 UTC
Permalink
On Sun, 11 Jun 2006 23:52:57 +1200
Post by Morgan Read
Post by Morgan Read
Hi Folks,
Is there a command line logout from gdm & bash (effectively Desktop
Post by Morgan Read
Shut Down)? I know stop, restart and safe-restart, but not
logout.>
Post by Morgan Read
Or, does init system effectively do this (eg "telinit 0" does nice
logout from gdm & bash)?
Probably overly complicating things...
Do you really want to shut down the desktop or do you just want a
console? If so try Ctrl-Alt-F1 (or F2, F3, etc up to F6). Alt-F7
takes you back to the desktop. Ctrl-Alt-Backspace used to kill X but
I've not tried that in ages.
Hi,
Thanks guys.
Yup, want to shut down the desktop. Some context might help: I've
been ending my 'good-night' script (yum update & backup) with
"shutdown -h now" - which I've been thinking a rather blunt
instrument.
Was about to say 'great' re "gnome-session-save --kill" but it's no
different to "gnome-session-save --kill --gui", I get a graphic query
window either way.
I read somewhere that "shutdown" was just a script to "telinit 0"? I
assume "init 3" is a distro variation to "telinit 3"? So, is "telinit
0" (or "shutdown" if it's only a script to the init system) a
perfectly nice way to say 'good-night' to my gnome session when I've
long since hit the sack?
telinit isn't that hell of a useful in Linux. It is primarily included
for people coming from other Unices (Unixen?). It is just a softlink to
"init'.

# cd /sbin
# ls -l *nit

Also refer "man init", especially the last paragraph under the TELINIT
subsection.

IOW knowing telinit is a Unix thing is good, but in linux save yourself
some typing and just use 'init 0' in the future. Lazy programmers to the
fore.
--
Michael
Those that can, do; those that can't, teach.

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Continue reading on narkive:
Loading...