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.
|Where's That Pesky Hidden Word?||Aug 28, 2015|
|A Project to Guarantee Better Security for Open-Source Projects||Aug 27, 2015|
|Concerning Containers' Connections: on Docker Networking||Aug 26, 2015|
|My Network Go-Bag||Aug 24, 2015|
|Doing Astronomy with Python||Aug 19, 2015|
|Build a “Virtual SuperComputer” with Process Virtualization||Aug 18, 2015|
- Concerning Containers' Connections: on Docker Networking
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- A Project to Guarantee Better Security for Open-Source Projects
- Where's That Pesky Hidden Word?
- Firefox Security Exploit Targets Linux Users and Web Developers
- My Network Go-Bag
- Doing Astronomy with Python
- Three More Lessons
- Build a “Virtual SuperComputer” with Process Virtualization
- diff -u: What's New in Kernel Development