SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[plugdev group mount override]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.eject-*
ResultAny=yes
ResultInactive=yes
Result=Active=yes
If user is in the 'plugdev' group then they can mount/unmount in Thunar whether they use startx to start fluxbox or start it from XDM.
@chess, I suspect you may only be treating the symptom there. For polkit authentication/authorisations to work correctly, dbus-launch must be run within the console-kit session environment. The current xinitrc files run dbus-launch prior to starting the console-kit session and this is actually what is breaking thunar. By changing the polkit rules you're avoiding this one problem, but the underlying issue still exists and may manifest with other programs that rely on dbus/polkit (maybe the nm-applet issue for example?)
Unfortunately trying to launch the window manager via an argument to dbus-launch breaks XDM authentication as we found out with the last approach, but
using blackbox as an example, I got thunar working with the following approach
xinitrc.blackbox:
Code:
#!/bin/sh
#
startscript=/usr/bin/startblackbox
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
[ -f $sysresources ] && xrdb -merge $sysresources
[ -f $sysmodmap ] && xmodmap $sysmodmap
[ -f $userresources ] && xrdb -merge $userresources
[ -f $usermodmap ] && xmodmap $usermodmap
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session $startscript
else
exec $startscript
fi
/usr/bin/statblackbox
Code:
#!/bin/sh
# startblackbox v1.0
# Start DBUS session bus
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval `/usr/bin/dbus-launch --sh-syntax --exit-with-session`
fi
# Start Window Manager
exec /usr/bin/blackbox
I've already emailed Pat a couple of times on this, and was waiting to see how he responds, but as you've posted on the same subject, I thought it prudent to post what I'd discovered.
@GazL: - yes, I've been hacking around at the dbus issue as well and also emailed Pat about it, along with these 2 posts I made here re: thunar and nm-applet fixes with polkit files.
But with these polkit files I have fluxbox and thunar and nm-applet working with Pat's .xinitrc/.xsession files whether I launch fluxbox from startx or XDM.
Still, I agree that these .xinitrc files still might need some massaging.
Ahh, ok chess. thanks. Sounds like the issue is well undertood now, so it's just a case of seeing what our BDFL decides to do.
BTW, while were on the subject of .xinitrc/.xsession, can I suggest an enhancement to xwmconfig so that it also creates a 755 ~/.xsession file in addition to the ~/.xinitrc so that XDM starts the chosen session as well as startx.
BTW, while were on the subject of .xinitrc/.xsession, can I suggest an enhancement to xwmconfig so that it also creates a 755 ~/.xsession file in addition to the ~/.xinitrc so that XDM starts the chosen session as well as startx.
Agreed - that would be nice. IIRC, I think the XDM config would also need to be modified to uncomment those lines re: a user's .xsession.
In addition to the commented out exec to ~/.xsession on line 109, there's also one further down on line 167, and that's the one that appears to do the actual starting - assuming that one doesn't manually choose a session from the XDM screen (which is unlikely since the only translation in the default Xresources file is for the failsafe session. )
The main gotcha with using a ~/.xsession is that /etc/X11/xdm/Xsession does a test -x ~/.xsession, so unlike ~/.xinitrc it needs +x permissions.
To be honest, /etc/X11/xdm/Xsession could stand a little work itself. I guess because KDM is the primary display manager in Slackware it hasn't been given much attention.
If "ck-launch-session" is successful it then sets the XDG_SESSION_COOKIE
environment variable which is inherited by all children processes.
...
As you point out, however, apps lacking PAM integration such as
"xinit" or "startx" need to manually start a ConsoleKit session. In
this respect "ck-launch-session" is definitely required and certainly
not deprecated. Unfortunately this tool starts a new user-shell
(bash,zsh, whatever) instead of exporting the XDG_SESSION_COOKIE to
the current shell.
You're welcome chess. Thanks for the polkit stuff too. I'm sure the nm-applet users will appreciate those, and I wouldn't have figured that out without having to do a lot of reading - assuming freedesktop.org have actually done any documentation (it was pretty sparse last time I went looking).
It's just a shame that the freedesktop.org stuff is so ugly that we need to jump through these hoops in the first place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.