Setting up java for ec2-api-tools on Fedora Linux

Download the Linux or Linux 64 package (not the RPM) from Oracle at

As root:

mkdir /usr/java

since it probably does not exist by default.

Extract the jre-7u21-linux.tar.gz file you downloaded into /usr/java

cd /usr/java && tar xzf jre-7u21-linux.tar.gz

You will have something like:


So in your .bashrc file (or however you set up your environmental variables for EC2) add:

export JAVA_HOME=/usr/java/jre1.7.0_21/


Open files in GVIM in new tab in GNOME 3

This is how I do it in Fedora 19, older instructions below.

This will make it so you can open every file you click on in Nautilus in the same GVIM window (in different tabs).

I like to only have certain filetypes that always open in the same GVIM window (in my case, .php, .js, and .css).

Go to /usr/share/applications as root.

cd /usr/share/applications
cp gvim.desktop svim.desktop

Edit svim.desktop and change Exec= from

Exec=gvim -f %F


Exec=gvim --servername SVIM -f %F

Right click a file of the type you would like to always open in same window. Go to Properties, Open With tab, Show All, and select svim. Do this for all file types you want to open in this session.

The following instructions worked on another older version of Linux where the already existing desktop file was named vim.desktop, if I remember correctly. It no longer worked on the latest version I use.

This will make it so you can open every file you click on in Nautilus in the same GVIM window (in different tabs).
Create a file called gvim.desktop in /usr/share/applications.

Make the contents as follows:

[Desktop Entry]
Comment=Graphical Version of vim
Exec=gvim --servername gvim --remote-tab-silent %U
Categories=Programming; System Utilities

The important line is the Exec line. The difference between –remote-tab-silent and –remote-tab is that silent won’t give you an error message before you can start editing.

Then to use this new shortcut you right click on a file you would want to edit in Nautilus and click Properties. Go to Open With and you may need to click Show Other Applications.

Choose GVIM (in Fedora the original is Vim; don’t choose that one here; GVIM is the one you just created).

Do this for all file types you would want to open in the same GVIM session.

You could also make a separate .desktop file for each file type if you wanted to. ie php-gvim.desktop could be made to open all .php files in the same gvim session. The key would be to edit the server name (on the Exec line) in the .desktop file. You could call it php instead of gvim.

Exec=gvim --servername php --remote-tab-silent %U

And you will want to change the Name too:


Throttle Package Downloads in Fedora

One of my clients only has a T1 internet connection so if I start downloading too many updates at the same time people will complain.
If you need to limit your download speed in Fedora (or anything that uses yum) simply add the following line to /etc/yum.conf


if you need to limit download speeds to 100KBps (kilobytes per second).