Installing Grunt on CentOS 5.10

Today I attempted to get the Grunt Javascript Task Runner installed on a test box. This first required the installation of Node.js.

When I tried to run ./configure for Node, I got a syntax error. Turns out my Python version was too old (python 2.4.3, thanks to my test box running CentOS 5.10).

I then attempted to install an alternate version of Python, using these instructions. However, I couldn’t get the Python archive (.xz format) to extract using the “tar” command, because my tar was too old! I had to do yum install xz and then xz -dvk Python-2.7.6.tar.xz to get it to extract.

Next up was installing setuptools for Python. I fetched the ez_setup.py file with wget, then attempted to install using python2.7:

python2.7 ez_setup.py

This failed with a bunch of tracebacks, but basically it was trying to run wget which was returning a non-zero exit status. I realized that my wget could not verify the SSL cert of the server it was trying to fetch from, so I had to add --insecure to the command above, then it worked.

I was able to quickly install “pip” and with it, install “virtualenv”. Then I ran:

virtualenv-2.7 fornode

to create an environment from which I could install node using Python 2.7. Back to installing node now…

Node’s ./configure failed once again, this time due to gcc being too old.

It was at this point that I abandoned any hopes of getting a recent Node installed on CentOS 5.10.

I got a CentOS 6.5 machine going and easily installed Node, only having to do first:

gcc-c++ compat-gcc-32 compat-gcc-32-c++

Arch and fonts

I struggled with poor fonts in Firefox once I switched to Arch. Upon finding Infinality, I gave it a try.

It worked really well, so that fonts in Firefox looked great once again, very readable, etc.

My only complaint was in LXTerminal, since I had been using “Anonymous Pro” there for my console font. This became totally unusable. I think it had something to do with it being a bitmap font, but after much searching online, I couldn’t tell for sure and couldn’t fix it.

Thus, I switched my console font to ProggyCleanTT for now. It is OK, but I don’t like it as well as Anonymous Pro (maybe because it is different).

Arch Linux

I got tired of dealing with some annoyances in Ubuntu, which included:

  • Unity and having to switch to Xubuntu to get XFCE as my window manager
  • Stupid pop-up menus that gave me the option to shorten a URL every time I copied one, even in Gvim (I have no idea what controlled that).
  • General bugginess and resource hogging.

Therefore, I switched to Arch. I had saved an old SSD from my original Chromebook (CR-48), thinking it might come in handy someday. Armed with an $8 adapter so I could use this laptop SSD in my desktop, I switched my drives’ boot order and proceeded to install Arch via the live CD.

Arch is definitely not for the newbie, as you have to configure everything by hand, with no GUI help. However, Arch has tons of wonderful documentation. If you can read and learn, you can configure your system properly (partitions, mounts, etc).

I carefully formatted the SSD, keeping my old HDD untouched so I could change boot order and be back in Xubuntu if needed. Once I had booted into my new Arch install, I realized I needed to mount my old HDD in /home, if I was to access its contents. I used gparted (with a little sweating) to remove the HDD’s swap partition and create a /var there instead, which is useful when booting from an SSD. Then I mounted the rest of the drive as /home, and created a new home directory. This meant that my old home dir was located under /home/home/[user], and my old configs such as resolv.conf were located at /home/etc/. Thus, Xubuntu became no longer accessible, but I could still access all my files and configs. So far, so good.

I went with LXDE + lxdm for my desktop/window manager, and have thoroughly enjoyed its lightweightness, along with Arch’s bleeding-edge packages, speed, and stability.

Opening links in Chromium (built from source)

I build Chromium from source on Linux (Ubuntu). I made it my default application for links, but I noticed that when clicking a link embedded in a PDF (using a reader like Evince), that it gave a permission problem.

The trick is to edit

/etc/apparmor.d/abstractions/ubuntu-browsers

and add a line like:

/opt/google/chromium/chrome PUx,

Then do:

sudo service apparmor reload

Hey, I'm Josh Lavin. I hack on stuff.