How to Find and Install OpenShift rhc tools on Fedora

The other day I set out to write a post on getting a WordPress instance running on OpenShift.  I got sidelined in the confusion of determining the best place to install rhc tools from.

I’m trying to be more deliberate about using OpenShift and blogging about about my experiences along the way.  I myself, prefer more detailed, step-by-step guides and that is what I plan to writer here.

Stay with upstream for now

The best place to currently get rhc tools is from the repo.  I’m told this is because they change a lot and the versions in Fedora don’t get updated as often because of the updates approval process (that’s not a knock on the Fedora process–OpenShift follows Fedora’s process and policies just like everyone else and updates Fedora as time permits).


rhc tools is available in Fedora 14 through 17 and known as rubygem-rhc.  Setting aside the technical or policy reason why the package name is this way, it always bugs me when a trip to Google is required to determine the package named toyum install something this simple.  It’s definitely not as obscure as 7zip.

Install rhc tools

Below is the essence of what you need to do.  Alternatively you can follow OpenShift’s getting started instructions which felt less efficient to me.

1) Set up the yum repo.  As root,

# cd /etc/yum.repos.d
# wget

If you prefer to configure the OpenShift repo by hand, as root, put the following in a separate file (with a name ending in .repo, for example openshift.repo) in /etc/yum.repos.d:


2) Install rhc tools

$ su -c 'yum install rhc'


UPDATE: A new page has been added to the OpenShift Developer center clarifying this process for each operating system.  It’s better than my steps above.



How to Create Password Protected Zip Archives with 7zip on Linux

Littleplanet-Versuch picture

Mortgage Madness

I refinanced again–once again with no closing costs while sacrificing some on the rate.  Interest rates are again at historic lows which meant I had to take avantage of two great opportunities–lowering my rate by three quarters of a percentage and shortening the length of my loan to a 15 year term.  With no out of pocket costs involved (or closing costs financed), there was nothing to lose.

The upside is that I keep making the same payment I’ve always made and more money goes to driving the principle balance to zero because of the lower rate and shorter duration of the loan.  Two great sites I found for following rates and the mortgage process are:

Collecting and Sending all those statements

Usually I rely on my tried and true fax machine, but this time I decided it was time to join the rest of the world and managed to collect everything as PDFs. After gathering them all in a folder I realized I didn’t want to send them unencrypted over the wire.

Next I searched for a way to zip all the files and lock the archive with a password that couldn’t easily be hacked and read on Windows. From what I could find on Google, the regular linux zip password protected algorithm was not secure, however encrypting with AES was.

I discovered that 7zip could do strong AES encryption and store in a zip format–presumably most Windows users (and my loan officer) would be able to read the archive, however the instructions I found to do so were horrible.

After google failed me I turned to the powerhouse of Red Hat engineers on an internal list… and in less than 24 hours I had a solid answer–thank you Norman Mark St. Laurent!  There is very little coherent information on Google about using 7zip with RHEL–the package names are confusing, the man pages are incomplete, and none of the examples I found for other platforms worked.  This post aims to remedy that.

Creating an AES encrypted archive with RHEL 6 and 7zip

1) Make sure EPEL (Extra Packages for Enterprise Linuxe is enabled)

2) Install the 7zip package (note the package name is not the same as the executable).

$ su -c 'yum install p7zip'

3) Create an encrypted archive readable by WinZip.

$ 7za a -y -tzip -pMY_PASSWORD -mem=AES256 /path/to/directory-of-files

Image by Alexander Stielauvia flickr used under a Creative Commons license.

Running the Latest Thunderbird on RHEL 6

Column picture by Tonton Jaja

Today I ran into a strange problem where messages seemed to be missing from my Inbox. Running “repair folder” from the properties tab automatically moved several messages to the trash. Moving them back to the inbox and repeating the process resulted in the same behavior. I thought maybe it was time to move on from the default version in RHEL 6, presently thunderbird-3.1.15-1.el6_x86_64, and live more on the edge.

I’ve also been using the same Thunderbird settings directory for two or three years so there was also the chance of some cruft build-up there as well.  What better way to rule out all possible issues than to run the latest version of Thunderbird with a fresh profile?

A simple way to do this is to rename ~/.thunderbird. If you change your mind or want it back, it’s simply a matter of closing Thunderbird, changing the name of the directory back, and running Thunderbird again. I believe there is also a way to this with the profile manager, but I like this way best.

I ran into one small problem due to my machine being 64bit and the regular Thunderbird Linux download being 32bit.  The solution was in this helpful forum post.

RhEL 6 Thunderbird Installation Steps

1) Download the latest stable Thunderbird version.

Updated October 27, 2011:  Thanks to the comment from Matej, pre-built 64bit packages are available, I’m not just not sure how regular folks like me would know to find them.  Back track on the link if you want a different language.

2) Un-tar the file that you download.  For simplicity I prefer to put it in my home directory.  With this approach it will not be accessible to other users, however it will not conflict with the existing installed RHEL rpm version.

$ cd Downloads
$ tar -xvf thunderbird-7.0.1.tar.bz2 -C /home/myuser

3) If you are running 64bit RHEL, you may encounter this error message:

thunderbird-bin: error while loading shared libraries: cannot open shared object file: No such file or directory

Installing the dbus-glib.i686 package provides the library you need:

$ su -c 'yum install dbus-glib.i686'

4) Run the new version of Thunderbird

$ cd /home/myuser/thunderbird
$ ./thunderbird

5) If you want to modify the launcher to run this version instead of the default installed RHEL version, right click on the launcher icon, select properties, and change the path to point at the Thunderbird binary in your home directory.  Something like: /home/myuser/thunderbird/thunderbird

Nostalgy is the most important add-on

The Nostalgy add-on is the primary reason I can’t bring myself to change email clients.  The ability to file messages with ease into any folder with one or two key strokes is something I cannot live without.  Don’t miss “shift + s” to save a message to the last folder you saved to.

Benefits of the latest version

  • Once you set the column view you like you can apply it recursively to all your folders. This was a huge pain in the past where columns had to be set manually for each folder.
  • Newer themes work and are compatible
  • Everything feels polished, newer and faster

Use at your own risk

The downside of running Thunderbird this way is that you aren’t running the officially supported version provided by Red Hat and you are relying on Mozilla to provide the latest version to you.  This should happen automatically via Thunderbird’s built-in updating service.  Preferences for automatic updates can be changed in the “Advanced” tab.  Naturally the packages built and provided by Fedora and RHEL have this feature disabled.

I’m currently running the latest version of Firefox the same way and have not encountered any issues.

Image by Tonton Jaja used under a Creative Commons license.

Resuming Corrupted Suspended Guests

virt-manager screen shot

My recent post on fixing terminator was months in the making, partly because I lost the environment I was using to double-check all the steps and partly because other things just kept coming up.  Several months back when I found the original fix it was only available as a patch in bugzilla.  I’d constructed a whole article about how to get the patch, update the spec file, build a new rpm, etc. but in the midst of this I lost the virtual machine I was using twice to a suspend that would not resume.  I also ran into some problems using yum-downloader to get the source rpm I could not reliably reproduce or document.

Time went by and an updated source rpm was available to fix vte so it seemed silly to document all the tedious steps to patch the spec file and rebuild when that work was already done, but then I was thwarted again when I rebooted my laptop and forgot I had a guest running.

It was a frustrating situation from the virt-manager GUI and the command line–my only options were resume (which didn’t work because of the error message below) and shut-down (which did the opposite of what I wanted the virtual machine to do).

On Google I found scant references to this situation so I turned to a company-wide mailing list at work where anyone can post technical questions.  I had the solution in 30 minutes!

This was the cryptic error message I received in virt-manager when trying to resume the guest:

Error restoring domain: Unable to read from monitor: Connection reset by peer

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/", line 44, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/", line 65, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/", line 1050, in startup
File "/usr/lib64/python2.6/site-packages/", line 510, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer


The error message made no sense to me--I can’t resume the domain because the monitor cannot be read?  How about, “Unable to resume domain.  If this persists try ‘virsh mangedsave-remove’ from a command line to remove the suspended session and reboot your machine.” Including the word “suspend” in the command instead of “managedsave” would also be more intuitive.

Here is the command to remove a corrupted suspended virtual machine session so you can boot your machine again–naturally you’ll lose the suspended session you had:

$ su -c 'virsh managedsave-remove NameOfDomain'

I’ve also confirmed on RHEL 6.2 (beta) that rebooting the hypervisor with a running guests, smoothly suspends and resumes them again when the hypervisor returns.

Bringing the Cursor Back to Terminator

Terminator Screenshot Picture

In my switch from Fedora to Red Hat Enterprise Linux (RHEL) one of the things I lost was Terminator.  Even though it was in EPEL and installed without issue, the cursor wasn’t visible, making it hard to use.  For a while I put up with it.  After a while it drove me crazy so I fell back to Gnome Terminal.  And that was fine for a while until I started doing more command line things again and missed a working in Terminator so badly that I asked Google how to fix it.

It’s a bug in VTE

Wouldn’t you know, other people had the same problem as noted in bug 658774.   It turns out the problem is not with Terminator, but in the VTE package.

I’ve seen the problem on RHEL 6.0 and 6.1 and it looks to be fixed in RHEL 6.2.  It is presently available in the RHEL 6 Fastrack channel (if you have a RHEL subscription) as an update (login required to view).  I’d assume, but haven’t verified, that the same problem exists on CentOS 6.

If you are running CentOS and have the same problem or if you’d like to build a fixed package on RHEL yourself, here’s how.

Building a new VTE package with the fix

To build a new rpm with the fix you’ll need:

  • a non-privileged rpm build environment
  • the updated source rpm for VTE
  • required build tools and libraries

Set up a non-privileged rpm build environment

If you don’t have a local rpm build environment specified, these commands will create it for you in your home directory.  There are several ways to do this, I found this somewhere long ago (maybe it was an RHCE class?) and like it because it is simple. You should always build the rpms as a non-privileged user–not as root.

$ mkdir -p ~/rpmbuild/{BUILD,RPMS,S{OURCE,PEC,RPM}S}
$ echo "%_topdir $HOME/rpmbuild" > ~/.rpmmacros


Get the latest vte source rpm

$ wget


Install the tools and libraries you need to build

$ su -c 'yum install rpm-build yum-utils gcc'
$ su -c 'yum-builddep ./vte-0.25.1-7.el6.src.rpm'


Build the new package

$ rpmbuild --rebuild ./vte-0.25.1-7.el6.src.rpm

Install your new vte rpm from ~/rpmbuild/RPMS

$ su -c 'yum localinstall /home/nopriv/rpmbuild/RPMS/x86_64/vte-0.25.1-7.el6.x86_64.rpm'


Run Terminator and you should be back in business.