logout


Forum: Other Help Topics
Topic: logout
started by: bravo-uniform-golf

Posted by bravo-uniform-golf on May 31 2006,04:12
ok this is probably a stupid question but i cant figure out how to logout. when i type logout in bash it says i'm not in the login shell or something. the only way i can logout is to exit the window manager then type exit, but i'd like to know how to use bash to logout so i can set up a key binding for easy logouts. thanks
Posted by mikshaw on May 31 2006,04:30
I haven't tried this, but it's worth a shot....
Add "logout" at the very end of $HOME/.bash_profile (AFTER the startx line)
My logic might be off, but I'm thinking that it might log you out as soon as you close the X session.

Another possibility...run startx with the command "startx && logout"

These are both just guesses.

Posted by pr0f3550r on May 31 2006,15:09
Quote (bravo-uniform-golf @ May 31 2006,00:12)
when i type logout in bash it says i'm not in the login shell

That's because you are not in the login shell!

DSl, like Knoppix, boots in single mode. If you want true multiuser environment you'll have to hack the init scripts.

Posted by mikshaw on May 31 2006,15:19
I have my frugal hacked into a multi-user system, and startx && logout works as expected (the logout command runs when the x session ends), but i didn't test the .bash_profile method.

As pr0f3550r said, this won't work if you're not multi-user. In a default DSL in runlevel 5, logging out will cause /.bash_profile to automatically log you back in.

Posted by pr0f3550r on June 01 2006,09:32
Incidentally, Mikshaw, you might recall some old thread where DSL was compared to some other distro and the latter was rubbished because it run as root.

Well, DSL runs as root, too, although sudoed as dsl user.

The real thing is that all Unix systems (and live systems are no exceptions) run most of their daemons as root ('sudo ps' as a proof of concept).

The only true multiuser environments are the emulated ones (Qemu and UML) but I don't expect everybody to agree on this.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.