You are not logged in.

#1 2015-07-29 09:24:44

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

XDG_VTNR is not defined after exit.

i use automatic login to virtual console and my ~/.bash_profile looks like this:

# System settings before starting X

. $HOME/.bashrc

PATH="$HOME/bin:$HOME/.gem/ruby/2.2.0/bin:$PATH"

# colored debug for gcc (perl script, aur package)
if [ -d "/usr/lib/colorgcc/bin" ] ; then
    PATH="/usr/lib/colorgcc/bin:$PATH"
fi

if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]
then
	killall -q ssh-agent
	echo -n "ssh-agent: "
	eval "$(ssh-agent)"
	ssh-add (...)
fi

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

i just noticed that the XDG_VTNR variable is empty after logging out from X.
On other ttys this does not happen, only on 1.

So if I exit tty1, I get re-logged in automatically, but X does not get restarted automatically.

I'm not unhappy with this, but I'm confused and I'd like to understand:
why is XDG_VTNR unset/empty after logout (only on tty1)?

Offline

#2 2015-07-29 09:25:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: XDG_VTNR is not defined after exit.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-07-29 09:50:44

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: XDG_VTNR is not defined after exit.

ahh, that was quick. thanks.
since trilby's description matches my problem 100%, i'll continue the discussion there.

Offline

Board footer

Powered by FluxBB