Konsole feature question (would it be feasible for me to do?) + bug report (is it a trivial fix?)
Mariusz Glebocki
mglb at arccos-1.net
Fri Oct 25 17:32:37 BST 2019
Hi,
That's a bit unusual way to use env variable (i.e. child → parent
communication). Consider what happens when you:
* start a program which clears its own environment,
* start a program as root (no permissions to read environment),
* want to implement title changing in some subprocess/script (it won't be
kept after program exit).
I think your problem can be solved with setTabTitleFormat DBus method from
Session interface. Pass 0 as context argument to set local tab format.
Example:
# qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION \
setTabTitleFormat 0 "%d (%n) $KONSOLE_TITLE_VAR"
You can call it from any program - you just need to know session ID and
Konsole DBus service (or Konsole PID).
Since this can be considered a hack (it overwrites tab title format set in
GUI), you can implement new "role" in setTitle DBus method and title format
variable for inserting it. This way you won't mess with already set title
format and standard window title set by programs won't replace it.
// Mariusz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20191025/b1885c0c/attachment.html>
More information about the konsole-devel
mailing list