You are not logged in.

#1 2009-08-05 15:49:57

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

No login manager .bash_profile changes a bit

Hi all,

Rather than necromancing an old post http://bbs.archlinux.org/viewtopic.php?id=57677&p=1, I thought I'd put up a new one for anyone who uses a .bash_profile to startx without a login manager.  With recent changes to /etc/inittab, the old method needs to be changed slightly.  It might seem a bit obvious but what the heh...;)
from:

. $HOME/.bashrc
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/1 ]]; then
    exec xinit -- :0
    logout
fi

to:

. $HOME/.bashrc
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
    exec xinit -- :0
    logout
fi

Funny, I've been using something like the second one for ages in Debian.  Who's bleeding edge? lol

Last edited by bgc1954 (2009-08-05 16:08:29)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#2 2009-08-05 18:17:54

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: No login manager .bash_profile changes a bit

Yes I have noticed that, but then again, if you are not using a login manager then it should be easy to figure out tongue

Here's my .bash_profile, I don't have the $DISPLAY part, having it there or not seems to do the same for me, that variable is not in the environment when you go to a new tty even if X is already running so I don't see the point of having it there tongue

if [[ $(tty) == /dev/tty1 ]]; then
#startx &> xlog-`date +%s`.log &
startx &> /dev/null &
logout
fi

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB