Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370089 - x11-misc/slim session script doesn't work well with Xfce
Summary: x11-misc/slim session script doesn't work well with Xfce
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeremy Olexa (darkside) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 11:33 UTC by Vikraman (RETIRED)
Modified: 2011-08-16 02:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vikraman (RETIRED) gentoo-dev 2011-06-05 11:33:56 UTC
From the slim Xsession script :

# userresources and sysresources and all these other vars are
# unneeded here as by default the session script we're handing
# off to will take care of it.

This is not the case with Xfce since the Xfce4 session script only calls startxfce4. So, the resource variables are never set, and the xinitrc.d scripts are never run. Hence consolekit, policykit etc do not work as expected.

Reproducible: Always

Steps to Reproduce:
1. Install x11-misc/slim with xfce
2. Login to slim selecting Xfce4 session
3. Run ck-list-sessions
Actual Results:  
ck-list-sessions doesn't show active consolekit sessions, automounting, suspend, etc doesn't work

Expected Results:  
Consolekit, policykit works properly, automounting etc. works

% emerge -pv slim 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-misc/slim-1.3.2-r3  USE="branding pam" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-06-08 07:10:42 UTC
SLIM has no internal ConsoleKit support so you have to configure slim properly otherwise for the PAM module and ck-launch-session, something like this should work:

login_cmd exec ck-launch-session /bin/bash -login /usr/share/slim/Xsession %session

As in, you need to ensure the ck-launch-session gets executed early enough and the envvars it sets don't get lost in the process.

Thus I don't think this is really a bug, but a feature request for internal ConsoleKit support in SLIM, and this should have gone to SLIM's bugtracking system instead.  Although, that's propably waste of time as SLIM development is stopped...
Comment 2 Marius Brehler 2011-06-30 19:23:16 UTC
Samuli's post at http://forums.gentoo.org/viewtopic-t-858965.html describes how to get slim working with consolekit. The main thing is to add

  login_cmd             exec ck-launch-session startxfce4

to /etc/slim.conf and to remove the 'nox11' at /etc/pam.d/system-login form line

  session                optional        pam_ck_connector.so nox11

So it might be an idea to patch /etc/slim.conf. As Samuli already mentioned this isn't a real bug, but imho should be worked around by default.
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2011-07-04 17:59:56 UTC
I personally don't see this as a slim startup issue, but an Xfce4 session script issue..  This is what I did to add session support:

contents of file "/etc/X11/Sessions/Xfce4:"
#!/bin/sh
if [ -e `which ck-launch-session` ]; then
        exec ck-launch-session startxfce4
else
        exec startxfce4
fi

IIRC, session support isn't so much up to the DM as it is the DE; in this case it's Xfce4 that's delinquent IMO, not SLiM.
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2011-07-04 23:01:24 UTC
To this end, I think the best approach might instead be the implementation of bug #374065

Hopefully the desktop herd can decide and implement one of these.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2011-07-28 17:20:30 UTC
After further research and consultation, replacing slim's Xsession script with the updated one in attachment 218315 [details, diff] of bug 334111 is the most standardized solution; ck-launch-session if installed is handled via xinitrc.d script sourcing; which is how GDM and KDM do it.

Hopefully darkside will agree and have some time to commit the update fairly soon?
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-07-29 14:45:51 UTC
Ian, I trust your research here. I'll check it out next week.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-08-16 02:18:03 UTC
+*slim-1.3.2-r4 (16 Aug 2011)
+
+  16 Aug 2011; Jeremy Olexa <darkside@gentoo.org> +slim-1.3.2-r4.ebuild,
+  +files/Xsession-r2:
+  New Xsession script, bug 334111 by Ian Stakenvicius