James Bowes

Purveyor of Pre-eminent Programmes

Archive for the ‘config files’ Category

Installing ruby gems in your home directory

with one comment

update: This post is now on my new blog.

I found it hard to find good instructions for installing ruby gems as a non-root user without installing the gem package locally as well. Here’s what I figured out; hopefully this will save someone else some time in the future:

Make a directory for gem installation:

$> mkdir ~/.gems

Set up your .gemrc for gem install-time configuration:

$> cat << EOF > ~/.gemrc
gemhome: $HOME/gems
- $HOME/gems
- /usr/lib/ruby/gems/1.8

Set up some environment variables for run-time:

$> cat << EOF >> ~/.bashrc
export GEM_HOME=$HOME/gems
export GEM_PATH=$HOME/gems:/usr/lib/ruby/gems/1.8/
export PATH=$PATH:$HOME/gems/bin

Source your bashrc and you’re all set.

UPDATE (Apr 18, 2009): gem seems to do this on its own now, so just adding

export PATH=$PATH:$HOME/.gem/ruby/1.8/bin

to your .bash_profile should be enough.


Written by jbowes

May 13, 2008 at 10:54 am

Posted in config files

Tagged with , ,

xterm-like fonts for gnome-terminal in Fedora 7

with 7 comments

I like using gnome-terminal, but I find the default fonts hard on my eyes. So I don’t forget (and for anyone who is interested), here are the steps to use xterm’s default font in gnome-terminal:

  1. As root, run `yum -y install bitmap-fonts`
  2. As root, run `ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/`.
  3. Close all open gnome-terminal windows.
  4. Launch gnome-terminal and edit the current profile.
  5. Uncheck ‘Use the system fixed width font’ and click on the font button.
  6. Select ‘MiscFixed’ and set the font size to 10.
  7. Your terminals now look crispy in the dark.

Written by jbowes

June 4, 2007 at 8:36 pm

Posted in config files, fedora, tech

Using OpenDNS with Fedora Core 6

leave a comment »

DNS lookups at home were extremely slow for me. For instance, while doing some profiling of yum this afternoon, 10 out of 15 seconds were taken up resolving the IP of download.fedora.redhat.com. Replacing Road Runner’s DNS servers with OpenDNS took this down to 5 seconds. Putting OpenDNS before my router’s DNS server makes the time negligible.

Anyways, the details:

  • Copy /usr/share/doc/dhclient-$VERSION/dhclient.conf.sample to /etc/dhclient.conf
  • Edit /etc/dhclient, removing everything before the ‘prepend domain-name…’ line, and everything after the ‘initial-interval 2;’ line.
  • On the ‘prepend domain-name-servers’ line, replace ‘’ with
  • Take down and bring back up your network connection. /etc/resolv.conf should now start with the two 208… IP addresses.

The important part I believe is to keep the ‘request’ and ‘require’ bits in dhclient.conf. This setup will play nicely with NetworkManager, too. Mad props to Orangebat for pointing out OpenDNS.

Here’s a sample dhclient.conf, to make it easy:

prepend domain-name-servers,;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;

Written by jbowes

December 9, 2006 at 2:11 pm

Posted in config files, tech