You are not logged in.

#1 2008-01-12 16:18:43

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Logging Off

Maybe i'm just being dim, but I can't seem to find a terminal command for logging off.

By logging off I mean doing the same as shutting down X (CTRL+ALT+BACKSPACE) followed by CTRL+D to logoff my user account, bringing me to the text screen shown when starting up the computer (note: I don't use a Login Manager thing).

Many thanks.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#2 2008-01-12 16:29:24

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: Logging Off

You can always just start X with 'exec startx'. That way the X process will replace your login shell, so you're logged out when you kill X.

The only other way I can think of would be to write a script that automatically does what you've been doing manually: kill X then log out. Something like this would work, assuming you only run one X server at a time:

# logout.sh
killall Xorg
sleep 1
killall -s USR1 bash

# .bashrc
trap logout USR1

It would be better to add some logic to make sure you're only killing your login shell, but right now I can't figure out a way to do that that wouldn't require some fancy grep work.

Last edited by skymt (2008-01-12 16:31:22)

Offline

Board footer

Powered by FluxBB