Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] X session gets terminated when log out of tty

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
pjimenez
Posts: 5
Joined: 2017-01-03 11:59

[SOLVED] X session gets terminated when log out of tty

#1 Post by pjimenez »

Hello, I'm having an issue I hadn't had with previous versions of Debian, and I'm experiencing it now with the current stable version of Debian.

I have my user ~/.profile file edited so that when I log in to tty1, startx gets executed.

Code: Select all

# Will prompt x session at login
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
    . startx 
  logout
fi
The issue comes when I log out with my user of another tty (tty2 or tty3, for example). The X sessions crashes, and then after a few seconds it gets terminated. Any ideas?

My ~/.xinitrc looks like this.

Code: Select all

exec lxterminal &
exec openbox-session & 
exec lxpanel
Last edited by pjimenez on 2018-01-10 15:45, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: X session gets terminated when I log out of another tty

#2 Post by bw123 »

had a similar issue and it was this:

remove clear_console in ~/.bash_logout
https://bugs.debian.org/805605
https://bugs.debian.org/810660
https://bugs.freedesktop.org/93164

I changed this so it applies to all new users:

Code: Select all

/etc/skel/.bash_logout

# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
#    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
        /bin/true
fi


resigned by AI ChatGPT

pjimenez
Posts: 5
Joined: 2017-01-03 11:59

Re: X session gets terminated when I log out of another tty

#3 Post by pjimenez »

It worked! Thank you. I will mark this thread as solved

Post Reply