The /etc/X11/Sessions/Xsession distributed with x11-apps/xinit completely ignores any session passed to it other than 'failsafe': case $# in 1) case $1 in failsafe) exec xterm -geometry 80x24-0-0 ;; esac esac This results in failure to start a session selected by a login manager, and instead considers only entries in $HOME/.Xclients and /etc/X11/xinit/Xclients (which doesn't exist). Reproducible: Always
Created attachment 216569 [details] Xsession from KDM I am attaching the Xsession file used by KDM, which correctly checks for the session passed by the login manager.
I should note that I am running x11-apps/xinit-1.0.8-r10
Created attachment 217090 [details] Patched gentoo's Xsession Alternatively, one can patch gentoo's Xsession file to handle sessions in /usr/share/xsessions. The file is attached. Following are the changes I made: /etc/X11> diff -u Sessions/Xsession Xsession --- Sessions/Xsession 2009-12-24 15:23:37.000000000 -0500 +++ Xsession 2010-01-15 10:16:32.766354105 -0500 @@ -7,6 +7,7 @@ failsafe) exec xterm -geometry 80x24-0-0 ;; + *) session="$1";; esac esac @@ -94,7 +95,9 @@ unset XKB_IN_USE -if [ -x "$startup" ]; then +if [ -f "$session" ]; then + eval exec "$session" +elif [ -x "$startup" ]; then exec "$startup" elif [ -x "$HOME/.Xclients" ]; then exec "$HOME/.Xclients"
(In reply to comment #3) > Alternatively, one can patch gentoo's Xsession file to handle sessions in > /usr/share/xsessions. Probably missing something here, but I don't see how this if [ -f "$session" ]; then eval exec "$session" handles stuff in /usr/share/xsessions; the only thing it produces here it trying to exec $session as a command directly (which naturally fails)
(In reply to comment #4) > (In reply to comment #3) > > Alternatively, one can patch gentoo's Xsession file to handle sessions in > > /usr/share/xsessions. > > Probably missing something here, but I don't see how this > > if [ -f "$session" ]; then > eval exec "$session" > > handles stuff in /usr/share/xsessions; the only thing it produces here it > trying to exec $session as a command directly (which naturally fails) It seems I was not in the CC list and never got any notification. This line is taken directly from the kdmrc file. It used to work earlier and going by the kdmrc file (see the one attached in this bug report) kdm itself runs something like that. I am not sure if it still works since I am using slim nowadays (and the configuration for that is different).
Suggestions welcome (patches).
This bug is pretty ancient at this point, and I'm not sure I understand it. If someone is still interested, please reopen.
I would like to reopen this bug since solving it would be usefull for tigervnc package (bug #746227), but I cannot figure how to do. Could someone reopen it or shall I open a new one?
(In reply to Roberto Castagnola from comment #8) > I would like to reopen this bug since solving it would be usefull for > tigervnc package (bug #746227), but I cannot figure how to do. > Could someone reopen it or shall I open a new one? Reopened. Please provide a patch that resolves the bug for you.
Created attachment 677239 [details, diff] Add use of chooser.sh script to manage arguments passed to it Signed-off-by: Roberto Castagnola <roberto.castagnola@gmail.com> It depends on bug #412003 It also takes care of xinitrc.d scripts (as done by Xsession scripts provided by other display managers, such as sddm)
Xsession script look like more a wrapper script than a session script, so I wonder if it should be moved elsewhere (for example in /etc/X11/xinit as other linux distribution). Further, if my patch provided for bug #412003 is accepted, I wonder if we can drop the use of folder /etc/X11/Sessions in favour of more standard folder /usr/share/xsessions. Looking to gentoo ebuilds I have seen that almost all of them are already providing both .desktop (in /usr/share/xsessions/) and script (in /etc/X11/Sessions/) files.
This look like a good effort to make VNC server sessions work properly. Nice it it could acted upon
(In reply to Joakim Tjernlund from comment #12) > This look like a good effort to make VNC server sessions work properly. > Nice it it could acted upon Indeed. Did you put a vote in?
(In reply to Alexander Wessel from comment #13) > (In reply to Joakim Tjernlund from comment #12) > > This look like a good effort to make VNC server sessions work properly. > > Nice it it could acted upon > > Indeed. Did you put a vote in? I voted with my feet and fixed tigervnc upstream to build its xorg module against latest xorg-server a little while ago.