You are not logged in.
This all started with trying to figure out why Thunar can't automount, but my suspicion is that the underlying cause is that something is screwed up with dbus on my system. I keep running into problems that all end up tracing back to something dbus-related, so I'd like to figure out the root of the issue once and for all.
Here's what I have figured out so far: after boot, $DBUS_SESSION_BUS_ADDRESS is set, but $DBUS_SESSION_BUS_PID is not, and Thunar cannot automount. If I run this:
eval $(dbus-launch --sh-syntax --exit-with-session)
Then both of those vars are set, and Thunar can automount.
So what's going on, exactly? Are the details I've gathered relevant? It seems like dbus isn't starting fully the first time...? It should be starting on boot via this rule (which gets loaded from my .xinitrc):
/etc/X11/xinit/xinitrc.d/30-dbus:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && type dbus-launch >/dev/null; then
eval $(dbus-launch --sh-syntax --exit-with-session)
fi
Offline
Do you have an active login session? How do youn login? What WM/DE are you using? Why do you have the 30-dbus rule: what problem is it trying to solve?
Offline
Why do you have the 30-dbus rule: what problem is it trying to solve?
As far as I know, that rule was just put there by some package - I don't think I ever added or edited it manually.
Do you have an active login session? How do youn login? What WM/DE are you using?
I'm using XFCE. Automatically logged in by SLiM. Not sure what an "active login session" means - like am I logged in when I check this? Yeah, it's all within my normal XFCE desktop session - opening shells and running Thunar from there.
Offline
You can check your session with:
loginctl show-session $XDG_SESSION_ID
I don't have that, or any, dbus rules and automounting works fine (with no session bus PID).
Offline
I should also mention that my .xinitrc, to start XFCE, has simply
exec startxfce4
I've seen other threads where people prepend that with `dbus-launch`, but I figure if dbus is already being started elsewhere, I probably shouldn't hack my way out of this by forcing it to start twice.
Offline
So, is your login session working (active), or not?
Offline
the script '/etc/X11/xinit/xinitrc.d/30-dbus' is not automatically launched by .xinitrc ;
you need to use the model in '/etc/skel/.xinitrc' by copying it in place of your present .xinitrc and uncommenting the line to run xfce4.
Offline
So, is your login session working (active), or not?
Yeah, it logs me in just fine.
the script '/etc/X11/xinit/xinitrc.d/30-dbus' is not automatically launched by .xinitrc ;
you need to use the model in '/etc/skel/.xinitrc' by copying it in place of your present .xinitrc and uncommenting the line to run xfce4.
Yes, I'm doing so. I've now also started recording what's going on and I can see that my xinitrc is running this rule and it is setting $DBUS_SESSION_BUS_ADDRESS (though not, for some reason, $DBUS_SESSION_BUS_PID). Here's my full .xinitrc for posterity:
#!/bin/sh
echo "$DBUS_SESSION_BUS_ADDRESS" >> ~/junk # This one is blank
# Source scripts in /etc/X11/xinit/xinitrc.d/
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
echo "$DBUS_SESSION_BUS_ADDRESS" >> ~/junk # This one has an address
setxkbmap -option compose:rwin
exec startxfce4
Offline
jasonwryan wrote:So, is your login session working (active), or not?
Yeah, it logs me in just fine.
Sigh. What is the output of the one-liner I posted? Do you have an active session, or not?
Offline
Sigh. What is the output of the one-liner I posted? Do you have an active session, or not?
Sorry, I somehow overlooked that part of your post, my mistake.
$ loginctl show-session $XDG_SESSION_ID
Id=1
Timestamp=Fri 2014-02-07 12:33:58 PST
TimestampMonotonic=11779859
VTNr=7
Display=:0.0
Remote=no
RemoteUser=root
Service=slim
Scope=session-1.scope
Leader=482
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
Name=youngian
Offline
So, with an active session, remove the dbus rule and use udisk{s,ie} to handle automounting and you are done.
Offline
So, with an active session, remove the dbus rule and use udisk{s,ie} to handle automounting and you are done.
It's not a rule, it's a script and it's the usual way of starting dbus.
Offline
jasonwryan wrote:So, with an active session, remove the dbus rule and use udisk{s,ie} to handle automounting and you are done.
It's not a rule, it's a script and it's the usual way of starting dbus.
Usual? Really? I've never encountered it (which doesn't mean I don't believe you, I'm just surprised that none of my systems have it and they all work fine).
Brain fart. Disregard; I thought the OP had that script somewhere else entirely.
Last edited by jasonwryan (2014-02-07 22:46:50)
Offline
Thanks for your work so far, folks. I can probably get some sort of workaround in place with udiskie if I'm desperate, but I'm still hoping I can get to the root of this problem. Of course, if I'm starting dbus the correct way, I'm not sure where that leaves me.
I did notice one other bit of quirky behavior: I mentioned earlier that I can run `eval $(dbus-launch --sh-syntax --exit-with-session)` manually in a shell, and then start Thunar from that shell and have automounting. I just noticed, however, that when I do that automounting appears but the Trash option in the left sidebar "Places" list disappears. Which sorta brings me back to my initial complaint - I suspect there is something haywire about my dbus, and I'm sick of trying to patch up the symptoms, but I don't understand anything about how dbus works well enough to troubleshoot it very well.
Offline
Giving this a bump to get some eyes on it. I would love any advice on what might be causing this, or what dbus has to do with any of this.
Offline