View previous topic :: View next topic |
Author |
Message |
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2712 Location: Edmonton, AB
|
Posted: Sat Jun 12, 2021 4:24 am Post subject: LightDM automatic logout prevention / start X on vt7 |
|
|
I'm looking for two solutions.
1.) How to correctly start X on vt7 (I'm using xfce) without using login manager.
I have in: .bash_profile Code: | if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty7 ]]; then exec startxfce4 -- vt7; fi |
but that doesn't work.
If I put in: .bash_profile
Code: | if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startxfce4 -- vt7; fi |
X starts but it doesn't look correct.
ps fax gives me:
Code: | 20712 tty1 S+ 0:00 \_ xinit /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc vt1 vt7 |
How to correctly start X (xfce4) on vt7?
2.) I tried "LightDM" login manager. But it comes with some problems.
After certain period of time LightDM logs me out of X and I can not login remotely to a computer via x2go. I get an error:
Code: | Connection failed. Invalid MIT-MAGIC-COOKIE-1 keyxwininfo: error: unable to open display ":0" Invalid MIT-MAGIC-COOKIE-1 keyxwininfo: error: unable to open display ":0" |
When a user on a remote site Logs IN I can login via x2go as well.
How to prevent "LightDM" from logging out? |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Sat Jun 12, 2021 3:35 pm Post subject: |
|
|
Basically, what you need is at the end of ~/.bash_profile
Code: | if ! pidof X 2&>/dev/null
then startx
fi |
and in ~/.xinitrc:
Code: | exec /usr/bin/startxfce4 |
In .xinitrc, you can redirect the errors into a log file:
Code: | exec /usr/bin/startxfce4 2>.errors.xfce |
export environmental variables needed when running a desktop or load other settings before the startxfce4 call:
Code: | # not all desktops/wm set it up, must be a valid XDG value, which imply it can or not correspond to the running desktop/wm:
export XDG_CURRENT_DESKTOP="gnome"
# Load custom X server resource properties:
xrdb ~/.Xdefaults |
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2961 Location: Edge of marsh USA
|
Posted: Sun Jun 13, 2021 2:48 am Post subject: |
|
|
Re: #2. A user does not have to be logged into X for x2go to work. I log in nearly every day to a remote headless machine that doesn't even have a display manager installed and only barebones X. I ALSO log in routinely to remote machines where all users have been previously logged out.
On the other hand, I am not familiar at all with your error message, but best I can make out you have an x2go-client misconfiguration.
I don't think LightDM does automatic logouts. It certainly doesn't do automatic logouts by default. Look for that problem somewhere else.
Best I have been able to understand it, starting X as a user with startx (~/.xinitrc) defaults to the VT from which it was started for security purposes. It's fine. Easy to get used to. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
|