[Interest] "Dynamic session lookup supported but failed"
Thiago Macieira
thiago.macieira at intel.com
Fri May 15 22:30:54 CEST 2015
On Friday 15 May 2015 22:09:48 René J.V. Bertin wrote:
> On Friday May 15 2015 12:22:05 Thiago Macieira wrote:
> > Nothing in cross-platform Qt should be using it directly. The only thing
> > that uses QtDBus directly is the XCB platform plugin (for the D-Bus menu
> > and app indicators).
>
> But that is the platform plugin used on Linux, and yet it doesn't complain
> when I start, say, Assistant without a session DBus?
By "without a session", do you mean in SSH without -X? Why would you want to
run a graphical application without a graphical server?
> > Put a breakpoint in dbus_bus_get and dbus_bus_get_private and see where
> > they got called from.
>
> dbus_bus_get doesn't get called, but:
>
[cut]
frame #7: 0x0000000104e73b16 QtDBus`QDBusConnection::sessionBus() + 70 at
qdbusconnection.cpp:1084
frame #8: 0x0000000104cfb003
libqxcb.dylib`DBusConnection::DBusConnection(this=0x0000000104b0d330,
parent=<unavailable>) + 131 at dbusconnection.cpp:61
You're using XCB. It expects X behaviour.
> > How did you start the daemon for that session?
>
> It gets started automatically through launchd.
>
> > Correct, it will complain that it can't autostart because you've got no X
>
> What is "it" here?
I was wrong. It would have complained if you had no X.
The problem here is that you *do* have X, so it didn't complain because it
found the session bus.
> Hmm, I usually do ssh -X or I set DISPLAY manually to avoid ssh tunnelling,
> and never get an automatic DBus launch when logged in remotely. Are you
> sure that autostart is done on all Linux distributions, regardless of the
> shell you use?
Yes. It's implemented inside dbus_bus_get_private, like you've just noticed.
It is not dependent on the shell you use.
> (I don't think ssh -X actually sets up an X connection other
> than for the auth handshake?)
It sets up a tunnel, which results in the same thing.
> Or is it a feature introduced in Qt 5.4?
No, X11 autostart is a feature I introduced some time in 2006 in D-Bus.
Probably version 0.62 or 0.90.
OS X autostart was introduced a year or two later, by one of the early KDE-on-
Mac maintainers.
> Either way, DBus on OS X doesn't look at X connections, to my knowledge.
Correct.
The mismatch here is that your D-Bus is looking at the Aqua connection, while
your Qt is looking at the X connection. You're seeing the problem because X is
working but Aqua isn't, under your SSH connection.
Other people haven't noticed this problem because they either get both
successful or both failing. If the display connection isn't working, then you
won't see the D-Bus error anyway.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list