Update on Controlling Konsole via DBUS
Recently I wrote about controlling konsole with dbus. As I've begun to use that script for setting up my konsoles I, like others, have discovered that the tab title that you set with dbus doesn't stick. This short note shows you a workaround to make your tab titles stay put.
Even though I wrote the original post a few weeks back I didn't realize that I had a problem until now because I just this weekend upgraded the system that I use most often. Plus, apparently, I already discovered the workaround on my other system and proceeded to immediately forget about it as it took me a fair amount of fiddling to figure it out (again) today.
Before I actually (re)-discovered the workaround I did a bit of looking through the konsole code and noticed that konsole has two types of tab titles: one that's set with the function setTitle() and another that's set with the function setUserTitle(). If you don't set the one that's set with setUserTitle() then the tab title changes back to the default when you use the session. The problem is that the dbus interface allows you to call setTitle() but it does not allow you to call setUserTitle().
You can invoke setUserTitle() using konsole's menu via: Edit->Rename Tab or from the keyboard with Ctrl-Alt-S. If you set the (user) title that way you'll see that it now sticks. But that's not the workaround, since we're trying to control konsole via dbus going through and manually setting all the tab titles via the keyboard or mouse doesn't constitute a workaround.
The actual workaround on the other hand isn't without its flaws either: it requires you to change the shell profile, which means that since starting a session with a specified profile via dbus doesn't work yet, you can't have both behaviors at the same time.
After that long-winded prolog, the workaround is quite simple: using konsole's menu do: Settings->Edit Current Profile..., go to the Tabs tab and clear both the Tab title format and the Remote tab title format fields.
This works because konsole doesn't reset the tab title if there is no default value to set it to.
Mitch Frazier is an Associate Editor for Linux Journal.
- Readers' Choice Awards 2013
- A Plexible Pi
- Linux Kernel News - November 2013
- Advanced Hard Drive Caching Techniques
- Sublime Text: One Editor to Rule Them All?
- Mars Needs Women
- Raspberry Pi: the Perfect Home Server
- Tech Tip: Really Simple HTTP Server with Python
- December 2013 Issue of Linux Journal: Readers' Choice
- RSS Feeds
- Reply to comment | Linux Journal
18 min 11 sec ago
- rilakkuma onesie
2 hours 54 min ago
- flying squirrel onesie
2 hours 56 min ago
- animal onesies for adults
2 hours 58 min ago
- animal onesies
2 hours 59 min ago
- stitch onesie
3 hours 10 sec ago
- totoro onesie
3 hours 1 min ago
- dinosaur onesie
3 hours 5 min ago
- pikachu onesie
3 hours 9 min ago
- While copy.com is nice, it's
8 hours 11 min ago