Registered Member
|
I have a problem doing something in dbus that I used to do fine in dcop. From the command line in a tab of an instance of Konsole, I want to create a new tab/session and run a program there. If I use qdbus in the following manner:
qdbus org.kde.konsole /Konsole newSession then a new tab/session is created. However, if there are multiple instances of Konsole running, sometimes the new tab/session is created in an instance other than the one from which the command was issued. I do not want this. I want the new tab/session to always be created within the instance from which the command is issued. Is there some way to dictate that the new session needs to be on a particular instance? LBG |
Administrator
|
Unfortunately it appears that this isn't possible at this time. You may wish to file a feature request at bugs.kde.org.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
OK, I've entered this as bug 253833: https://bugs.kde.org/show_bug.cgi?id=253833 .
I've entered it as a bug, since I think the behavior I expected should be the default, and that creating a session on another konsole instance should require a deliberate action, perhaps through a different version of the method call newSession. |
Registered Member
|
Additional information:
The behavior I described is apparently due to konsole being a 'single-instance' application, which I assume means that all konsole instances and sessions are under the same process. Rather than separate actual instances, you may have multiple display instances, and the konsole dbus interface does not have a way to distinguish between those display instances. Hence, no direct control over which display instance a new session is created on. It appears that all sessions created via dbus will be placed on the first display instance of konsole. I have, however discovered a konsole command-line option the provides a workaround: create konsole with the --nofork option. This will cause all instances to be actual separate instance, rather then just display instances. Then, invocation of the dbus newSession method will result in the new session appearing on the same instance in which it was invoked. |
Registered Member
|
Yet more additional information:
When you launch a konsole instance with 'konsole --nofork', and you want to use dbus to create a new session in the new window, you need to choose the correct process. If you create a new session using qdbus, you might type qdbus org.kde.konsole /Konsole newSession However, that appears to use the default instance of konsole. However, if you type qdbus $KONSOLE_DBUS_SERVICE /Konsole newSession then the new session appears in the same instance as the command was entered. When konsoles are started without --nofork, then every session of every instance of konsole will have an identical value for KONSOLE_DBUS_SERVICE. If a konsole instance is launched with --nofork, then it and all contained sessions will have a different value for KONSOLE_DBUS_SERVICE than other instances. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell