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

Konsole, DCOP to DBUS migration

Tags: konsole konsole konsole
(comma "," separated)
User avatar
mkyral
Registered Member
Posts
16
Karma
0
OS

Konsole, DCOP to DBUS migration

Wed Dec 03, 2008 8:16 pm
Hi,
I'm trying to convert my konsole3 DCOP script to konsole4 DBUS, but I'm a little bit confused.

Code: Select all
session=$(dcop $kon konsole newSession)

sleep 1
dcop $kon $session setKeytab ${SSH_KEYMAP:=$SSH_TERM}
dcop $kon $session sendSession "clear"
dcop $kon $session sendSession "export TERM=$SSH_TERM"
dcop $kon $session setEncoding "$SSH_CHARSET"
dcop $kon $session sendSession "ssh ${SSH_USER}@${SSH_IP} -p ${SSH_PORT}"
dcop $kon $session renameSession ${SSH_USER}@${SSH_LABEL}


There is no newSession in /konsole or /Sessions. I only found:
Code: Select all
qdbus org.kde.konsole /konsole/MainWindow_1  activateAction new-tab

But this is not the same - it doesn't return the opened session.

I also don't know, how to get the list of properties for the Get and Set methods:

Code: Select all
$ qdbus $KONSOLE_DBUS_SERVICE /Sessions/2
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()


Is there any documentation for it? Or tutorial for DCOP2DBUS migration? I've found nothing usable on google :-(


mkyral, proud to be a member of KDE forums since 2008-Dec.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 6:52 am
You manipulate a property like so ( note that you need a property to be present )
Code: Select all
qdbus org.kde.konsole /konsole/MainWindow_1/actions org.freedesktop.DBus.Properties.Get org.kde.konsole.KActionCollection configIsGlobal


Or basically: qdbus + application dbus url + path to property + org.freedesktop.DBus.Properties.Get + everything before the last dot + everything after the last dot

A new session is probably now called a new tab, however for some reason they appear under /Sessions. unfortunately it appears no D-Bus interfaces have yet been created so you can't interact with the Tabs / Sessions.

I would use Profiles as a workaround for now.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
mkyral
Registered Member
Posts
16
Karma
0
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 8:51 am
bcooksley wrote:You manipulate a property like so ( note that you need a property to be present )


Thanks, I'll try. The only problem is the list of correct properties :-(

bcooksley wrote:A new session is probably now called a new tab, however for some reason they appear under /Sessions. unfortunately it appears no D-Bus interfaces have yet been created so you can't interact with the Tabs / Sessions.

Well, probably I need to create bug report for it. And start to hack konsole ;-)

bcooksley wrote:I would use Profiles as a workaround for now.


You mean to have one profile for each combination of possible parameters? Or for each server?
It is a really workaround. I need a possibility to rename tab at least.


mkyral, proud to be a member of KDE forums since 2008-Dec.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 8:57 am
The problem is, there is no properties, otherwise they would be listed there :-(

you could have a script that asks for the variables you need run using one profile alone, I do not know the ability of Konsole to dynamically set the tab name, but something should be possible.

That however is really a workaround that does not offer full functionality, I think your only option to get everything you need will be to hack on Konsole, and send the patches in when trunk opens back up for features ( sometime in January )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
mkyral
Registered Member
Posts
16
Karma
0
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 11:32 am
Well, that's are bad news for me :-(


mkyral, proud to be a member of KDE forums since 2008-Dec.
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 11:39 am
I asked the current Konsole maintainer via private mail and he wrote that unfortunately he hadn't had enough time yet to fully port the scripting facilities to D-Bus yet.

However he thinks this should be fairly easy and that there seem to be a group of students interested in working on that as he as seen respective discussion going on the konsole-devel mailinglist.

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
User avatar
mkyral
Registered Member
Posts
16
Karma
0
OS

RE: Konsole, DCOP to DBUS migration

Thu Dec 04, 2008 1:09 pm
anda_skoa wrote:I asked the current Konsole maintainer via private mail and he wrote that unfortunately he hadn't had enough time yet to fully port the scripting facilities to D-Bus yet.

However he thinks this should be fairly easy and that there seem to be a group of students interested in working on that as he as seen respective discussion going on the konsole-devel mailinglist.

Cheers,
_


Thanks, looks better now. I'll monitor the maillist.


mkyral, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]