Blog

LastPass Dmenu popup menu

A faster LastPass lookup for your Linux desktop

At work we noticed how the LastPass plugin on the new Firefox Quantum (due to limitations of the new plugin architecture?) no longer has copy a “Copy Password” button. LastPass support suggested that this might not be changing anytime soon. We rely on this a lot for different terminal-based work, so it was a sad revelation.

This bothered me enough that I made my own LastPass popup thing for my Linux desktop and as a bonus the workflow is also much faster than it was in the browser.

LastPass dmenu desktop popup menu gif

https://github.com/cspeterson/dotfiles/blob/master/.bin/lastpass-dmenu

Here is the code in case I move the file or something and forget to update this post:

Documentation for the script is in the file, but here is exactly what install could look like on Ubuntu, for example

And then run it there(no) or bind it to a hotkey(yes) in your window manager/whatever (I think this is under Keyboard settings in e.g. Gnome?).

When the menu pops up, just start typing the entry you want. It searches through both entry Name and Username. Whichever entry you select in the dmenu popup, the corresponding password will drop into your clipboard. Easy peasy.

Security

By default as of this writing, lpass seems to just leave your password in the X primary clipboard forever (or until overwritten). It recognizes an environment variable however, LPASS_CLIPBOARD_COMMAND, where you can specify your clipboard command and arguments. This allows for a setting like the following

Which will allow one X selection request (i.e. a paste action) before this value is cleared from the clipboard. Hopefully the default will change in the future to be more secure? But there go in the meantime.

<edit> After further consideration it seems the environment variable trickery above will remain the only solution, so get used to it 😉

hi-dpi cssh and xterm

Using CSSH/XTerm with a high-DPI display

On my laptop with a QuadHD display, cssh was unusable

Screenshot of cssh using tiny bitmapped fonts

because X is a hundred years old and xterm (the default for cssh) defaults to bitmapped fonts which are tiny and gross.

So how do we them it to look like this instead?

Screenshot of cssh using xterm with light/colored terminals at a legible size

Solution

This worked for me: just configure XTerm to use TrueType fonts!

And then configure cssh to a more appropriate size!

There you go.  That’s so much nicer.

Screenshot of cssh using xterm with light/colored terminals at a legible size

dotfiles text image

Here is my home directory

…or the important parts, at least.

I’ve finally taken the plunge and spent a morning cleaning up and organizing my dotfiles so I can put the whole thing on Github and keep the same configuration across all of my home directories while sharing things and maybe making the world a tiny bit better.

https://github.com/cspeterson/dotfiles

You as a person configuring things on Linux might see something useful in there. I use it across Ubuntu and CentOS systems without problems to configure the likes of Vim, Bash, Audacity, GNU Screen, Terminator, and maybe other things. It will continue to change over time as I alter what things I use and how I use them.

My Puppet skeleton profile

This might come in handy for someone using Puppet with the “roles and profiles” design pattern. Having this profile sitting idly by to provide the boilerplate for a new profile has let us be lazy in a good way.

 

I made a thing: Memeseeks! (Rick & Morty memes and gifs) [UPDATED]

<edit> A couple of days after this release, the people behind Frinkiac released their own site that does the same thing as Memeseeks, but with a nicer UI. (︶︹︺)

I’m a bit sad that I completed a thing and then saw it made obsolete two days later, but at least I probably learned a few things along the way. So I’ve retired Memeseeks, though I hope to modularize all of its functionality and release the code at some point.</edit>

Just in time for the new season of Rick & Morty (as well as our own episode on the matter), we just released this thing we’ve been working on:

The Memeseeks Box

Meeseeks Christopher and Colbert

The Memeseeks Box

It’s a Rick & Morty memer and giffer (pronounced like the peanut butter ?). We’ve been saying at Decipher Scifi that we were working on a few things behind the scenes, and this was one of them. I’m glad to finally have it out there. 🙂

So meme away, and I hope you like it, and make sure you’re subscribed to the podcast for our Rick & Morty episode in a few days!

<edit from the future> here is our Rick and Morty episode!</future>

I may post some codey things about it here in the future.

Setting up Let’s Encrypt SSL on Bitnami WordPress (Multisite & Standard)

There are countless different ways to set up Apache and WordPress and SSL, but here is one way set up Let’s Encrypt certs on a Bitnami WordPress using the WP Encrypt plugin install if you have SSH access to the server and know how to use it. I don’t think I’ll continue to use the Bitnami stack but here is a thing I did while I was.

Back things up etc before you go changing things. Even better, do this on a test thing first. Things.

Bitnami

Bitnami provides a “stack” of apache and wordpress that makes it fairly easy to get a site going. There are pros and cons to using their stack. One pro is that they have easy installers on AWS Marketplace, so that may be how many people wind up using it. In any case, once you are using Bitnami WordPress, you may want to use Let’s Encrypt certs in a way that requires the least tinkering.

Let’s Encrypt

A full write-up is deep and way beyond the scope of this post, but Let’s Encrypt provides free easy SSL certs so the internet can be a more secure place. For more, see: About Let’s Encrypt.

WP Encrypt

Assuming your WordPress is configured correctly using your own domain(s), install the WP Encrypt plugin. Then use it to install Let’s Encrypt cert(s)

wp encrypt setup screen

Fill in the fields, check Auto-generate to make it magic, then Register then Generate. You will be presented with the paths to all of the certificates. If you’re using Multisite WordPress, the separate domains will all be registered as Subject Alternative Names for the main domain. If this doesn’t work for you, use CertBot or something instead. ¯_(ツ)_/¯

On the server

The way Bitnami configures its stack, apache is not in the normal location and is not configured the normal way. This is a pain, but it’s easy to design around.

Get into the file /opt/bitnami/apache2/conf/bitnami/bitnami.conf and add the SSLCACertificateFile line after the other SSL options:

Then link the apache certs, including the chain you added.

Then restart Apache via Bitnami

Fin.

Backup and restore Pretty Links manually on WordPress (without Pro)

I needed to move my Pretty Link data from one install to another, and plugin settings do not come along for a normal WordPress export so it needed to be done explicitly. Pretty Link Pro (a worthy purchase if you do much pretty-linking) is needed to do it via GUI the easy way, and I only have the pedestrian Free version.

So let’s see what we can do the hard way. You’ll need ssh access to the server and the wordpress database name, user, and password (findable in your wp-config.php).

Exporting

For a single-blog normal WordPress install Pretty Link data is stored in the following tables:

Else on a multisite WordPress install it’ll be more like this, with whatever numbers correspond to the blog on the network that you’re dealing with.

And after taking a look at the data within, it’s really what you’d expect: a list of urls to translate into other urls. Easy peasy, let’s export the explicit list of prli table names (changing as appropriate for multisite)

Now is the time to open up Vim and change some things if necessary. If doing migration between single wordpress installs, the tables names can stay the same. If you’re moving to another install of the same domain name, those can remain too. If going from normal to multisite, or from differently-numbered multisite blogs, you’ll need to edit the table names. If changing domains you’ll probably want to replace occurrences of the old domain name in all of the urls, or whatever. Up to you.

Then you can import.

Importing

Step one: back up your DB, dummy.

Step two: do something like this:

That’s all. Now you have your pretty links back. 😎