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

Everything about X, Gnome, KDE, ... and everything running on it

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

Postby pjimenez » 2018-01-10 12:48

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.
pjimenez
 
Posts: 3
Joined: 2017-01-03 11:59

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

Postby bw123 » 2018-01-10 15:24

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


User avatar
bw123
 
Posts: 3408
Joined: 2011-05-09 06:02
Location: TN_USA

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

Postby pjimenez » 2018-01-10 15:43

It worked! Thank you. I will mark this thread as solved
pjimenez
 
Posts: 3
Joined: 2017-01-03 11:59


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable