This forum has been archived. All content is frozen. Please use KDE Discuss instead.

qdbus does not show the service org.kde.konsole

Tags: None
(comma "," separated)
dwisecup
Registered Member
Posts
4
Karma
0
I'm using the package kdebase-4.3.4-5.el6.x86_64.

If I run `qdbus` I see the following output:
:1.12
org.kde.klauncher
:1.13
org.kde.kded
:1.15
:1.19
org.kde.knotify
:1.21
:1.57
org.freedesktop.DBus

Should org.kde.konsole appear in this list? If so am I using a kdebase version which org.kde.konsole does not exist? I'm confused because I can use konsole by itself fine:

konsole -v
Qt: 4.6.2
KDE: 4.3.4 (KDE 4.3.4)
Konsole: 2.3.3

Any help would be appreciated.

--Dave
User avatar
Jekyll
KDE Developer
Posts
34
Karma
0
OS
Yes, it should appear in the result of `qdbus`. But it might be in the form of org.kde.konsole-<pid> instead of org.kde.konsole, depending upon how konsole is started(from menu or terminal). Other than that, I can't provide more help since KDE 4.3.4 is quite old.
dwisecup
Registered Member
Posts
4
Karma
0
Thanks Jekyll.

Kicking off konsole from the command line first with `konsole&` allows me to see the org.kde.konsole-<pid> with qdbus.

Thanks for your help.
dwisecup
Registered Member
Posts
4
Karma
0
Okay I have a new issue now. We have a queuing system which uses Sun's SGE grid engine. To make a long story short I have some perl code which forks off a bunch of konsole windows which then need to use qdbus to allow the user on the other end to interact with our prototypes. I've taken the same queue code which forks off the konsole command and ran it independently of our queuing system and got the following results from running qdbus:

:1.1098
org.kde.konsole-28126
:1.1100
:1.1101
:1.12
org.kde.klauncher
:1.13
org.kde.kded
:1.15
:1.19
org.kde.knotify
:1.21
org.freedesktop.DBus

This is good: no matter how many jobs run I can talk to this specific process: org.kde.konsole-28126.

The bad. I ran the same Perl code within the queuing infrastructure. Although, the konsole window pops up it's shown in this fashion when running qdbus:
:1.1102
org.kde.konsole
:1.1105
:1.1109
:1.12
org.kde.klauncher
:1.13
org.kde.kded
:1.15
:1.19
org.kde.knotify
:1.21
org.freedesktop.DBus


This is how the respective processes show up in `pstree -p`
|-konsole(15609)-+-csh(15631)
| |-csh(16065)
| |-csh(16199)
| `-{konsole}(15630)
|-konsole(17004)-+-bash(17022)
| `-{konsole}(17021)
|-konsole(17077)-+-bash(17192)
| `-{konsole}(17191)


Therefore org.kde.konsole can't be discerned from another instance of konsole by appending a PID.

Here is my question: How are theses two "paradigms" of konsole's existence (as viewed by qdbus different) different? What would cause konsole to be executed in this manner when the syntax, code, and machine is exactly the same? The only thing I can guess is that it has to be something with the environment variables being different for the queuing system. I compared the two, but nothing stood out. I even ran `which konsole` and `which dbus-launch` before the queue executed the konsole command, but the binaries it used were the same. The code was run under bash and csh same results. I could provide the env vars which are set, but there is some info on there I don't want the whole world to know ;).

Another question: If I wanted konsole to show up under qdbus as it does in the second example (w/o the -pid) what would I need to do from a terminal.

Thanks in advance.
dwisecup
Registered Member
Posts
4
Karma
0
konsole needs STDOUT to be pointing to some tty device. When you fork off a process instead of pointing STDOUT to /dev/null do this:

close STDOUT;
open STDOUT '>:encoding(utf8)', '/dev/tty';
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Interesting, I would not have expected that behaviour.
My guess is that is more of a DBus behaviour rather than a Konsole specific behaviour.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell