[Interest] "Dynamic session lookup supported but failed"

René J.V. Bertin rjvbertin at gmail.com
Fri May 15 23:34:09 CEST 2015


On Friday May 15 2015 13:30:54 Thiago Macieira wrote:

> > 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?

I said "without a session DBUS". That's not the same thing. That just means that no dbus daemon was started to serve the current session.
And again, you can SSH in without -X and then set DISPLAY to the direct address of your screen, just like one did in the telnet days. As long as DISPLAY is set to a valid X server, graphical applications will run.

> libqxcb.dylib`DBusConnection::DBusConnection(this=0x0000000104b0d330, 
> parent=<unavailable>) + 131 at dbusconnection.cpp:61
>    
> You're using XCB. It expects X behaviour.

Yes, I am. But X and DBus are 2 separate things. If it were "X behaviour" to have a session DBus when starting an application, I should see the error under Linux too when there is no session DBus.


> > 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.

Again, what is "it"? And once more, there is no session bus to be found in the context I'm talking about ...

> No, X11 autostart is a feature I introduced some time in 2006 in D-Bus. 
> Probably version 0.62 or 0.90.

In the Qt interface to DBus I presume? The dbus-daemon process that provides the actual DBus cannot start itself after all...
What I don't understand then is why KDE4 and KF5 applications (from Ubuntu 14.04) complain about a missing dbus when I launch them over ssh, and tell me to do `eval dbus-launch` by hand. 

> 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.

Hmmm, so what you're saying is that QtDBus tries to create a DBus session, and then prints an error message that suggests it only tried to find an existing session? And that I don't get the error when I launch the same application under SSH on a Linux box because a DBus session is created silently and successfully (and aborted when I stop the application)?


> 
> Other people haven't noticed this problem because they either get both 
> successful or both failing.

Actually, I think very few people have tried to use the xcb plugin on OS X, and Qt4 hasn't built for X11 on OS X since quite a few (minor) versions (MacPorts says 4.4.3 but I think Fink has a somewhat later version).

> If the display connection isn't working, then you 
> won't see the D-Bus error anyway.

With Aqua, with X it's another matter. The (remote) terminal is independent from the display connection.
Which makes me realise: when I mention ssh connections/sessions, I mean that I type `slogin [-X] host` or `ssh -Xf host command` in a terminal. Not something involving a remote graphical login screen taking over my whole local X server ...

R.



More information about the Interest mailing list