change konsole tab name from the command line

D. Levi Durham levi.durham at
Sat Oct 29 06:19:45 BST 2005

On Friday 28 October 2005 18:53, Jorge Salamero Sanz wrote:
> hi all,
> it is possible to change the tab name in konsole from the shell running in
> it ? how ?
> thanks !
> ___________________________________________________
> This message is from the kde mailing list.
> Account management:
> Archives:
> More info:


Thats a really good question, one that I've thought of several times but never 
thought to look into. Turns out you can. To find it i ran: 

$ set|grep KONSOLE

This gives you a list of all environment variables that contain the 
"KONSOLE" (bash variable names are always all caps). Giving us the following 
two variables:


This of course is variables for the current konsole window and the current 
konsole session, respectively. Using the 'dcop' command we can then find out 
which methods are exposed via dcop for the current session:


Giving us this list of functions:

QCStringList interfaces()
QCStringList functions()
bool closeSession()
bool sendSignal(int signal)
void clearHistory()
void renameSession(QString name)
QString sessionName()
int sessionPID()
QString schema()
void setSchema(QString schema)
QString encoding()
void setEncoding(QString encoding)
QString keytab()
void setKeytab(QString keyboard)
QSize size()
void setSize(QSize size)

'renameSession(QString name)' looks right, so that translates to the command 

$ dcop $KONSOLE_DCOP_SESSION renameSession "New Name"

Where New Name is the name your wanting for that session. And, it works from 
shell scripts:

$ cat << END > renkonses
> #!/bin/bash
> dcop DCOPRef(konsole-22523,session-4) renameSession "$@"

$ renkonses "New Name"

However, don't ask me why two sets of quotation marks are necissary.

To find other fun things to do through dcop you can run kdcop from the 
mini-cli for a list of all dcop interfaces for all your currently running 
applications. One of my favorites is giving this command line in kalarm, 
"dcop amarok player play" to wake me up in the morning.

Hope this helps,

D. Levi Durham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>
-------------- next part --------------
This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list