sddm / sddm

QML based X11 and Wayland display manager
GNU General Public License v2.0
1.88k stars 328 forks source link

SDDM never executes xrdb -merge $HOME/.Xresources on KDE/Plasma/Kubuntu #449

Open pronobis opened 9 years ago

pronobis commented 9 years ago

Running Kubuntu Willy with SDDM 0.11, I noticed that SDDM never actually uses my .Xresource file. After further investigation, it became clear that the part of the Xsession script responsible for merging it is never actually executed since execution stops on

Loading X session script /etc/X11/Xsession.d/99x11-common_start

Explained further on the Xsession snippet below:

echo "OK so far"  # This will execute just fine

if [ -d "$xsessionddir" ]; then
    for i in `ls $xsessionddir`; do
        script="$xsessionddir/$i"
        echo "Loading X session script $script"
        if [ -r "$script"  -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then

            . "$script"  # Executing 99x11-common_start blocks further execution of the script 

        fi
    done
fi

echo "Not executed at all"  # Never get's here

if [ -d /etc/X11/Xresources ]; then
  for i in /etc/X11/Xresources/*; do
    [ -f $i ] && xrdb -merge $i
  done
elif [ -f /etc/X11/Xresources ]; then
  xrdb -merge /etc/X11/Xresources
fi
[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources
plfiorini commented 8 years ago

99x11-common_start does exec $STARTUP which will replace the Xsession process. No wonder why it hangs :)

plfiorini commented 8 years ago

Ubuntu has its Xsession (http://manpages.ubuntu.com/manpages/utopic/man5/Xsession.5.html) and runs /etc/X11/Xsession.d scripts $STARTUP might be the actual session command but that's something that we want to execute ourselves with our Xsession.

Now, since my Fedora 23 doesn't have the aforementioned scripts I wonder what we should do with Ubuntu... Maybe we can check whether /etc/X11/Xsession exists and in that case set STARTUP to $session and let it take care of everything. On systems without that script we would continue like before except we don't execute /etc/X11/Xsession.d scripts.

plfiorini commented 8 years ago

@jleclanche Do you have that Ubuntu stuff on Arch Linux?

jleclanche commented 8 years ago
/etc/X11
├── xinit
│   ├── xinitrc
│   ├── xinitrc.d
│   │   ├── 40-libcanberra-gtk-module.sh
│   │   └── 50-systemd-user.sh
│   └── xserverrc
├── xorg.conf
└── xorg.conf.d
    └── 00-keyboard.conf
plfiorini commented 8 years ago

@pronobis could you please give us feedback with the last PR version?

pronobis commented 8 years ago

Unfortunately, I cannot test it at this moment.

bdcomp commented 8 years ago

I am wondering if this issue is related to bug: https://bugs.launchpad.net/ubuntu/+bug/1535763

bdcomp commented 8 years ago

@plfiorini please take an additional look at the bug from my previous comment. It looks like several users affected and SDDM is relevant. I think this issue may fix it.

zjghub commented 8 years ago

Just ran into this issue on Kubuntu 15.10. The problem is more general than just xrdb settings. On Ubuntu, the shell script fragments in /etc/X11/Xsession.d expect certain variables and shell functions to be defined which they inherit from /etc/X11/Xsession. When running out of /usr/share/sddm/scripts/Xsession these are not defined which causes some of the scripts to fail with errors in ~/.xsession-errors.

I applied the patch in commit 25ab4c7 manually and the scripts are now executed correctly with no xsession-errors. I will live with my hacked installation untill the next LTS release of Ubuntu in 4/2016 which hopefully will have these fixes pulled in.

Many thanks to plfiorini.

calvertdw commented 5 years ago

Arch Linux, sddm 0.18.1-1 with KDE Plasma still does not load ~/.Xresources, specifically the Xft.* font settings I put in there. Calling xrdb ~/.Xresources loads them but must be done manually.

Has this been addressed?

bluewww commented 4 years ago

I'm also hitting this bug. Are there any good workarounds available?