othermark ([info]othermark) wrote,
@ 2006-08-09 14:36:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
command line new tabs in konqueror
The following is a simple shell script using the KDE dcop client to open new tabs in konqueror (or a new instance of konqueror if it's not running). I use this from pine's url-viewers setting to launch new tabs with a url contained in a email.

#!/bin/sh

KONQ_WIN=`dcop konq* | head -1`

if [ "$KONQ_WIN" = "" ]; then
    /usr/local/bin/konqueror $1 &
else
    NEW_TAB=`dcop $KONQ_WIN konqueror-mainwindow#1 action newtab`
    dcop $NEW_TAB activate
    dcop $KONQ_WIN konqueror-mainwindow#1 openURL $1
fi
return 0



(Post a new comment)

and this is what i use for firefox:
[info]node
2006-08-09 04:21 pm UTC (link)

#!/bin/sh

/usr/bin/firefox -remote "openURL($@,new-tab)"

(Reply to this)


[info]feuerbach
2006-10-17 12:12 pm UTC (link)
Nice, thank you!

(Reply to this)

by the way
[info]feuerbach
2006-12-26 03:09 pm UTC (link)
You probably should quote that asterisk after konq, to prevent it from shell expansion.

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…