Tuesday, December 11, 2007

Slab: A revamped Gnome Main Menu

I tried OpenSUSE for a while, and I could not like it for one reason: Package management is terrible. After you get used to "aptitude install", with mirrors of the repositories in nearly every country, it is hard to settle for anything less.

Among the things I did like about Novell's version of Linux is the Gnome main menu they use, called slab. It provides easy access to the most important things you expect of a main menu, but it's not as bloated as other menus like Gimmie.

Well, what better than to show a screenshot of it, no?

If you want to try it out, you just have to:

sudo aptitude install gnome-main-menu

Sunday, August 26, 2007

Make The Fsck Checks Un-annoying

There's one thing that is really annoying about the ext2/3 filesystem that Ubuntu uses by default, and it's that the partitions must be checked every 30 mounts. Unfortunately, these checks occur during the boot-up process. Now, it's not a good idea to disable the checks, but you can do is make the checks happen during the shut-down process instead. All you have to do is download and install Autofsk from here (link for version 2.0). Extract the file, and double click on the "Install" script. It will prompt for the root password and install. Autofsck will check when your partitions must be checked and will prompt you before you log out if you want it to happen.

Links of interest
Ubuntu Wiki/Autofsck

Tuesday, July 10, 2007

Firefox: "The connection was reset" on some sites

If it happens that on some websites you get "The connection was reset" (like this one), but the the websites work under Opera or Windows, it could be that you are running Firefox in Ubuntu Feisty. The fix is simple. Within Firefox go to the following address:
In the "Filter" text field type
Now, you should see a preference called "general.useragent.extra.firefoxComment". Right click on it, and change the value from
Now you are done.

This happens when the website you are trying to access blocks clients that have the string "ist" in their User Agent string, because the firewall thinks your computer is infected with the ISTbar adware.

Links of interest
Ubuntu Forums post
Launchpad bug report

Tuesday, May 8, 2007

Install a PDF printer

By default, CUPS-PDF is not installed, so grab it by using sudo apt-get install cups-pdf. You should then be able to add a fake printer that will convert print jobs to PDF files. Go to System -> Administration -> Printing to bring up the Printer configuration dialog. Select New Printer from the toolbar, and walk through the New Printer Wizard. You can give the printer pretty much any name you want. PDF seems like a logical choice. The Description and Location fields are optional.

On the next screen, when asked to select a connection, choose Virtual Printer, and leave the device URI as it is: cups-pdf:/. Next, on the screen where you can select a Printer from the database, choose Generic. On the next screen, choose PostScript as the Model and as the driver for the printer. Then you'll see a screen that says "Going to create a new printer PDF at cups-pdf:/." Click Apply and you should have a virtual PDF printer.

Links of Interest

Monday, May 7, 2007

Get NetworkManager working after suspend

After going into standby mode ("suspend") or hibernation, NetworkManager might refuse to connect to your network of choice. The trick is to restart NetworkManager after standby. You will need to create two files.
sudo touch /etc/acpi/suspend.d/07-network-manager.sh
gksudo gedit /etc/acpi/suspend.d/07-network-manager.sh

Now paste the following in Gedit, save and close.
/etc/dbus-1/event.d/25NetworkManager stop

sudo touch /etc/acpi/resume.d/63-network-manager.sh
gksudo gedit /etc/acpi/resume.d/63-network-manager.sh

Now paste the following in Gedit, save and close.
/etc/dbus-1/event.d/25NetworkManager start

Links of Interest
Ubuntu wiki's NetworkManager page

Thursday, May 3, 2007

Set Up Ruby on Rails with Postgresql

To set up Ruby on Rails to work with Postgresql, do the following:
Install Ruby:
sudo aptitude install ruby rdoc irb libyaml-ruby libzlib-ruby ri libopenssl-ruby

Install RubyGems (this is an aptitude/apt-get style utility that handles ruby programs)
Get the latest version from here
wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
tar xzvf rubygems-0.9.2.tgz
cd rubygems-0.9.2/
sudo ruby setup.rb
sudo gem update --system

Install Rails using RubyGems:
sudo gem install rails -y

Install PostgreSQL:
sudo aptitude install postgresql-8.2 postgresql-client-8.2 postgresql-client-common postgresql-common postgresql-doc-8.2

Now you have two choices. You can either install a pure Ruby PostgreSQL driver for Rails called postgresql-pr (slower) or you can install the native driver postgresql.

To install the postgresql-pr driver
sudo gem install postgres-pr

To install the postgresql driver
You need to install some more packages, or the installation will fail:
sudo aptitude install ruby1.8-dev libpq-dev
POSTGRES_INCLUDE=/usr/include/postgresql sudo gem install postgres

Enabling PostgreSQL
To start using PostgreSQL under your username, you first have to create a new PostgreSQL user. After a fresh installation of Postgres, the only (Linux) user that can create databases/users is the user "postgres", so we must "login" under its name.
sudo su postgres

Now we use the createuser script to create a new user.
createuser -P

(-P means "assign password") You will be asked some questions, just answer as follows, replacing YOUR_USER_NAME with your user name (BEEP cyclic redundancy check error BEEEEP)
Enter name of role to add: YOUR_USER_NAME
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y

Now type

to become yourself again.

Your First Rails Project
When you create your Rails projects, you have to tell Rails to use your PostgreSQL database, like this:
rails my_super_duper_project -d postgresql

Now, with your new super duper project created, you must modify the config/database.yml file so that Rails knows your username and password. In that file you will find THREE (3) "paragraphs" that look like this:
  adapter: postgresql
username: YOUR_USER_NAME

Just change the password fields to match your password. Also, you can notice that there are three databases, one that ends with "_development", another one with "_test" and another one with "_production". You create these databases using the createdb script:
createdb YOUR_PROJECT_development
createdb YOUR_PROJECT_production
createdb YOUR_PROJECT_test

Links of Interest
Ubuntu wiki's Rails Page
PostgreSQL in Ruby on Rails
RubyGems download page
Glom's initial Posgres configuration page

Wednesday, April 25, 2007

"Open Terminal Here" Option in Nautilus

To be able to open a terminal in the current Nautilus directory, install nautilus-open-terminal:
$ sudo aptitude install nautilus-open-terminal

Now you can browse to a directory in Nautilus, right-click on a blank area of the window, and click on "Open Terminal Here", and a Terminal will come up.

Adding Java Support to Firefox

To enable Java applets in Firefox, you must first install Java (see this post). Then locate the Firefox java plugin file:
locate libjavaplugin_oji.so

You will get something like this:

We need the first file (the one in the ns7 directory, NOT the one in ns7-gcc29).

to go to your home directory, then
ln -s /usr/lib/jvm/java-6-sun- .mozilla/plugins/

to link the plugin file to Firefox.

Links of Interest
Sun's Linux manual download/installation page

Tuesday, April 24, 2007

MP3 burning in K3B

To get K3B to be able to burn mp3's to Audio CD's, do the following:
$ sudo aptitude install libmad0 libk3b2-mp3

Rar archives

To add .rar capabilities to File-Roller, install unrar
$ sudo aptitude install rar

Monday, April 23, 2007

Updating Azureus

When I have problems with Azureus I update it with the latest version and it usually gets fixed. The only thing you have to do is replace the Azureus.jar file like this:
Download the newest Azureus.jar (currently, it's here)

Once you have saved it in a folder called, say, "Downloads", you do this in a Terminal:

Backup your old Azureus.jar:
sudo cp /usr/share/java/Azureus2.jar /usr/share/java/Azureus2.jar.bak

Then remove the old version:
sudo rm /usr/share/java/Azureus2.jar

Then copy the newest version to where it should be:
sudo cp Downloads/Azureus2.5.0.4.jar /usr/share/java/Azureus2.jar

Installing and setting up Sun Java

To install Sun Java, you need to install the sun-java6-bin and sun-java6-jre packages. Additionally, if you intend to program your own Java applications, you need to install sun-java6-jdk. Multiverse has to be enabled.

sudo aptitude install sun-java6-bin sun-java6-jre sun-java6-jdk

Next, to make Sun Java the default Java interpreter (rather than GCJ):
sudo update-alternatives --config java

and choose the correct option for Sun Java, ie. /usr/lib/jvm/java-6-sun/jre/bin/java.

Links of Interest
Ubuntu's Wiki page concerning Java

Sunday, April 22, 2007

Disable Touchpad while typing

Here is a nice how-to that shows how to disable your Synaptics touchpad while typing, so that you don't lose focus of the field you are editing.

Saturday, April 21, 2007

Installing checkgmail

CheckGmail is a Gnome Panel Applet that checks your gmail account.
To install it, first install all the dependencies:

sudo aptitude install libcompress-zlib-perl libcrypt-blowfish-perl libcrypt-simple-perl libcrypt-ssleay-perl libemail-mime-encodings-perl libfreezethaw-perl libgtk2-trayicon-perl libmd5-perl libxml-libxml-common-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-simple-perl

Then, download the tarball package version of CheckGmail from here. Extract (say to /home/username/Programs/checkgmail) and then add it to your start up programs (System -> Preferences -> Sessions). To run CheckGmail for the first time, run the checkgmail script from the startup directory.

To get cool On-Screen Display notifications of new emails, install gnome-osd:
sudo aptitude install gnome-osd

Then, right click on the CheckGmail icon, click Preferences and in the "Command to excecute on new mail" field enter the following:
gnome-osd-client -f "<message id='gmail'><span foreground='black' background='lightgray'>%m new email(s)</span></message>"

To get your CapsLock/NumLock/ScrollLock light(s) blinking when you get new email install blinkd:
sudo aptitude install blinkd

and then add this to the field above:
;blink -s -r %m

The field should now look like this:
gnome-osd-client -f "<message id='gmail'><span foreground='black' background='lightgray'>%m new email(s)</span></message>";blink -s -r %m

and add this to the "Command to excecute for no mail" field:
blink -s -r 0

This will make the ScrollLock light blink n times, where n is the number of new email messages, and will make it stop blinking when you have read all your mail.

Links of insterest
CheckGmail homepage

Correct resolution for Intel 915 Graphics Card

To get the right resolution for your monitor working with an Intel graphics card, you have to install 915resolution.
sudo aptitude install 915resolution

Restart, and the resolution should be normal.

Links of interest
915resolution homepage
auto915Resolution - Ubuntu Resolution fix for Intel chipset 8x-945