Vizible’s Blog

DBus-Konsole

Posted in Programming by wearetherock on January 19, 2009

Open konsole.

# konsole

List D-Bus method

# qdbus org.kde.konsole /konsole/MainWindow_1

Coding

# konsole.py

import dbus;
bus = dbus.SessionBus()
obj = bus.get_object(“org.kde.konsole”,”/konsole/MainWindow_1″)

# set window title
konsole = dbus.Interface(obj, “com.trilltech.Qt.QWidget”)
konsole.setWindowTitle(“just test”)

# open new tab
nkonsole = dbus.Interface(obj, “org.kde.KMainWindow”)
nkonsole.activateAction(“new-tab”)

Commit to Snow-Day Stay-Home

# svn add konsole.py
# svn commit

Advertisements
Tagged with: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: