INCLUDE_DATA

Installation of Xubuntu

A week ago Hardy Heron, Ubuntu 8.04, was released. Among the many new features was a new version of the Linux kernel and the latest version of Xorg. Since I’m using Ubuntu daily I figured it I had to update my system to this new version. Instead of going for the standard update I decided to change to Xubuntu. The reasons for that is that my old installation of Ubuntu was starting to get a bit sluggish (probably due to my unsuccessful optimization attempts) so it needed a complete reinstall anyway, and I prefer Xfce over Gnome as my desktop manager.

After having downloaded and made a copy of the Xubuntu install disk I started the installation. During the installation I went for the default options and everything seemed to work fine. On the first boot after installation the laptop started without any problems, all the hardware was properly registered and it managed to find the proper screen resolution without any input from me. Getting the wireless card working and connected worked without any hiccups as well. The little network-icon in the status bar found my wireless network, and the WPA authentication worked at once. So far the upgrade was going exceptionally well.

Getting rid of the system beep

The next step was to remove the annoying system beep that occurred every time I tried to do something the computer didn’t like, e.g using [TAB]; to auto complete file names that didn’t exist.

Doing this is really simple. The module that controls the pc speaker is called pcspkr so all that is needed is to stop that module from being loaded. The /etc/modprobe.d/blacklist file keeps track of modules not to load on startup. The pcspkr module can be added to the file by typing the following in a terminal window.

sudo echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist

It is very important here to use two ">"-signs, since that ensures that the text is appended to the file. If you end up typing only one ">"-sign the text will overwrite the content of the file – not something you want to do.

The safer way, though requiring a couple more key clicks, is to open the file in a text editor (like Vim) and add the "blacklist pcspkr" line there.

Those steps ensures that the system beep will be gone next time you reboot the computer, but it is still there in the current session. To unload the module from your current session you have to type

rmmod pcspkr

Remapping the Escape Key

The system beep is now gone, but there is one more important tweak that needs to be done before I can start on the real system customizing. As I use Vim for all of my text file editing I use the [ESC];-key quite a lot. Its position at the top left of the keyboard is not optimal for frequent use, so I usually move it to where the [Caps Lock]-key is. I’ve never found a use for the [Caps Lock]-key so it is better to use that key for something else.

Customization of the keyboard is done through a .Xmodmap file in your home directory. This file is read when Xorg loads and therefore ensures that your keyboard changes are used from the very beginning of your work session. To move the [ESC]-key the following two lines are required in the ~/.Xmodmap file.

remove Lock = Caps_Lock
keysym Caps_Lock = Escape

The first line removes the “lock” option of the key, and the second key tells Xorg to treat [Caps Lock] as [ESC]. To enable these changes in you current Xorg session (and ensure that they work as expected) you can execute the following command

xmodmap ~/.Xmodmap

Now that the two simple customization parts are done we can start to concentrate on the more complex parts, like getting Compiz-Fustion to work and connecting to the Windows computers on the local network.

4 Comments »

  1. Anonymous Said,

    May 17, 2008 @ 20:30

    sudo echo “blacklist pcskpr” >> /etc/modprobe.d/blacklist

    This line should be “………….pcspkr………”, a typo maybe.

    thanks for the info though.

  2. Michael Plikk Said,

    May 19, 2008 @ 08:19

    You’re indeed right, it was a little typo that slipped in there. Thanks for noticing, and glad you found the information useful!

  3. Diego Said,

    July 13, 2008 @ 18:20

    Thanks for good post, but cannot complete to save the “blacklist pcspkr”. If I try from the terminal, said “action not allowed” and from text editor i cannot save the corrected file. I believe that the file is currently loaded and cannot be edited, so how can i do?
    I’m really new in linux, have since 3 days xubuntu, and was really easy until now, but the beep sound is a little annoying, isn’t it?

    thanks in advance

  4. Michael Plikk Said,

    July 15, 2008 @ 01:05

    The beep sound is indeed very annoying, which is why that is one of the first things I fix after a reinstall of Linux.

    Are you opening the text editor with root access, e.g sudo vim /etc/modprobe.d/blacklist? Since only the root user has write access to the file you need to prefix the command with sudo to get the privileges required.

    The file is only read at load time, so it shouldn’t be used after that. Even if it was used it shouldn’t be any problem to overwrite it, the changes just won’t come into effect until after the next reboot. That is only of the brilliant things about Linux, you don’t have to worry about files being in use when you change them in any way – the OS takes care of that behind the scenes.

RSS feed for comments on this post · TrackBack URI

Leave a Comment