Registered Member
|
Hi, I recently changed my KDE version from 3.x to 4.2.2 (kubuntu). I am having a problem because the new KDE no longer has dcop, it now apparently uses dbus instead, which I am not knowledgeable about.
I have a script I use that opens a new session in the current konsole window, using a specified profile. Or it used to, when dcop was there. Now it doesn't work anymore. The relevant line is:
How can I do this using dbus? Thanks! |
Registered Member
|
You can use qdbusviewer as reference and qdbus in sustitution of dcop.
If you execute
works but when I try to pass parameters
execution fails with "Invalid number of parameters" error and I don't know why because this method supports "profile" and "directory" parameters. I really miss a lot dcop .
Last edited by Ignacio Serantes on Wed Jul 01, 2009 9:33 pm, edited 1 time in total.
|
Administrator
|
QDbus may not be evaluating it properly....
|
Registered Member
|
Well, I'm not sure what was the difference between your code and mine but the error was the same "Invalid number of parameters" Tested with KDE 4.3 Beta and RC using openSUSE official packages. |
Administrator
|
Try this instead... it seems to be a bug with QDBus.
|
Registered Member
|
Please excuse my ignorance of dbus... but so far none of these things work for me.
(returns nothing and nothing happens) If I just run "qdbus org.kde.konsole", it gives me a list of available objects. I do not see "/Konsole", only "/konsole", not sure if that makes a difference:
Also, I installed qdbusviewer, and used its interface to find the service 'org.kde.konsole'. I then went through all the dozens of methods and submethods it displayed... but I cannot see 'newSession' anywhere. Does anyone know why my system is not working right? I am using KDE 4.2.2 on the distribution Kubuntu. Is it still possible for me to get dbus to work with konsole? |
Registered Member
|
Probably, this method was not available in KDE 4.2.2 but is available in KDE 4.3. |
Registered Member
|
No errors but do nothing with openSUSE KDE 4.3 RC official packages. DCOP, my kingdom by DCOP . I reread your code and works with a minor change:
|
Registered Member
|
Hmm... well, it wouldn't be very convenient for me to switch to kde3 4.3, particularly since 4.2 is considered the stable version. So I guess I won't be able to use dbus until the next stable version of kde comes out?
In the meantime, is it possible for me to re-activate or install dcop on my current kde, so I can use the applications that depended on it? Does anyone know how to do this? |
Administrator
|
DCOP will be started automatically for applications that can use it. Only KDE 3 made use of DCOP I believe. Unfortunately, as a Kubuntu user you do not have that available ( although you could probably try to use the packages from 2 versions ago, but apt will likely not be too happy about this )
|
Registered Member
|
I've got most of this working, however I cannot get the /Sessions/# path working with dbus-send. Seems to work fine in qdbusviewer.. Any hints? I'm just copying and pasting the method from qdbus, so there isn't any easy typo explanation as far as I can tell. KDE 4.3.0.
Example failure:
|
Administrator
|
You cannot get the list of contents of a DBus objects provided path by using a method call. Try calling the "Introspect" method and provide the path as an argument to that.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks for the reply, however, I'm not sure what you're getting at. I'm simply calling a method, listed clearly as 'method' in the returned list from 'qdbus'. qdbus is really only returning the pretty print results from the xml returned by introspectable. See my quandry? |
Administrator
|
Oops, my mistake.
The problem is that you are missing the argument, "int role", which needs to specified in order to match the function call.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I had thought that too, but the error stays the same, regardless (specifying a role of '1' seems to work in qdbusviewer):
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell