Powerline secrets

You know that XKCD comic where the protagonist googles a tech question and the only matching result is from a long dead thread or even forum that details the issue but provides no answers? I am wondering if other people sometimes happen on the subcategory of that where the thread originator instead of being DenverCoder9 is… yourself. Instead of “closeness to another soul”, it just engenders a slight disappointment. Right, I’ve been here before, trying the same thing and given up.

Trying to customize my powerline setup raised a number of questions that I could not find answers to in the official documentation, including the question of whether root’s bash prompt could be coloured anything other than fire engine red. Luckily I found answers to all of these this time round.


No Title: Working around the missing –title parameter in Gnome Terminal

About a year ago the Gnome developers took away the option to run Gnome terminal with the –title parameter. This allowed you to give the terminal window a custom name like ‘SSH@MYBOX’ or ‘myProject’ instead of just ‘Terminal’. Why did they do that? I don’t know. It seems to just be what Gnome developers do these days.

If you prefer separate terminal windows for separate tasks, naming those windows is a nice way to tell them apart. This applies to general orientation (i.e. looking at the windows in the Activities overview and deciding which one to click on) and for scripting purposes (i.e. writing a script targets windows by title).

For me personally this latter option is the more important. I have a local terminal and a remote terminal and I would like be able to access either quickly and easily with a simple keyboard shortcut rather than mucking about with tabs. Here I will detail a way to accomplish that without the missing –title parameter.


Decrypting drives using the command line

Encrypted USB drives are fairly easy to use on most linux desktops. Whatever automount supplier you’re running with will pop up a dialogue window asking for the password to decrypt. But what if you want to use the terminal?

The use case for this is my server/HTPC which has a backup drive permanently attached to it. In order to have some offline backup as well, I want to plug in an encrypted USB pen drive and sync the contents of the backup drive to it. Having physical access but not a very good means of interacting with the desktop (I have bluetooth keyboard in a drawer but at hand the only thing is a controller…) is somewhat unusual so it took me some time to figure this out.