Created attachment 392320 [details, diff] Xsession patch If Xsession is modified as follows: --- Xsession.org 2014-12-24 14:42:48.790216892 +0100 +++ Xsession 2014-12-24 14:43:52.604488176 +0100 @@ -41,6 +41,9 @@ 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 @@ -66,4 +69,4 @@ echo "X session wrapper complete, running session $@" -exec $@ +exec $command dbus-lanch will start the session as recomended. See /etc/X11/xinit/xinitrc.d/80-dbus (Patch attached as well)
I don't see what "Make DBUS start optimally" means.
This makes dbus-launch start yoru X session like dbus-launch --exit-with-session gnome-session instead of just dbus-launch --sh-syntax --exit-with-session which less preferred according to "man dbus-launch"
Such patches should be discussed with upstream
How du you figure that? Xsession is a Gentoo adaptaion.
How do you know that? In what Xsession file are you referring to? ~ $ qlist lightdm|grep Xsession /etc/lightdm/Xsession I am referring to this one
(In reply to Markos Chandras from comment #5) > How do you know that? In what Xsession file are you referring to? > > ~ $ qlist lightdm|grep Xsession > /etc/lightdm/Xsession > > I am referring to this one Me too, this file is Gentoo made and is copied from the lightdm's files/Xsession BTW, I Googled "dbus-launch xsession" and every relevant hit starts dbus-launch like I suggest.
(In reply to Joakim Tjernlund from comment #6) > (In reply to Markos Chandras from comment #5) > > How do you know that? In what Xsession file are you referring to? > > > > ~ $ qlist lightdm|grep Xsession > > /etc/lightdm/Xsession > > > > I am referring to this one > > Me too, this file is Gentoo made and is copied from the lightdm's > files/Xsession > > BTW, I Googled "dbus-launch xsession" and every relevant hit > starts dbus-launch like I suggest. Had a look at gdm too and it has in its Xsession.in: command="$@" Note the "", perhaps add these, just to be safe?
(In reply to Joakim Tjernlund from comment #6) > (In reply to Markos Chandras from comment #5) > > How do you know that? In what Xsession file are you referring to? > > > > ~ $ qlist lightdm|grep Xsession > > /etc/lightdm/Xsession > > > > I am referring to this one > > Me too, this file is Gentoo made and is copied from the lightdm's > files/Xsession ok i see what you mean now
(In reply to Joakim Tjernlund from comment #0) > Created attachment 392320 [details, diff] [details, diff] > Xsession patch > > If Xsession is modified as follows: > --- Xsession.org 2014-12-24 14:42:48.790216892 +0100 > +++ Xsession 2014-12-24 14:43:52.604488176 +0100 > @@ -41,6 +41,9 @@ > > 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 > @@ -66,4 +69,4 @@ > > echo "X session wrapper complete, running session $@" > > -exec $@ > +exec $command > > dbus-lanch will start the session as recomended. > See /etc/X11/xinit/xinitrc.d/80-dbus > > (Patch attached as well) I don't understand your patch. You preserved the arguments in the command variable, and you use that later on in the exec. Why would you do that? Nothing seems to mess with the input arguments. Can you explain the sequence you see in your system that is failing and how your patch is fixing it?
(In reply to Markos Chandras from comment #9) > (In reply to Joakim Tjernlund from comment #0) > > Created attachment 392320 [details, diff] [details, diff] [details, diff] > > Xsession patch > > > > If Xsession is modified as follows: > > --- Xsession.org 2014-12-24 14:42:48.790216892 +0100 > > +++ Xsession 2014-12-24 14:43:52.604488176 +0100 > > @@ -41,6 +41,9 @@ > > > > 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 > > @@ -66,4 +69,4 @@ > > > > echo "X session wrapper complete, running session $@" > > > > -exec $@ > > +exec $command > > > > dbus-lanch will start the session as recomended. > > See /etc/X11/xinit/xinitrc.d/80-dbus > > > > (Patch attached as well) > > I don't understand your patch. You preserved the arguments in the command > variable, and you use that later on in the exec. Why would you do that? > Nothing seems to mess with the input arguments. Can you explain the sequence > you see in your system that is failing and how your patch is fixing it? ahh, see /etc/X11/xinit/xinitrc.d/80-dbus #!/bin/bash # launches a session dbus instance dbuslaunch="`which dbus-launch 2>/dev/null`" if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then if [ -n "$command" ]; then command="$dbuslaunch --exit-with-session $command" else eval `$dbuslaunch --sh-syntax --exit-with-session` fi fi
+ 12 Jan 2015; Markos Chandras <hwoarang@gentoo.org> files/Xsession: + Pass Xsession arguments to xinitrc.d/80-dbus. Bug #533456. Thanks to Joakim + Tjernlund <Joakim.Tjernlund@transmode.se> for the patch +
Markos, the patch (as of rev 1.2 of files/Xsession) is broken. By doing exec "$command" you’re trying to launch a process named “dbus-launch --exit-with-session gnome-session”, which of course does not exist, so the exec fails with “path not found” and brings you directly back to the greeter. The exec statement as suggested by Joakim, on the other hand, works: exec $command by letting the shell split $command appropriately. As a side note, shouldn’t this change warrant a -r1 bump? I was very confused when I run into this error (unable to login due to the broken exec call) on a machine I setup yesterday, but the very same version of lightdm was working just fine on two other machines, and cost me a lot of wasted time inspecting configs and reinstalling packages.
(In reply to Raffaello D. Di Napoli from comment #12) > Markos, the patch (as of rev 1.2 of files/Xsession) is broken. By doing > > exec "$command" > > you’re trying to launch a process named “dbus-launch --exit-with-session > gnome-session”, which of course does not exist, so the exec fails with “path > not found” and brings you directly back to the greeter. > The exec statement as suggested by Joakim, on the other hand, works: > > exec $command > > by letting the shell split $command appropriately. > > As a side note, shouldn’t this change warrant a -r1 bump? I was very > confused when I run into this error (unable to login due to the broken exec > call) on a machine I setup yesterday, but the very same version of lightdm > was working just fine on two other machines, and cost me a lot of wasted > time inspecting configs and reinstalling packages. Thanks. Fixed. Well i'd rather not revbump anything at the moment. hopefully only a minimal number of users will be affected.