mate-base/mate-session-manager: /etc/X11/xinit/xinitrc.d/{10-user-dirs-update-mate,15-xdg-data-mate} mate-base/mate-menus: /etc/X11/xinit/xinitrc.d/10-xdg-menu-mate all test for "$DESKTOP_SESSION" = "mate" However LXDM (lxde-base/lxdm) sets DESKTOP_SESSION to "MATE" so the scripts will never trigger. Note that lightdm sets DESKTOP_SESSION to "mate"
I also note that this scripts fails, /etc/X11/xinit/xinitrc.d/15-xdg-data-mate #!/bin/sh if [ "$DESKTOP_SESSION" = "mate" ]; then if [ -z "$XDG_DATA_DIRS" ]; then export XDG_DATA_DIRS=/usr/share/mate:/usr/local/share/:/usr/share/ else export XDG_DATA_DIRS=/usr/share/mate:"$XDG_DATA_DIRS" fi fi evne when the "$DESKTOP_SESSION" = "mate" has been fixed This appears to be overwritten by /etc/env.d/90xdg-data-base and /etc/env.d/30xdg-data-local Remove those two env.d files fixes the problem. Again, lighdm works fine in this regard
Found the problem with XDG_DATA_DIRS, /etc/lxdm/Xsession have last: exec -l bash -c "$LXSESSION" The -l make it a login shell which sources /etc/profile.env again and overwrite previous XDG_DATA_DIRS Removing the -l seems to work without problems but I cannot say for sure though. Does LXDM need to launch a login shell?
Browsing the net indicates that the DESKTOP_SESSION name should all be lower case. I think this bug should be transferred to the lxdm maintainers. Can someone do that for me?
This script put into /etc/lxdm/xinitrc : ---------------------------------------- LXSESSION=$1 #Convert to lower case DESKTOP_SESSION=${DESKTOP_SESSION,,} export DESKTOP_SESSION lxdm_xinit=" if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/* ; do [ -x \"\$f\" ] && . \"\$f\" done unset f fi $LXSESSION " if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then eval "$(dbus-launch --sh-syntax --exit-with-session)" fi exec -l bash -c "eval $lxdm_xinit" ------------------------------------ Fixes the MATE problem while keeping login shell (exec -l) semantics
Assigning to lxde herd as this looks like a bug in lxdm.
ping? I suspect the real bug is starting an login shell. I am back to /etc/lxdm/xinitrc: LXSESSION=$1 #Convert to lower case DESKTOP_SESSION=${DESKTOP_SESSION,,} export DESKTOP_SESSION if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/* ; do [ -x "$f" ] && . "$f" done unset f fi if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then eval "$(dbus-launch --sh-syntax --exit-with-session)" fi exec bash -c "$LXSESSION"
did you try to discuss this with lxdm upstream?
(In reply to Markos Chandras from comment #7) > did you try to discuss this with lxdm upstream? No, but I fired off a mail just now.
(In reply to Markos Chandras from comment #7) > did you try to discuss this with lxdm upstream? No, but I fired off a mail just now. (In reply to Joakim Tjernlund from comment #8) > (In reply to Markos Chandras from comment #7) > > did you try to discuss this with lxdm upstream? > > No, but I fired off a mail just now. However, looking at /etc/lxdm/Xsession, Gentoo should just provide it own script like /etc/X11/Xsession or /etc/X11/xinit/Xsession and be done. Currenlty Gentoo ends up in the default and that is a bad default.
This is lightdm Xsession file, looks alot cleaner and also processes /etc/X11/Xresources, "$HOME/.Xresources" #!/bin/sh # # LightDM wrapper to run around X sessions. echo "Running X session wrapper" # 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 for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do if [ -f "$file" ]; then echo "Loading resource: $file" xrdb -nocpp -merge "$file" fi done # Load keymaps for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do if [ -f "$file" ]; then echo "Loading keymap: $file" setxkbmap `cat "$file"` XKB_IN_USE=yes fi done # Load xmodmap if not using XKB if [ -z "$XKB_IN_USE" ]; then for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do if [ -f "$file" ]; then echo "Loading modmap: $file" xmodmap "$file" fi done fi unset XKB_IN_USE # Run all system xinitrc shell scripts. xinitdir="/etc/X11/xinit/xinitrc.d" if [ -d "$xinitdir" ]; then for script in $xinitdir/*; do echo "Loading xinit script $script" if [ -x "$script" -a ! -d "$script" ]; then . "$script" fi done fi # Load Xsession scripts xsessionddir="/etc/X11/Xsession.d" 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" fi done fi echo "X session wrapper complete, running session $@" exec $@
such changes should be communicated with upstream so all distros can benefit from them. I am not going to patch lxdm like that.
(In reply to Markos Chandras from comment #11) > such changes should be communicated with upstream so all distros can benefit > from them. I am not going to patch lxdm like that. Sure, I was hoping a maintainer could bring some sense out of this and move forward. I really don't know this stuff, I just sniff out the error and try to suggest something that *COULD* be a way forward.
I just found out that the below files are Gentoo specific, please update mate-base/mate-session-manager and mate-base/mate-menus to look for both "mate" and "MATE" mate-base/mate-session-manager: /etc/X11/xinit/xinitrc.d/{10-user-dirs-update-mate,15-xdg-data-mate} mate-base/mate-menus: /etc/X11/xinit/xinitrc.d/10-xdg-menu-mate all test for "$DESKTOP_SESSION" = "mate" However LXDM (lxde-base/lxdm) sets DESKTOP_SESSION to "MATE" so the scripts will never trigger.
Good point. Will do.
(In reply to Markos Chandras from comment #11) > such changes should be communicated with upstream so all distros can benefit > from them. I am not going to patch lxdm like that. It just occurred to me that LXDM expects distributions to provide its own startup script(from /etc/lxdm/Xsession): #!/bin/bash # use bash for "exec -l", howto run login shell by /bin/sh ? if [ $# -eq 1 -a -n "$1" ]; then LXSESSION=$1 else # default session LXSESSION=/usr/bin/startlxde fi [ -f /etc/profile ] && . /etc/profile [ -f ~/.profile ] && . ~/.profile if [ -f /etc/X11/xinit/xinitrc-common ]; then # fedora . /etc/X11/xinit/xinitrc-common exec -l bash -c "$LXSESSION" elif [ -x /etc/X11/xinit/Xsession ]; then # fedora exec /etc/X11/xinit/Xsession "$LXSESSION" elif [ -x /etc/X11/Xsession ]; then # mandriva, debian, ubuntu exec /etc/X11/Xsession "$LXSESSION" elif [ -x /etc/X11/xinit/xinitrc ]; then #suse export WINDOWMANAGER=$LXSESSION exec -l bash -c /etc/X11/xinit/xinitrc else # unknown, user should custom /etc/lxdm/xinitrc self if [ -x /etc/lxdm/xinitrc ]; then . /etc/lxdm/xinitrc "$LXSESSION" fi So Gentoo should provide its own script, either a /etc/X11/Xsession or /etc/lxdm/xinitrc will do. I propose a modified lightdm script: #!/bin/sh # # LightDM wrapper to run around X sessions. echo "Running X session wrapper" #Convert MATE to lower case, until mate scripts are fixed [ "$DESKTOP_SESSION" = "MATE" ] && DESKTOP_SESSION = mate export DESKTOP_SESSION # Load resources for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do if [ -f "$file" ]; then echo "Loading resource: $file" xrdb -nocpp -merge "$file" fi done # Load keymaps for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do if [ -f "$file" ]; then echo "Loading keymap: $file" setxkbmap `cat "$file"` XKB_IN_USE=yes fi done # Load xmodmap if not using XKB if [ -z "$XKB_IN_USE" ]; then for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do if [ -f "$file" ]; then echo "Loading modmap: $file" xmodmap "$file" fi done fi unset XKB_IN_USE #Make DBUS start optimally command=$@ # Run all system xinitrc shell scripts. xinitdir="/etc/X11/xinit/xinitrc.d" if [ -d "$xinitdir" ]; then for script in $xinitdir/*; do echo "Loading xinit script $script" if [ -x "$script" -a ! -d "$script" ]; then . "$script" fi done fi # Load Xsession scripts xsessionddir="/etc/X11/Xsession.d" 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" fi done fi echo "X session wrapper complete, running session $@" exec $command
posting code in comments is very inefficient. Please create proper patches or files and attach them separately
(In reply to Markos Chandras from comment #16) > posting code in comments is very inefficient. Please create proper patches > or files and attach them separately This was just for Comments, I find it easier to comment inline. Is my suggestion acceptable at all? Perhars we should just replace /etc/lxdm/Xsession with our own? Which is POSIX sh compatile also?
(In reply to Joakim Tjernlund from comment #17) > (In reply to Markos Chandras from comment #16) > > posting code in comments is very inefficient. Please create proper patches > > or files and attach them separately > > This was just for Comments, I find it easier to comment inline. > Is my suggestion acceptable at all? > > Perhars we should just replace /etc/lxdm/Xsession with our own? > Which is POSIX sh compatile also? This is precisley what lightdm does so patch will follow
Created attachment 392316 [details] LXDM Xsession, copied from lightdm, minor adjustments
Created attachment 392318 [details] Patch lxdm-0.5.0 to use Xsession
(In reply to Matthias Maier from comment #14) > Good point. Will do. Ping?
Created attachment 394158 [details] LXDM Xsession Fixed a bug [ "$DESKTOP_SESSION" = "MATE" ] && DESKTOP_SESSION = mate needs to be [ "$DESKTOP_SESSION" = "MATE" ] && DESKTOP_SESSION=mate
Cold someone move this along please?
This is getting old, why cannot LXDE team act on this?
ping
Changes added with lxdm-0.5.3