dereenigne.org

reverse engineered

GNOME Workspace Wraparound

I found out yesterday that GNOME (or more correctly, the GNOME window manager, Metacity) only allows you to switch to a specific workspace. You cannot cycle through workspaces, wrapping around to the first when on the last. There is a long-standing upstream bug report, about this issue, but sadly it is marked as wontfix. I have, however, found a workaround using wmctrl. These commands could obviously be much nicer if they were placed in a proper script, but I wanted a one line snippet that I could add to my xbindkeys config. Read more →

XML reindent

XML is designed to be human-readable. However, to minimise data transfer, the indentation and newline characters are often discarded during transmission. This results in a difficult-to-read XML file such as the one below: <?xml version="1.0" encoding="ISO-8859-1"?><note><to>Tove</to><from>Jani</from> <heading>Reminder</heading><body>Don't forget me this weekend!</body></note> This XML file can be both checked for validity, and reindented using xmllint. Debian/Ubuntu users can find this as part of the libxml2-utils package. xmllint --format input.xml output.xml This results in the following, more-sane output: Read more →

Thunderbird Movemail Support

I discovered the other day that Thunderbird supports Unix Movemail accounts. It seems to have supported them for a long while, but it wasn’t very obvious from the Account options. This is dead handy as it allows me to retrieve the various system generated emails from /var/spool/mail automatically. Read more →

GNU Screen Autostart

I got a Debian based VPS recently, and every so often I find myself needing to reboot the server. I keep forgetting to start my GNU Screen and Irssi windows again though. Adding the following line to /etc/rc.local allows GNU Screen to automatically run at boot time. This line runs Screen from my unpriviledged account, loads Irssi within that Screen, and then backgrounds itself, ready for the next time I login. Read more →

Debian Print to PDF

Having used PDFcreator on Windows for many years, a PDF printer is something that you miss very quickly on a fresh install operating system. Linux is no exception, and cups-pdf provides a PDF printer for the most excellent CUPS. (I normally despise Apple software, but I have to give them credit for CUPS. :)) To install on a Debian/Ubuntu machine: apt-get install cups-pdf Once installed, you should now have a new PDF printer showing up in CUPS. Read more →

Multiproxy-Switch Firefox 4

Multiproxy-Switch is a pretty nifty Firefox addon for quickly changing web proxies. With the release of each new Firefox version, many older add-ons get culled from the typical profile due to incompatibilities. Multiproxy-Switch is no exception, and no longer seems to be updated. I’ve taken this add-on on, modified it to be compatible with Firefox 4.0, and will now maintain it on github. You can download the latest version from github. Read more →

Mirror FTP

I recently decided to take mirror an old website that I had running. The hosting plan only offered ftp, and so, I couldn’t get shell access to tar and scp it. Next best thing was to mirror it using lftp. The following command logs into the root FTP directory and mirrors every file recursively. lftp -e mirror -u username,password ftp.example.com Read more →

SSH Avoid Host Key Verification

SSH is great for providing security over unprotected networks, but sometimes the security measures can just get in the way. When dealing with embedded devices or virtual machines, rolling out a new firmware/disk image will result in the SSH host key changing, resulting in the warning below. user@host:~$ ssh remotehost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! Read more →

Twitter Geolocation Search

Twitter is a pretty useful tool for finding out about things happening in real time. It turns out that it is also a powerful tool for finding out about things around you. You can use search operators to search for tweets that have been geotagged with location information. For example, to search for tweets within a kilometre of Dublin Airport, use the following search commands in the search box. geocode:53.427392,-6.243681,1km Read more →