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 ! > ___________________________________________________ > . > Account management: https://mail.kde.org/mailman/listinfo/kde. > Archives: http://lists.kde.org/. > More info: http://www.kde.org/faq.html. Jorge, 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: KONSOLE_DCOP='DCOPRef(konsole-22523,konsole)' KONSOLE_DCOP_SESSION='DCOPRef(konsole-22523,session-4)' 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: $ dcop $KONSOLE_DCOP_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 line: $ 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 "$@" > > END $ 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 www.levidurham.com levi_AT_levidurham_DOT_COM
Attachment:
pgpBte76sG4hM.pgp
Description: PGP signature
___________________________________________________ . Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.