Reply to topic

Open new tab in existing Konqueror from command line

mikmach
Registered Member
Posts
19
Karma
0
OS
Hello,

One of problems with Konq is long standing wish to open new tab in existing Konq session from anywhere (at the moment it works only for current desktop).

Fortunately you can do it with dbus:

Code: Select all
qdbus `qdbus | grep konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.newTab  0


mikmach, proud to be a member of KDE forums since 2008-Dec.
Mikro
Registered Member
Posts
1
Karma
0
OS
Thanks a lot, I was looking for this and shocked when found no dcop at new KDE4, but this returns "wrong number of arguments"; it should be

Code: Select all
qdbus `qdbus | grep konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.newTab <url-you-want-to-open> False


at least for KDE 4.2.4, as parameters are URL (qstring) and tempFile (bool)

By the way, anyone knows what this tempFile is used for?


Also, this will fail if found more than one konqueror window, so you could use

Code: Select all
qdbus `qdbus | grep -m1 konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.newTab '' False


to get only the first one.

Dån
rysson
Registered Member
Posts
1
Karma
0
OS
Hi,

By the way, anyone knows what this tempFile is used for?


If tempFile is true, file is removed on tab close.

Try:
Code: Select all
echo Hello > /tmp/hello
qdbus `qdbus | grep -m1 konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.newTab '/tmp/hello' True

 
Reply to topic

Bookmarks



Who is online

Registered users: Alexa [Bot], andreaaxx, Baidu [Spider], Bing [Bot], carlitosh, Google [Bot], Mamarok, Sam Illingworth, Yahoo [Bot]