FS#49953 - [lightdm] .xprofile and .Xresources have no effect upon window manager restart
Attached to Project:
Arch Linux
Opened by Silvio B (smb1234) - Tuesday, 05 July 2016, 08:05 GMT
Last edited by Toolybird (Toolybird) - Monday, 12 June 2023, 06:30 GMT
Opened by Silvio B (smb1234) - Tuesday, 05 July 2016, 08:05 GMT
Last edited by Toolybird (Toolybird) - Monday, 12 June 2023, 06:30 GMT
|
Details
Description:
I have noticed that with the latest package version, .xprofile and .Xresources do not get parsed / executed when restarting the window manager and logging in again. I believe there is a regression from 1.18.2-1 -> 1.18.2-2, not sure whether related to Arch or upstream, as the Xsession script seems created by Arch. I am using awesome window manager with its default session along with some .Xresources and an .xprofile, and have lightdm enabled as a systemd service. The expected behavior is that /etc/lightdm/Xsession evaluates both files when logging in through lightdm. Steps to reproduce: A minimal config to reproduce is and .xprofile with (for example) xset -b # turn off the terminal bell and a .Xresources with some entries, just to check whether they get parsed by xrdb. When I start my machine an first log on to the awesome session with the setup above, the .Xresources get correctly parsed by /etc/lightdm/Xsession (verify by seeing entries with "xrdb -query"), and the terminal bell is off (verify by hitting backspace in an empty urxvt or xterm). When I terminate my window manager, return to lightdm and login again, the xrdb database is empty (verify by "xrdb -query" and the terminal bell is on. Somehow it seems that either /etc/lightdm/Xsession is not executed the second time, or that it is executed but the commands have no effect on the X instance. In 1.18.2-1 this used to work just fine. I hope this is helpful to determine whether it is an Arch issue or upstream, let me know if you need more information. |
This task depends upon
Closed by Toolybird (Toolybird)
Monday, 12 June 2023, 06:30 GMT
Reason for closing: Works for me
Additional comments about closing: Old and stale. Seems to be no longer an issue...I cannot repro.
Monday, 12 June 2023, 06:30 GMT
Reason for closing: Works for me
Additional comments about closing: Old and stale. Seems to be no longer an issue...I cannot repro.
The bugs targeted by 1.18.2: https://launchpad.net/lightdm/1.18/1.18.2
Among those, https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1594229 seems the more likely culprit. Could you take this upstream and report back here?
pam configuration in /etc/environment or some /etc/profile.d/foo.sh file. The variable declared in /etc/environment is
shown in "env" but has no effect to freetype or apps that depend on that setting. Anything in profile.d isn't exported at all here.
I'm using lightdm with lightdm-gtk-greeter and use mksh for login and interactive shell. Changing to bash makes no difference here.
There seem to be 2 issues. One is the not used pam configuration and one seems the not properly parsed Xsession. Maybe both have the same culprint.
Is there any reason why we are still shipping our own lightdm Xsession file? SuSE depends on Xdm and its xsession file.
In Fedora lightdm depends on xinit shipping a Xsession file (we don't do this anymore). For Ubuntu I can't find it to ship any xsession file at all.
All other major distros place the lightdm config into either /etc/lightdm/lighdtm.conf.d/xx-foo.conf or into /usr/share/lightdm/lightdm.conf.d/xx-foo.conf.
Maybe this would solve some timing related config reading issues.
Andreas, which setting are you trying to export? Maybe it needs to be added to xrdb?
As for pam, lightdm uses /etc/pam.d/system-login which requires pam_env.so so there shouldn't be any problem on that side.
andyrtr@laptop64:/home/andyrtr $ cat /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
#FT2_SUBPIXEL_HINTING=0 # Classic mode
#FT2_SUBPIXEL_HINTING=1 # Infinality mode
FT2_SUBPIXEL_HINTING=2 # Default mode
andyrtr@laptop64:/home/andyrtr $ env | grep FT2_SUBPIXEL_HINTING
FT2_SUBPIXEL_HINTING=2
but "ftview -r 96 6 /usr/share/fonts/TTF/arial.ttf" reports back v35 is used. And other autoloaded apps (Chromium, Claws, Pidgin, HexChat,...) show old font rendering until I restart them.
When using root@laptop64:/root # cat /etc/profile.d/ft2_subpixel_hinting.sh
#export FT2_SUBPIXEL_HINTING=0 # Classic mode
#export FT2_SUBPIXEL_HINTING=1 # Infinality mode
export FT2_SUBPIXEL_HINTING=2 # Default mode
FT2_SUBPIXEL_HINTING=2 is not exported at all here and won't show up in "env".
/home/andyrtr/.Xresources only contains urxvt related settings./home/andyrtr/.xinitrc is empty and no ~/.Xsession.
That should solve this issue
0. To see what is going on I made some changes to /etc/lightdm/Xsession (show only changed part)
echo "Running X session wrapper"
echo "...DEBUG... running wrapper" >> /tmp/xsession-wrapper.log
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
# Load resources
echo "...DEBUG... before loading RESOURCES" >> /tmp/xsession-wrapper.log
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
if [ -f "$file" ]; then
echo "Loading resource: $file"
echo "...DEBUG... before loading '$file':" >> /tmp/xsession-wrapper.log
echo "...DEBUG... `xrdb -query`" >> /tmp/xsession-wrapper.log
echo "...DEBUG... loading '$file'" >> /tmp/xsession-wrapper.log
xrdb -merge "$file"
echo "...DEBUG... loaded? $?" >> /tmp/xsession-wrapper.log
echo "...DEBUG... after load of '$file':" >> /tmp/xsession-wrapper.log
echo "...DEBUG... `xrdb -query`" >> /tmp/xsession-wrapper.log
fi
done
1. There must be clean start of lightdm, for example, after reboot or just simply restart the service
2. log in (I used awesome)
3. start terminal (I used urxvt) and run
xrdb -query > tmp/xrdb-query-3.log
4. log out
5. log in again without restart lightdm service
6. run xrdb again
xrdb -query > tmp/xrdb-query-6.log
7. look into xsession-wrapper.log.
I will report the problem to the upstream.
xrdb-query-3.log (1 KiB)
xrdb-query-6.log (0.1 KiB)