Another look at beeps in Linux

Following my previous post I experimented further with the Linux Kernel configuration options for event beeps (sometimes called ‘system beeps’), and I now have a better understanding of how the Kernel options interact (on one of my laptops, at least).

The sound card in my Clevo W230SS laptop has a VIA VT1802S audio codec chip. I looked at the audio circuit schematic in the service manual; one of the digital input pins on the VT1802S is labelled ‘PCBEEP’, and one of its analogue output pins is labelled ‘PCBEEP’ and is connected to the laptop’s speaker circuit. So there is no PC Speaker in this laptop and it emulates the PC Speaker via the laptop’s sound card, as mentioned in my previous post.

Before I describe my latest results, there are a couple of influencing factors I forgot to mention in my previous post:

  • In some computers the BIOS Menu has one or more options for enabling/disabling beeps. The BIOS menu of my Clevo laptop does not have an option to enable/disable all beeps from the (emulated) PC Speaker, but it does have a couple of options to enable/disable ‘Power On Boot Beep’ and ‘Battery Low Alarm Beep’ (I have disabled them both). Anyway, if you are still not getting beeps after trying everything else, be sure to check the BIOS menu just in case it has an option to enable/disable the PC Speaker.

  • Make sure that bell-style is not set to ‘none‘ (you could set it to ‘audible‘ if you wanted to be sure):

    root # grep bell /etc/inputrc
    # do not bell on tab-completion
    #set bell-style none

The Kernel configuration was initially as shown below. With this configuration no beeps were emitted in a VT (Virtual Terminal) or in an X Windows terminal. As explained in my previous post, I therefore configured the XKB Event Daemon to play an audio file (bell.oga) whenever X Windows detects a BEL character (ASCII 007) or Backspace key (ASCII 008).

root # grep PCSP /usr/src/linux/.config
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_SND_PCSP is not set
root # grep BEEP /usr/src/linux/.config
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1

Then I rebuilt the Kernel with CONFIG_INPUT_PCSPKR=M and CONFIG_SND_PCSP=M:

root # cd /usr/src/linux
root # mount /dev/sda1 /boot
root # make menuconfig
root # make && make modules_install
root # make install
root # grep PCSP /usr/src/linux/.config
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_INPUT_PCSPKR=m
CONFIG_SND_PCSP=m
root # grep BEEP /usr/src/linux/.config
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1

Then I created the file /etc/modprobe.d/blacklist.conf in order to blacklist the modules pcspkr and snd-pcsp so that only I could load them after boot:

root # cat /etc/modprobe.d/blacklist.conf
blacklist pcspkr
blacklist snd-pcsp

Then I added the line ‘options snd-pcsp index=2‘ to the file /etc/modprobe.d/alsa.conf so that the virtual sound card pcsp would not become the default sound card:

root # tail /etc/modprobe.d/alsa.conf
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=1

# See https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1313904
options snd-hda-intel patch=,clevo-hda-patch

# See Kernel Help text for CONFIG_SND_PCSP
options snd-pcsp index=2

Then I rebooted and checked that neither module was loaded:

root # lsmod | grep pcsp
root # echo -e '\a'

root #

As neither module was loaded, the situation was the same as before: a) no beep in a VT; b) no beep in Konsole/Yakuake (I will ignore KDE terminal programs anyway because of KDE bug report no. 177861);* c) the same bell.oga beep in xterm due to my use of xkbevd; d) no changes in ALSA Mixer.

* Regarding Konsole and Yakuake, see my update of October 9, 2016 at the bottom of this post.

Then I loaded the module pcspkr:

root # modprobe pcspkr
root # lsmod | grep pcsp
pcspkr                  1875  0
root # echo -e '\a'

root #

There were no changes in ALSA Mixer. But now the BEL character and Backspace in a VT did result in a beep (I’ll call this a ‘pcbeep’ to distinguish it from the different-sounding beep produced using bell.oga). There was the usual bell.oga beep in xterm due to my use of xkbevd. If I stopped xkbevd, there was no pcbeep in X Windows from the shell commands shown in my previous post, although the following commands from any terminal in X Windows (even Konsole/Yakuake) did emit a pcbeep:

user $ sudo sh -c "echo -e '\a' > /dev/console"

user $ sudo sh -c "tput bel > /dev/console"

root # echo -e '\a' > /dev/console

root # tput bel > /dev/console

Then I unloaded the module pcspkr and loaded the module snd-pcsp:

root # modprobe -r pcspkr
root # modprobe snd-pcsp
root # lsmod | grep pcsp
snd_pcsp                7918  1
root # echo -e '\a'

root #

ALSA Mixer showed a new sound card named ‘pcsp‘ (Sound Card 2) with three channels: ‘Master’, ‘Beep’ and ‘BaseFRQ’. I could mute/unmute ‘Beep’ by pressing ‘M’ on the keyboard as usual, and I could toggle ‘BaseFRQ’ between two values:18643 and 37286. The BEL character and Backspace in a VT resulted in a pcbeep. There was the usual bell.oga beep in xterm due to my use of xkbevd. If I stopped xkbevd, there was no pcbeep in X Windows from the shell commands shown in my previous post, although the following commands from any terminal in X Windows (even Konsole/Yakuake) did emit a pcbeep:

user $ sudo sh -c "echo -e '\a' > /dev/console"

user $ sudo sh -c "tput bel > /dev/console"

root # echo -e '\a' > /dev/console

root # tput bel > /dev/console

Muting ‘Beep’ in ALSA Mixer did not mute the bell.oga beeps in X Windows, but it did mute the pcbeeps in the VTs.

Unlike the situation with the pcspkr module, occasionally there were brief low-volume crackles and pops from the laptop’s speakers.

So both drivers worked, but pcspkr performed better, although it could not be muted via ALSA Mixer. My recommendation to use pcspkr rather than snd-pcsp still stands.

Unlike pcspkr, I had to force the unloading of snd-pcsp:

root # modprobe -r snd-pcsp
modprobe: FATAL: Module snd_pcsp is in use.
root # rmmod -f snd_pcsp
root #

I then removed the Kernel’s ‘digital beep’ interface for the Intel HDA driver by rebuilding the Kernel with CONFIG_SND_HDA_INPUT_BEEP=N:

root # cd /usr/src/linux
root # mount /dev/sda1 /boot
root # make menuconfig
root # make && make modules_install
root # make install
root # grep PCSP /usr/src/linux/.config
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_INPUT_PCSPKR=m
CONFIG_SND_PCSP=m
root # grep BEEP /usr/src/linux/.config
# CONFIG_SND_HDA_INPUT_BEEP is not set
root #

After I rebooted, the behaviour was exactly the same as for CONFIG_SND_HDA_INPUT_BEEP=Y and CONFIG_SND_HDA_INPUT_BEEP_MODE=1.

So, there you have it. I believe my previous post was essentially correct regarding the functional design of the Kernel options. If you have a computer without a PC Speaker but it emulates one via the computer’s sound card, you have to set either CONFIG_INPUT_PCSPKR or CONFIG_SND_PCSP to get a beep in a VT, not set just CONFIG_SND_HDA_INPUT_BEEP and CONFIG_SND_HDA_INPUT_BEEP_MODE. However, even when my laptop emits beeps in a VT from the (emulated) PC Speaker, no beeps from the (emulated) PC Speaker are emitted in X Windows unless the user is the root user and the output is redirected to /dev/console. So, if you want to emit beeps in X Windows it is still better in my opinion to use xkbevd to play an audio file of a beep, as described in my previous post.

Update (October 9, 2016): Regarding KDE’s terminal applications emitting beeps, I am currently using KDE Plasma 5.7.5 and have been able to configure Konsole and Yakuake to play an audio file of a beep (as opposed to emitting a pcbeep) as follows:

  • In Konsole, click on ‘Settings’ > ‘Configure Notifications…’, select ‘Bell in Visible Session’ and ensure ‘Play a sound’ is ticked and a file is specified there (I specify /usr/share/sounds/freedesktop/stereo/bell.oga). If you wish, do the same for ‘Bell in Non-Visible Session’.
  • For Yakuake, press F12 to display the Yakuake window, click on the ‘Open Menu’ icon, select ‘Configure Notifications…’, select ‘Bell in Visible Session’ and ensure ‘Play a sound’ is ticked and a file is specified there (I specify /usr/share/sounds/freedesktop/stereo/bell.oga). If you wish, do the same for ‘Bell in Non-Visible Session’.

To beep, or not to beep, that is the question

Introduction

If your computer running Linux has the necessary hardware and is configured appropriately, applications and shell scripts can trigger a beep to signal an event such as an invalid keyboard entry, shutdown initiation, and so on. To check the current situation with your computer, enter the command shown below. Try it first in a Linux VT (virtual terminal) and then in a terminal window in X Windows. Do you hear a beep in each case?

user $ echo -e '\a'

The above command outputs the BEL character (ASCII code 007).

An alternative to the above command is:

user $ echo -e '\007'

Another command that should produce a beep is:

user $ tput bel

The tput utility is part of the ncurses package.

If you install the package app-misc/beep you can also use the ‘beep’ command (enter the command ‘man beep‘ to see its options):

user $ beep

Although you can enter the above-mentioned commands on the command line, they are intended to be used in shell scripts to notify the user about something.

There are thousands of posts on the Web regarding beeps in Linux, the majority of them concerned with disabling beeps because many people find them annoying. Historically, such beeps were emitted by the so-called ‘PC speaker‘. Note that the PC Speaker is not the same as the speakers connected to the sound card in your computer; the term refers to a small internal loudspeaker (moving-coil or piezoelectric) wired directly to the motherboard and intended solely to emit beeps to notify the user about something. Many modern computers, especially laptops, do not have a PC Speaker and either emulate one via the sound card or do nothing at all.

The reason people sometimes use the terms ‘bell’ and ‘ring’ instead of ‘beep’ is because old teletypwriters and teleprinters actually had an electromechanical bell which would ring when a certain dedicated character was received. I use the terms ‘beep’ and ‘bell’ interchangeably, although I prefer to use the term ‘beep’ when talking about audible notifications by computers.

I was motivated to write this post after helping a Gentoo Linux user to get his laptop to produce beeps (see the Gentoo Linux Forums thread ‘i want to beep [solved]‘). Producing a beep in Linux turns out to be more complicated than you would expect, and I’m not sure I fully understand the functional design of the applicable configuration options in the Kernel, nor their relevance (if any) to the X Windows server’s bell. Now, on the face of it the functionality of the applicable Kernel configuration options appears straightforward, but that is not the case in practice. Anyway, let’s look at how I believe a beep can be achieved (and disabled) in Linux…

PC Speaker drivers

Four Kernel options relate directly to a PC Speaker:

CONFIG_HAVE_PCSPKR_PLATFORM

If this is not set in the Kernel then CONFIG_PCSPKR_PLATFORM cannot be enabled.

CONFIG_PCSPKR_PLATFORM

Enable PC-Speaker support

This option allows to disable the internal PC-Speaker
support, saving some memory.

CONFIG_INPUT_PCSPKR

PC Speaker support

Say Y here if you want the standard PC Speaker to be used for
bells and whistles.

If unsure, say Y.

To compile this driver as a module, choose M here: the
module will be called pcspkr.

CONFIG_SND_PCSP

PC-Speaker support (READ HELP!)

If you don’t have a sound card in your computer, you can include a
driver for the PC speaker which allows it to act like a primitive
sound card.
This driver also replaces the pcspkr driver for beeps.

You can compile this as a module which will be called snd-pcsp.

WARNING: if you already have a soundcard, enabling this
driver may lead to a problem. Namely, it may get loaded
before the other sound driver of yours, making the
pc-speaker a default sound device. Which is likely not
what you want. To make this driver play nicely with other
sound driver, you can add this into your /etc/modprobe.conf:
options snd-pcsp index=2

You don’t need this driver if you only want your pc-speaker to beep.
You don’t need this driver if you have a tablet piezo beeper
in your PC instead of the real speaker.

Say N if you have a sound card.
Say M if you don’t.
Say Y only if you really know what you do.

If your computer does have a PC Speaker, you would use either CONFIG_INPUT_PCSPKR or CONFIG_SND_PCSP, but not both. When configuring the Kernel you can specify ‘M’ to build the driver as an external module, in which case you can decide in userspace whether or not to load it. Or you can specify ‘Y’ to build the driver into the Kernel (do not specify both as ‘Y’ simultaneously, though).

If your computer does have a PC Speaker, an advantage of using CONFIG_SND_PCSP instead of CONFIG_INPUT_PCSPKR is that the former adds a virtual sound card named ‘pcsp’ with a channel (without volume control) named ‘Beep’, and you should be able to mute it via ALSA Mixer.

If you have a computer that has a sound card but does not have a PC Speaker (a laptop’s internal speakers are connected to a sound card, not a PC Speaker), the above two drivers do not really apply. I have always disabled them both in the Kernel, as my laptop does not have a PC Speaker.  Update (September 29, 2016): This is not always the case: if a computer uses a sound card to emulate a PC Speaker (typically laptops do this), then you do need to use one of these two drivers if you want to be able to hear event beeps in a VT — see my latest post Another look at beeps in Linux.

However, apparently for some laptops ALSA Mixer shows a channel named ‘Beep’ (with volume control) for the Intel HDA (High Definition Audio) sound card if CONFIG_INPUT_PCSPKR is set to ‘Y’ or ‘M’. I believe such laptops were designed to use their sound card to emulate a PC Speaker. I do not know whether or not the ‘digital beep’ Kernel options (see further on) are set in such cases, but Kernel bug report no. 13651 would appear to indicate that the design intention is for them to be set.

So, already things are confusing.

Of course, if your computer does have a PC Speaker and you don’t want it to emit beeps, set both CONFIG_INPUT_PCSPKR and CONFIG_INPUT_PCSP to ‘N’ in the Kernel. If either already exists as an external module and you do not wish to rebuild the Kernel, make sure the modules pcspkr and snd-pcsp are not loaded (blacklist them, for example).

Digital Beep

Now, there are two other Kernel options relating to event beeps. These are not for driving a PC Speaker, they are to enable the ALSA Intel HDA driver to emit event beeps in lieu of a PC Speaker: the so-called ‘digital beep’. In other words, these two options are intended to provide an alternative to using a PC Speaker. The two options are:

CONFIG_SND_HDA_INPUT_BEEP

Support digital beep via input layer

Say Y here to build a digital beep interface for HD-audio
driver. This interface is used to generate digital beeps.

CONFIG_SND_HDA_INPUT_BEEP_MODE

Digital beep registration mode (0=off, 1=on)

Set 0 to disable the digital beep interface for HD-audio by default.
Set 1 to always enable the digital beep interface for HD-audio by
default.

Note that the mode ‘2’ is no longer an option in newer Kernels.

So, if your installation uses the Intel HDA driver and you want your computer’s sound card to be able to emit beeps instead of a PC Speaker (which your computer may or may not have), set these two accordingly in the Kernel configuration:

user $ grep CONFIG_SND_HDA_INPUT_BEEP /usr/src/linux/.config
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1

The functional design of these Kernel options is not clear, but Kernel bug report no. 13651 appears to indicate that the design intention is for CONFIG_SND_HDA_INPUT_BEEP and CONFIG_SND_HDA_INPUT_BEEP_MODE to be used in addition to either CONFIG_INPUT_PCSPKR or CONFIG_SND_PCSP, not instead of them. In other words, if your computer has a PC Speaker but you want beeps to be routed via its Intel HDA sound card instead then I believe you are expected to use either of the following two sets of options:

Option 1
CONFIG_HAVE_PCSPKR_PLATFORM=Y
CONFIG_PCSPKR_PLATFORM=Y
CONFIG_INPUT_PCSPKR=Y (or =M)
CONFIG_SND_HDA_INPUT_BEEP=Y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1

Option 2
CONFIG_HAVE_PCSPKR_PLATFORM=Y
CONFIG_PCSPKR_PLATFORM=Y
CONFIG_SND_PCSP=Y (or =M)
CONFIG_SND_HDA_INPUT_BEEP=Y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1

On the other hand, if your computer has a PC Speaker and your installation uses the Intel HDA driver for a sound card but you do want your computer to emit beeps from the PC Speaker, I think you would set the two options as follows in the Kernel configuration:

CONFIG_SND_HDA_INPUT_BEEP=N
CONFIG_SND_HDA_INPUT_BEEP_MODE=0

If you read the comment by ALSA developer Takashi Iwai quoted in Kernel bug report no. 13651 you’ll see that the functionality is not at all straightforward. For example, on some computers, especially laptops (which normally do not have a PC Speaker), the beep may be emitted via the sound card irrespective of whether or not you set CONFIG_SND_HDA_INPUT_BEEP.

X Windows

A beep can be emitted in X Windows, and I have seen this beep referred to as the ‘X Windows server bell’ or the ‘X Windows keyboard bell’.

Given that X Windows can emit a beep via the sound card when neither the pcspkr module nor the snd-pcsp module is loaded and CONFIG_SND_HDA_INPUT_BEEP=N and CONFIG_SND_HDA_INPUT_BEEP_MODE=0, I assume X Windows emits beeps directly to the default sound card irrespective of the settings of those Kernel options. I could be wrong, but I have not found any explanation on the Web about the underlying mechanism; the X.Org Web site FAQ ‘How can I configure the Xserver bell (xkbbell) to use the sound subsystem of my computer? (ALSA, OSS, etc.)‘ simply states:

Answer (hopefully) goes here.. 🙂

*shrug*.

Below is a summary of the commands to disable, enable and configure the beep in X Windows.

To disable beeps in X Windows:

user $ xset b off

To enable beeps in X Windows:

user $ xset b on

To change the volume, pitch and duration of the beeps:

user $ xset b

For example, to set the beep volume to 25% without changing the pitch and duration:

user $ xset b 25

To return to the default settings:

user $ xset b

To view the current settings:

user $ xset q | grep bell

which displays the following (default) values in my case:

bell percent:  50        bell pitch:    400        bell duration:    100

To set the beep automatically each time X Windows starts, add the following line before the last one in the ~/.xinitrc file if you don’t use a Display Manager, otherwise use the Desktop Environment’s system settings GUI to run it at login:

xset b 20 400 20 &

PulseAudio

To confuse matters further, note that PulseAudio intercepts X11 beeps (see: PulseAudio Documentation – User Documentation – Modules – X Window system – module-x11-bell). Therefore, if your installation uses PulseAudio and you want the ability to emit event beeps in X Windows, you also need to configure PulseAudio so it does not ignore the beeps. This can either be done from the command line:

user $ pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell
user $ pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY

or you can edit /etc/pulse/default.pa and make sure the following lines are included in that file (they may already exist but are commented out):

load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
load-module module-x11-bell sample=x11-bell

On the other hand, if PulseAudio is installed and you want it to ignore event beeps in X Windows, delete or comment out the above-mentioned two lines in /etc/pulse/default.pa. You can achieve the same effect from the command line:

user $ pactl unload-module module-x11-bell

Configuring userspace to emit a ‘digital beep’

Installation of PulseAudio will have created the directory /usr/share/sounds/freedesktop/ and sub-directories containing various Ogg Vorbis audio files, including the ‘digital beep’ file bell.oga. If your installation does not have PulseAudio installed, you can obtain the same file /usr/share/sounds/freedesktop/stereo/bell.oga by installing the package x11-themes/sound-theme-freedesktop instead. You can configure your installation to use this file to emit a ‘digital beep’ in X Windows (but not in a VT) by using the XKB (X Windows keyboard extension) event daemon as explained in a post on the superuser Web site. That post relates to Ubuntu, but the basic principle applies whatever the Linux distribution.

Now, in my case I am using KDE Plasma 5 in Gentoo Linux, and I cannot hear any beep/bell in Konsole and Yakuake. I came across KDE bug report no. 177861 that has been outstanding since 2008, which indicated that KDE’s terminal applications will not emit beeps even if you do have a PC Speaker and your Kernel has been correctly configured to use it, or even if you have configured your installation to use a ‘digital beep’. You may have better luck with a different Desktop Environment but in KDE you will have to use a non-KDE X Windows terminal application if you want to hear beeps produced by shell scripts.

Update (October 9, 2016): Regarding KDE’s terminal applications emitting beeps, I am currently using KDE Plasma 5.7.5 and have been able to configure Konsole and Yakuake to emit a ‘digital beep’ as follows:

  • In Konsole, click on ‘Settings’ > ‘Configure Notifications…’, select ‘Bell in Visible Session’ and ensure ‘Play a sound’ is ticked and a file is specified there (I specify /usr/share/sounds/freedesktop/stereo/bell.oga). If you wish, do the same for ‘Bell in Non-Visible Session’.
  • For Yakuake, press F12 to display the Yakuake window, click on the ‘Open Menu’ icon, select ‘Configure Notifications…’, select ‘Bell in Visible Session’ and ensure ‘Play a sound’ is ticked and a file is specified there (I specify /usr/share/sounds/freedesktop/stereo/bell.oga). If you wish, do the same for ‘Bell in Non-Visible Session’.

Below I explain how I implemented a ‘digital beep’ in KDE Plasma 5.

First I installed the XKB event daemon:

root # emerge xkbevd

The package vorbis-tools was already installed, otherwise I would have installed that too in order to install an audio player for Ogg Vorbis audio files:

root # emerge vorbis-tools

PulseAudio was also already installed, and hence an appropriate audio file for a beep already existed. Had I not previously installed PulseAudio I would have installed the following package to get an appropriate Ogg Vorbis audio file:

root # emerge sound-theme-freedesktop

I created the file /home/fitzcarraldo/.config/autostart/xkbevd.desktop containing the following:

[Desktop Entry]
Comment[en_GB]=Software terminal bell
Comment=Software terminal bell
Exec=xkbevd -bg
GenericName[en_GB]=XKB Event Daemon
GenericName=XKB Event Daemon
Icon=system-run
MimeType=
Name[en_GB]=XKB Event Daemon
Name=XKB Event Daemon
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=fitzcarraldo	

and I changed its permissions:

user $ chmod 755 /home/fitzcarraldo/.config/autostart/xkbevd.desktop

I created the file /home/fitzcarraldo/.xkb/xkbevd.cf containing the following:

soundDirectory="/usr/share/sounds/"
soundCmd="ogg123 -q"

Bell() "freedesktop/stereo/bell.oga"

If the file /usr/share/sounds/freedesktop/stereo/bell.oga does not exist in your installation then you can copy any suitable audio file of your choice into the directory /usr/share/sounds/ or use one of the existing audio files in that directory, and specify its filename in xkbevd.cf. For example:

soundDirectory="/usr/share/sounds/"
soundCmd="aplay -q"

Bell() "beep.wav"

Notice that the choice of audio player is up to you. In the first example of xkbevd.cf I specified the ogg123 player, whereas in the second example I specified the aplay player.

The aforementioned bug in KDE Konsole and Yakuake prevented me from testing the use of the XKB event daemon, so I installed a non-KDE X Windows terminal application to see if the ‘digital beep’ would work in that:

root # emerge xterm

The command echo -e '\a' generates a beep in xterm. So the ‘digital beep’ approach does work, albeit use of the XKB event daemon means you are limited to using it in X Windows. To reiterate, as the XKB event daemon is for X Windows, no ‘digital beep’ is generated if you enter a beep command outside of X Windows (e.g. in a VT).

By the way, I’m currently using Gentoo Stable Branch and hence Version 5.6.5 of KDE Plasma, and there is another KDE bug to complicate matters further: ‘System Settings’ > ‘Autostart’ > ‘Add Program…’ does not save all the entries I make via the GUI to the .desktop file, and does not set the file permissions correctly either. I don’t know if that is an upstream bug or a bug in the Gentoo implementation of Plasma 5.6.5. Anyway, that is why I manually created xkbevd.desktop and manually set the permissions, rather than using System Settings.

Instead of launching the XKB event daemon by using a .desktop file in ~/.config/autostart/, if you don’t use a Display Manager you could launch it by adding the command in the file ~/.xinitrc.

Summary

All the following factors govern whether or not your computer will issue a beep for the BEL character:

  • the specific hardware and firmware in your computer;
  • CONFIG_HAVE_PCSPKR_PLATFORM;
  • CONFIG_PCSPKR_PLATFORM;
  • CONFIG_INPUT_PCSPKR;
  • CONFIG_SND_PCSP;
  • CONFIG_SND_HDA_INPUT_BEEP;
  • CONFIG_SND_HDA_INPUT_BEEP_MODE;
  • X Windows settings;
  • PulseAudio configuration (if installed);
  • a bug in KDE’s terminal applications (if installed).

A. If you are hearing event beeps but don’t want them:

  • Preferably, set CONFIG_HAVE_PCSPKR_PLATFORM and CONFIG_PCSPKR_PLATFORM both to ‘N’.
  • Either set both CONFIG_INPUT_PCSPKR and CONFIG_SND_PCSP to ‘N’ in your Kernel, or, if either driver exists as a module (pcspkr and snd-pcsp, respectively), blacklist it.
  • Make sure CONFIG_SND_HDA_INPUT_BEEP is set to ‘N’.
  • Make sure the X Windows bell is turned off.
  • If you also have PulseAudio installed, make sure the PulseAudio module module-x11-bell is not loaded (also check /etc/pulse/default.pa to see if it has been enabled by default).

B. If you are not hearing event beeps but you do want to hear them:

1. If you are sure your computer has a PC Speaker:

  • Make sure CONFIG_HAVE_PCSPKR_PLATFORM and CONFIG_PCSPKR_PLATFORM are set to ‘Y’.
  • Either set CONFIG_INPUT_PCSPKR to ‘M’ and CONFIG_SND_PCSP to ‘N’ in your Kernel, or, if the module snd-pcsp already exists, blacklist it.
  • Make sure the module pcspkr exists and is not blacklisted.
  • Make sure the module pcspkr is loaded after the module snd-hda-intel.
  • Make sure CONFIG_SND_HDA_INPUT_BEEP is set to ‘N’.
  • Make sure the X Windows bell is turned on and the volume is turned up.
  • If you have PulseAudio installed, make sure the PulseAudio module module-x11-bell is loaded (check /etc/pulse/default.pa to ensure it includes the applicable lines, or issue the two commands listed earlier).
  • If you use KDE, use a non-KDE terminal application until KDE bug report no. 177861 is fixed.
  • If, after doing all the above, you still do not hear a beep in X Windows, follow the procedure in the section above titled Configuring userspace to emit a ‘digital beep’.

Above I have recommended using pcspkr. However, an advantage of using snd-pcsp instead is that it adds a virtual sound card with a channel named ‘Beep’ and you should be able to mute that channel via ALSA Mixer as you wish. Therefore, if you do opt to use the module snd-pcsp instead of pcspkr then make sure you specify the module option (or Kernel Quirk if you built the driver into the Kernel) described in the Kernel Help text quoted earlier, so that pcsp does not become the default sound card instead of the Intel HDA sound card.

2. If your computer does not have a PC Speaker:

  • Preferably, set CONFIG_HAVE_PCSPKR_PLATFORM and CONFIG_PCSPKR_PLATFORM both to ‘N’. *
  • If you leave CONFIG_HAVE_PCSPKR_PLATFORM and CONFIG_PCSPKR_PLATFORM both set to ‘Y’, either set CONFIG_INPUT_PCSPKR and CONFIG_SND_PCSP both to ‘N’, or, if either module already exists, blacklist it. *
  • Make sure CONFIG_SND_HDA_INPUT_BEEP is set to ‘Y’ and CONFIG_SND_HDA_INPUT_BEEP_MODE is set to ‘1’ (I’m not sure this step is required for all computers).
  • Make sure the X Windows bell is turned on and its volume is turned up.
  • If you have PulseAudio installed, make sure the PulseAudio module module-x11-bell is loaded.
  • Use the XKB Event Daemon method to play an audio file (‘digital beep’) when the BEL character is detected in X Windows.
  • If you use KDE, use a non-KDE terminal application until KDE bug report no. 177861 is fixed.
    Update (October 9, 2016): Regarding KDE’s terminal applications emitting beeps, I am currently using KDE Plasma 5.7.5 and have been able to configure Konsole and Yakuake to emit a ‘digital beep’ — see my update in the section titled Configuring userspace to emit a ‘digital beep’.

    * If your computer’s hardware and firmware have been designed to emulate a PC Speaker via a sound card, you may find that you can use the pcspkr (or snd-pcsp) driver to generate beeps in a VT. As the saying goes, your mileage may vary.

    And Finally

    If you know precisely how all these Kernel options are supposed to interact, do comment. Or if you know the relationship, if any, between the X Windows beep (a.k.a. ‘bell’) and these Kernel options, please also comment.

    Update (September 29, 2016): See my latest post Another look at beeps in Linux for the results of some experiments with these Kernel options on my laptop, giving more insight into how to configure them and how they work.

Getting KDE Plasma 5 to work with the NVIDIA closed-source driver in Gentoo Linux

Up until a few days ago I had avoided migrating from KDE 4 to KDE Plasma 5, Frameworks 5 and Applications 5 — I’ll refer to the latter three package categories collectively as ‘KDE:5’ — on my main laptop, a Clevo W230SS with NVIDIA Optimus hardware and Gentoo Linux Stable Branch installed. My reluctance to migrate to KDE:5 was because of various problems I experience in KDE:5 on my Compal NBLB2 laptop, which has Gentoo Testing Branch installed (currently Plasma 5.7.1, which you would expect to be less buggy than Plasma 5.5.5 in the Gentoo Stable Branch).

Recently the maintainers of Gentoo’s KDE ebuilds removed some of the KDE 4 ebuilds and made some of the other ebuilds dependent on KDE:5. It became more complicated and convoluted to keep KDE 4 going, so I reluctantly threw in the towel and migrated to KDE:5 on my main laptop. I wish I could have kept KDE 4 on that machine, as KDE 4 worked extremely well (and looked great too).

My first problem after migrating was the infamous black screen in X Windows at start-up. Trying the various suggestions in the Gentoo Wiki did not help and, for the first time since I’ve owned the Clevo laptop, I was glad it has NVIDIA Optimus hardware as I was able to change from using nvidia-drivers to using xf86-video-intel, which got me to a usable Desktop after I switched display managers from SDDM (see the system log file error messages below) to LightDM.

Jul 17 04:32:37 clevow230ss sddm-helper[3245]: PAM unable to dlopen(/lib64/security/pam_systemd.so): /lib64/security/pam_systemd.so: cannot open shared object file: No such file or directory
Jul 17 04:32:37 clevow230ss sddm-helper[3245]: PAM adding faulty module: /lib64/security/pam_systemd.so

Although I had merged x11-misc/sddm with USE="-systemd" because my installation uses OpenRC, the above error messages made me suspect that something is wrong with the sddm-0.13.0-r3 ebuild, which is why I switched to LightDM.

However, using solely the Intel driver is not a long-term solution for me because DraftSight CAD software is slower with the Intel driver, so I was keen to get Plasma 5 working with the closed-source NVIDIA driver (I do not want to use Bumblebee).

I managed to get LightDM and Plasma 5 working with nvidia-drivers by doing the following:

  1. Merge x11-misc/lightdm.
  2. Re-merge kde-plasma/plasma-meta with USE="-sddm".
  3. Remove the x11-misc/sddm package and kde-plasma/sddm-kcm package by using the command ‘emerge --ask --depclean‘.
  4. Edit the file /etc/lightdm/lightdm.conf to add the line ‘greeter-session=lightdm-kde-greeter‘ as specified in Gentoo Wiki article LightDM.
  5. Edit the file /etc/lightdm/lightdm.conf to add the line ‘display-setup-script=/etc/X11/Sessions/plasma‘ (any file name would do).
  6. Create the above-mentioned Bash script /etc/X11/Sessions/plasma containing the following:
#!/bin/bash
GPU=`eselect opengl list | grep \* | awk '{ print $2 }'`
if [ "$GPU" = "nvidia" ]; then
    xrandr --setprovideroutputsource modesetting NVIDIA-0
    xrandr --auto
fi

I can now switch between the NVIDIA closed-source driver and the Intel open-source driver using the method described in an earlier post: Switching between Intel and NVIDIA graphics processors on a laptop with NVIDIA Optimus hardware running Gentoo Linux.

How to group the entries in the right-click menu of a KDE file manager

This is easier to explain by giving an example. I will use PeaZip as my example, but the principle applies whatever the menu entries.

Immediately after installing PeaZip Portable on my main laptop running Gentoo Linux by using the steps in one of my earlier posts, the resulting right-click menu in KDE Dolphin looks like the screenshot below. Notice that the PeaZip entries in the Actions sub-menu are not listed contiguously.

Ungrouped entries for PeaZip in KDE 4 service menu

Ungrouped entries for PeaZip in KDE 4 service menu

But in KDE it is relatively easy to group menu entries tidily in a sub-menu, as shown in the screenshot below.

Grouped entries for PeaZip in KDE 4 service menu

Grouped entries for PeaZip in KDE 4 service menu

The peazip*.desktop files for the five PeaZip actions shown in the above screenshots are located in the directory ~/.kde4/share/kde4/services/ServiceMenus/ and each file includes the line ‘X-KDE-Submenu='.

All I had to do was edit each of the five peazip*.desktop files and change that line in each file to ‘X-KDE-Submenu=PeaZip‘.

That’s it!

Dragging windows between sides of the KWin Desktop Cube

The KDE Desktop Cube is one of the ‘eye-candy’ features provided by KWin’s Desktop Effects. Actually I use the desktop cube a lot at work (far more than at home), as I often have several windows open simultaneously on each virtual desktop (cube side) and, for some reason, I find it more natural (and fun) to rotate an on-screen cube rather than switch between 2D virtual desktops. Perhaps it’s because we live in a 3D world?

I also like to be able to drag windows from one cube face to another, a KWin feature I also find natural and fast to use. However, its configuration is not as intuitive as that of some of the other desktop effects. Also, this feature can be prevented from working if some of the other effects are enabled. Sometimes I find the feature has become disabled after I have upgraded KDE. For example, if I drag a window to the edge of the screen the cube stubbornly refuses to rotate and the window snaps to the side of the screen and expands vertically (something with which Windows 7 users will be familiar). I always forget how to reconfigure KWin to be able to drag windows between cube faces, and end up wasting several minutes fiddling with the KWin settings. This happened to me again today, so, in case others get fed up trying to get it working, here is a configuration that works for me:

  • Select ‘System Settings’ > ‘Desktop Effects’.
  • Click on the ‘All Effects’ tab.
  • ‘Desktop Cube’ and ‘Desktop Cube Animation’ should be ticked.
  • Click on the spanner icon of ‘Desktop Cube Animation’ and make sure ‘Start animation when moving windows towards screen edges’ is not ticked.
Configure desktop effects - Desktop Cube Animation

Configure desktop effects - Desktop Cube Animation

  • Select ‘System Settings’ > ‘Workspace Behaviour’.
  • Click on ‘Screen Edges’.
  • Make sure ‘Maximise windows by dragging them to the top of the screen’ and ‘Tile windows by dragging them to the side of the screen’ are not ticked.
  • Select ‘Only When Moving Windows’ for ‘Switch desktop on edge’.
  • Adjust the ‘Activation delay’ and ‘Reactivation delay’ to your taste. I find 150 ms and 1000 ms, respectively, work well on my main laptop.
Configure active screen edges

Configure active screen edges

Evaluating Sabayon Linux Xfce

Sabayon Linux Xfce on Acer Aspire 5920

EDIT (January 18, 2014): This article refers to an installation of Sabayon Linux from the Version 10 ISO, when the distribution still used OpenRC as the init system, rather than systemd. Therefore some of the commands in this article are no longer applicable to the current versions of the distribution using systemd.

The last time I installed SL (Sabayon Linux) on one of my own machines was 18 months ago, and that was my media centre. I haven’t touched that installation since: “If it ain’t broke, don’t fix it.” My most recent desktop SL installation was on a relative’s Acer Aspire 5738 laptop just over a year ago, but it was disappointing. In the end I did get SL working with the laptop’s NVIDIA GPU but, amongst other things, ALSA didn’t work correctly and even I couldn’t fix it. The owner was understandably unimpressed with SL and ended up installing Ubuntu over it, which worked perfectly out of the box.

Since then I have not used SL much apart from occasionally booting an ISO image of the latest SL LiveDVD in VirtualBox on my main laptop running Gentoo, or on the family PC running Windows Vista. So I was keen to try a recent edition of SL, and the opportunity arose this week as I had to replace an Acer Aspire 5920 laptop belonging to a family member and I thought it would be interesting to install SL Xfce Edition on it. (I bought a Samsung NP350V5C laptop to replace it, if you’re interested.)

That Acer Aspire laptop is 4 years old and had been causing a lot of hassle: a hardware design fault made the display flicker, and Windows Vista often refused to connect via WiFi to my home network. A quick search of the Web turns up plenty of complaints about these two problems with this particular Acer model. Oh, and one more thing, Windows Vista was unbelievably slow on the laptop. You really could go and make a cup of coffee in the time it took to boot.

I got a local PC repair shop to look at the ribbon cable in the lid that is known to cause the flickering display, and decided to wipe the HDD (good riddance, Vista) and install SL 10 64-bit Xfce. Below I list the laptop’s specification.

– Acer Aspire 5920-5A2G25Mi
– 15.4″ (1280 x 800)
– 250 GB SATA HDD
– Intel Core 2 Duo T5550 1.83 GHz
– 2GB DDR2 RAM
– Intel Mobile GM965/GL960 Integrated Graphics Controller with Intel Graphics Media Accelerator X3100 with up to 358 MB Shared Graphics
– Intel 82801H HD Audio Controller
– Broadcom Netlink BCM5787M Gigabit Ethernet PCIe
– Intel PRO/Wireless 3945ABG
– Ricoh RSC832 IEEE 1394 Firewire Controller
– Ricoh R5C822 SD/SDIO/MMC/MS/MSPro Adapter
– Ricoh R5C843 MMC Host Controller
– Ricoh RSC592 Memory Stick Bus Host Adapter
– Ricoh xD-Picture Card Controller
– Suyin Corp. Acer CrystalEye Webcam (0.3 Megapixels)
– CD/DVD reader/writer
– 4 USB2 ports
– 56K ITU V.92 modem port

This model has a Bluetooth button but does not have Bluetooth hardware installed. The Bluetooth button can be configured for other purposes, as I discovered after installing SL.

I downloaded the file Sabayon_Linux_10_amd64_Xfce.iso from the SL Download page, and used UNetbootin version 581 to create a LivePenDrive on a 4GB pen drive. I inserted the pen drive into the Aspire, booted, pressed F2 to get to the BIOS menu, configured the BIOS to boot the pen drive, and rebooted.

The SL Live environment loaded without problem and I was able to access my home network via WiFi with ease.

I launched the SL installer and was pleasantly surprised to see that it is more polished that the version I used a year ago. However, over the years I have found that the SL Installer often crashes when it tries to partition the HDD, and the same thing occurred this time. Normally when this happens I boot up a SystemRescueCd LiveCD and use GParted to partition the HDD and format the partitions, then I reboot the SL LiveDVD and re-run the Installer, which then works. This time, however, I just decided to open a Terminal window from the SL Live environment and use the fdisk command to create the partitions manually. Then I re-ran the SL Installer. I was now able to specify the mount points for the partitions and format them, and installation was completed quickly.

I booted the HDD and was pleasantly surprised. Almost everything worked ‘out of the box’ (including the memory card slot), and the overall impression was of a polished distribution with an attractive Xfce desktop. SL looks great on the laptop’s relatively low resolution 1280×800 screen, and I suspect the Infinality patches make a difference. Most of the applications I needed were already installed, to make life easier. Apart from the positive impression aesthetically, I am very impressed with the speed at which it runs. This is one of the snappiest Linux installations I have used.

I did need to perform a few tweaks, and I’ll mention the main ones throughout the remainder of this article.

As SL is a rolling distribution I wanted to bring the installation bang up to date, so I used the usual Entropy commands in a Terminal window:

$ su
Password:
# equo update && equo upgrade && equo conf update

I did not need to upgrade the kernel using the SL kernel-switcher utility, as the version of the latest kernel in the SL Entropy Weekly repository was the same as the version installed by the LiveDVD.

Tapping on the touchpad didn’t work out of the box, but all I had to do was configure it using Xfce’s ‘Applications Menu’ > Settings > ‘Mouse and Touchpad’ > Touchpad (tick ‘Tap touchpad to click’).

Although the Uncomplicated Firewall was installed, a front-end wasn’t, so I installed UFW Frontends:

# equo install ufw-frontends

I launched ufw-gtk (Firewall Manager) and configured UFW as explained in How to config ufw/ufw-frontends for Samba browsing/printing.

Xfce has some useful plugins and utilities, so I installed some of those:

# equo install xfce4-power-manager xfce4-sensors-plugin xarchiver xfce4-battery-plugin thunar-volman xfburn tumbler

A calculator is always handy too:

# equo install galculator

The system clock was not displaying the correct time (it was one hour ahead of actual time) so I followed the SL Wiki article HOWTO: Clock, Time, UTC, Dual boot with Windows and then used the Linux date command to set the correct date and time:

# date MMDDhhmm

OPTIONAL: To keep the system clock in sync with a remote time server when the laptop is connected to the internet, I installed the package net-misc/ntp:

# equo install ntp

and then edited the file /etc/conf.d/ntpd so it contains NTPD_OPTS="-g" and I added the initscripts for NTP Client (executes once at start up) and the NTP daemon (runs continuously) to the default runlevel:

# rc-update add ntpd default
# rc-update add ntp-client default

The SL Xfce Edition LiveDVD installs the Midori Web browser which is lightweight and good, but not as good as Firefox, my favourite browser, so I replaced Midori with Firefox:

# equo remove midori
# equo install firefox

I found that the film trailers on the iTunes Movie Trailers Web site would not play in the browser, so I installed gecko-mediaplayer and gnome-mplayer (and used Edit > Preferences > Player to set ‘Video Output’ to gl for OpenGL or xv for XVideo) and I disabled the Totem plugin in Firefox (Add-ons > Plugins and disable ‘QuickTime Plug-in 7.6.6 The Totem 3.4.3 plugin handles video and audio streams.’) which solved the problem. An earlier blog post of mine also mentions this: Playing QuickTime videos in Firefox and Chromium + XVideo bug in AMD Catalyst 11.11 and 11.12 driver.

As the volume control thumb wheel on the laptop did not work in SL, I used Xfce’s Settings > Keyboard to configure the two unallocated function keys F9 and F10 to be Decrease Volume and Increase Volume, respectively:

amixer set Master 5%- allocated to F9
amixer set Master 5%+ allocated to F10

and I allocated F8 as the Mute button, as it already had a symbol for that printed on it:

amixer set Master toggle

Sound quality is excellent.

I installed Skype:

# equo install skype emul-linux-x86-medialibs

which works well apart from the video image from the laptop’s Acer CrystalEye Webcam (310,000 pixels, circa 640×480), which has flickering blue horizontal lines. I installed GUVCView, a GUI to configure the uvcvideo driver module.

# equo install guvcview

My adjustments using GUVCView helped slightly, but the image quality is still not great. The image is just about tolerable when the subject is illuminated by daylight, but poor in artificial light. Searching the Web tells me that plenty of Windows users have had problems with this model of Webcam too.

I wanted to be able to access computers running Windows on my home network, and to be able to print on printers connected via USB to those computers, so I added SAMBA to the default runlevel so that it would be started automatically when the laptop boots:

# rc-update add samba default

I also edited the configuration file /etc/samba/smb.conf to be as follows:

[global]
netbios name = Aspire5920
message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
printcap name = cups
printing = cups
printer admin = @adm
log file = /var/log/samba/log.%m
max log size = 50
map to guest = bad user
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
name resolve order = wins lmhosts bcast
wins support = yes
dns proxy = no

[homes]
comment = Home Directories
read only = no

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes

[printers]
comment = All Printers
path = /var/spool/samba
guest ok = yes
printable = yes
create mask = 0700
print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.

[print$]
path = /var/lib/samba/printers
write list = @adm root
guest ok = yes

[PUBLIC]
path = /home/fitzcarraldo/Public/
guest ok = yes
read only = no

I installed the drivers for two of my printers:

# equo install gutenprint

and used the CUPS browser interface http://localhost:631/ to configure CUPS to use a Canon PIXMA MP510 via SAMBA connected to a PC running Vista, and to use a Canon PIXMA MP560 on my home network via WiFi.

When configuring CUPS to use the Canon PIXMA MP510 printer connected to the family PC that is running Windows Vista, I had to specify the printer’s SMB address as follows:

smb://workgroup/username:password@hostname/printername

where username is the name of a user account on the Windows Vista PC, and password is the password of that user account.

For example, let’s say that I configured Windows Vista on the family PC some years ago as follows:

PC name: SA90

Work group name: WORKGROUP

Printer name: Canon_MP510_Printer

User name: Fitzcarraldo

User password: MollyAida

then the SMB address I would specify to the CUPS Manager for the printer would be:

smb://WORKGROUP/Fitzcarraldo:MollyAida@SA90/Canon_MP510_Printer

I configured the Xfce top Panel to show the Xfce LCD brightness plugin, Xfce audio mixer, Xfce sensor plugin, Xfce battery monitor. By the way, Xfce Power Manager works correctly when the laptop is using its battery.

Xfce makes it easy to configure shortcut keys: ‘Applications Menu’ > Settings > Keyboard | ‘Application Shortcuts’. I configured the browser launch key on the left of the laptop’s main keyboard to launch Firefox. And, as I am used to launching Yakuaki in KDE using F12, I set up F12 in Xfce to run /usr/bin/terminal (I could instead have installed Guake and used Xfce’s ‘Applications Menu’ > ‘Session and Startup’ | ‘Application Autostart’ to configure Guake to launch automatically at start up).

Basically, almost everything works well.

Also, I installed superadduser and added another user successfully:

# equo install superadduser

Although the Xfce ALSA Mixer works fine, I installed PulseAudio Volume Control too:

# equo install pavucontrol

Actually you do need both an ALSA mixer and a PulseAudio mixer because you can get into the situation where the ALSA volumes are turned up but the PulseAudio volumes are turned down.

As I sometimes download YouTube videos for offline viewing, I installed the version of the excellent Python script youtube-dl that is in the SL Weekly repository:

# equo install youtube-dl

but it turned out to be the package net-misc/youtube-dl-2012.02.27, which wouldn’t download YouTube videos. I had to download the latest version of the script from the youtube-dl developer’s Web site, made it executable (chmod +x ~/youtube-dl) and copied it to the directory /usr/bin/ to overwrite the 2012.02.27 version installed via Entropy.

Thunar was taking a very long time to open the first time I launched it after each reboot, and was also launching twice. To stop this happening I edited the file /usr/share/gvfs/mounts/network.mount and changed AutoMount=false.

Furthermore, the following message sometimes appears in a pop-up window when launching Thunar:

Failed to open directory “fitzcarraldo”.
Error when getting information for file ‘/home/fitzcarraldo/.gvfs’: Transport endpoint is not connected.

Searching the Web indicated the following command might fix it:

# umount /home/fitzcarraldo/.gvfs

It seems to have helped, but the message does still appear sometimes.

One problem I experienced 18 months ago with the SL 5.4 E17 Edition — and I notice has been reported by several users in the SL Forums since then — is that SL does not always set up the user’s locale correctly. During installation I selected English as the language, the UK as my location and English (UK) for the keyboard, and ended up with the US locale:

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

What I want is the British locale. I rectified it by following Steps 3, 4 and 5 in the SL Forums post Re: en_GB language missing after install.. I think the SL Installer probably needs modifying.

Summary

SL 10 Xfce is an attractive installation demonstrating a fair amount of attention to detail, but the Installer has some frustrating problems with partitioning and the set up of the locale. These problems have been present for quite some time now and could be ‘brick walls’ for newcomers to Linux.

I use Xfce in Gentoo on a legacy laptop (Pentium III) and so am familiar with it, but it looks great in SL and just seems that little bit more polished.

But the main impression I get from this installation is just how zippy and responsive it is. Video runs smoothly however fast I jiggle around a media player window, and we’re talking a relatively low-end graphics processor here, not an AMD or NVIDIA GPU. Applications open really fast. Overall, it’s a pleasure to use.

When I think back to how Windows Vista ran on this laptop, the difference is like night and day. It’s like having a new, more powerful laptop. I’ve now added a user account for my wife as she has decided she will use it. Not bad for a laptop I thought I would give to my local repair shop for spares.

A guided tour of my KDE 4.8.4 desktop (Part 2)

In A guided tour of my KDE 4.8.4 desktop (Part 1) I gave a brief overview of the KDE desktop on my main laptop. This time I’m going to cover some applications, KDE and non-KDE, that I use. Just to prove that I don’t look at KDE through rose-tinted spectacles, I’ll also mention a few problems too.

I don’t use a desktop PC. This laptop is my main PC and I use it for all my professional and personal tasks. I travel frequently and have to connect to public and private networks (wired, wireless and broadband modems) and to many different network printers, so a reliable desktop environment and reliable network management software are essential. KDE satisfies the first requirement. The desktop environment-independent NetworkManager and its KDE front-end, the Plasma widget NetworkManagement, satisfy the second requirement. I also use my laptop for the usual leisure activities such as watching DVDs, video files and TV programmes; listening to music files, Audio CDs and Internet radio; messaging/telephony (PC-to-PC and PC-to-landline/mobile internationally); browsing the Web, blogging and so on.

So this is very much a mission-critical machine for me. The fact that I’m using KDE successfully for all these tasks is a testament to the power of KDE (and Linux, of course). I should also point out that, for a mission-critical machine, I’m living a little dangerously as I use the testing branch (a.k.a. unstable branch), rather than the stable branch, of Gentoo Linux. I’ve been using the unstable branch for several years on this laptop and its predecessor, with only a few hiccups, although I do have to keep an eye on the Gentoo forums in case someone reports a problem.

Office suites

Microsoft Word and LibreOffice Calc

Snapshot 1 - Microsoft Word and LibreOffice Calc

I use both LibreOffice and Microsoft Office 2007, the latter under WINE (see WINE tips: Giving each Windows application its own environment). Office 2007 guarantees me 100 per cent compatibility at work but I also find it easier and more reliable than LibreOffice with the large, complex documents and spreadsheets I create. That said, I also have many Word 97 documents and Excel 97 spreadsheets that I still need to access, and LibreOffice opens some of them that Office 2007 cannot. I prefer to use Writer rather than Word for simple tasks such as typing a letter, as I dislike the Ribbon Interface. And I’m happy to use Calc rather than Excel in the majority of cases.

Once I got Office 2007 running under WINE I did not have to boot into Windows any more, although recently that changed for one very specific task on one work project: checking out (downloading) a Microsoft Word file from a Microsoft SharePoint repository, editing it locally and checking it back in (uploading it). Using Firefox in Linux I can upload a Word file to the SharePoint repository initially, but I have to boot into Windows and use Internet Explorer and Word to check-out, edit and check-in the revised document. I’ve used third-party document management and collaboration software in the past that does not require the use of Internet Explorer and Word. I can see how Microsoft lock you into their product line, and I don’t like that.

For schematic diagrams and flowcharts I usually use an old version of Visio (5 Professional) I bought in 1999, again under WINE. I find Visio easier and faster to use than Dia, a GNOME application I also use sometimes for simple diagrams.

E-mail client

I use Thunderbird to access several POP3 e-mail accounts and, via the excellent DavMail, a couple of Microsoft Exchange OWA (Outlook Web Access) accounts at different companies. DavMail is a life-saver. Having to access those two accounts via a Web browser was a hassle and inefficient. A single e-mail client which can be used to access and manage all my e-mail accounts is a godsend. I still have work e-mails from more than ten years ago, and Thunderbird enables me to find information in them with ease. For professional use by ‘power users’, WebMail cannot hold a candle to a good e-mail client such as Thunderbird. I use a number of Thunderbird extensions which I find essential: Lightning (calendar); Provider for Google Calendar (bidirectional access to Google Calendar); Timezone definitions for Mozilla Calendar; Change quote and reply format (why isn’t this functionality built-in to Thunderbird?); ConfigDate (ditto); Enigmail (encyption/decryption of e-mails); ImportExportTools (conversion tools for different e-mail formats); Dictionaries for several languages.

One of the reasons I chose Thunderbird was because it is available for both Linux and Windows. As I can dual boot this laptop, I put Thunderbird’s data files on the Windows NTFS partition (Windows cannot access Linux file systems), and Thunderbird in either OS accesses the same data files. I virtually never boot into Windows, but it is good to know that I can access my e-mail accounts from either operating system using the same application.

Scanning

I occasionally use SANE scanner interface software and its GUI front-end XSane for scanning images and documents to create image files. But I am much more likely to use the GUI front-end gscan2pdf, as I often need to create PDF files for work. gscan2pdf is another application I find indispensable.

Web browsing

Browsers and Google Earth

Snapshot 2 - Browsers and Google Earth

I use Firefox and the KDE browser/file manager/universal viewer Konqueror. I configured Konqueror to use the WebKit rendering engine instead of KHTML (Install the package kwebkitpart then launch Konqueror, select Settings > ‘Configure Konqueror…’ and select ‘WebKit’ as the ‘Default web browser engine’ on the General tab). There have been a few times when Firefox has not been able to display a Web page properly or at all, and Konqueror came to the rescue. The KIO Slaves I mentioned in Part 1 also add to Konqueror’s versatility.

I use the Oxygen KDE Firefox extension (see Snapshot 2), a theme for Firefox that makes it look like a native KDE application. Very nice indeed.

Google Earth needs no introduction. It runs well in KDE on my laptop, and I find it useful both in my work and for personal use.

I have the KDE blogging client Blogilo installed and it was easy to configure it to synchronise with my blog. In fact I started preparing this article in Blogilo but had to abandon it as Blogilo would not save reliably my incomplete work to my hard disk. After losing changes several times I gave up and turned to my tried and tested KWrite to draft the article offline first. Shame, really, as Blogilo looks really handy for preparing blog posts offline and then uploading them. Hopefully the next release will work for me.

For Web site creation and editing I use KompoZer. It’s not as sophisticated as Dreamweaver, but is easy to use and does a good job for my purposes.

Messaging and telephony

I use Skype for Linux for PC-to-PC and PC-to-phone communication domestically and internationally. There is simply no alternative if I want to communicate with my Windows-using friends, family and work colleagues: they are not going to switch to anything else. Actually, I find Skype for Linux perfectly usable (unlike Skype for Android on my Motorola Xoom tablet, which has a fiddly and rather annoying user interface). In some countries the state-owned telecom provider blocks Skype for commercial reasons, but I have been able to circumvent this using Tor (see How to install and use Tor for anonymous browsing or to access country-restricted content from another country). Furthermore, some office networks I use also block Skype, to enforce the use of another product or to stop personal communication, but Tor has helped me out there too.

Graphics

I use the GIMP quite a lot, mostly for photo editing/retouching for work purposes but sometimes to edit/retouch personal photos. I have only used the vector graphics application Inkscape a few times at work and at home. I enjoyed using it to produce the graphics for a laptop ‘Powered by’ sticker.

Gwenview

Snapshot 3 - Gwenview

Apart from the excellent KDE image viewer Gwenview, which gets better with every release of KDE, I use GQView. GQview has been around for many years and its UI looks rather dated, but it has some powerful features which I find useful at work (and at home). GQview makes it easy for me to assign keywords to image files and to search on keywords; to examine EXIF data; to print thumbnail proof sheets; to view multiple image files and page through directories of image files, and so on. This application has often been of help to me at work.

Okular and Adobe Reader

Snapshot 4 - Okular and Adobe Reader

KDE’s Okular document viewer and Adobe Reader are in frequent use on my laptop. I use them both but resort to Adobe Reader for the huge PDF files I sometimes have to view at work, as they load quicker in Adobe Reader. Also, Okular has had a rather irritating habit of printing Landscape pages in Portrait, and vice versa. This problem seems to come and go with different releases of Okular.

CAD

I hardly ever need to use CAD applications, but occasionally I do need to view some old AutoCAD files. For this I use an old version (2009-en-1.06-1) of VariCAD Viewer which opens those old files although it can’t open newer AutoCAD files. I tried unsuccessfully to install newer versions of VariCAD Viewer in the past, but have not tried again recently.

E-books

I only recently began reading e-books. The EPUBReader Firefox extension is an excellent and easy-to-use e-book reader, library manager and shop window for both free and commercical e-books in ePub format. The display of book pages when using the extension as a reader is better than many of the dedicated e-book applications I have seen.

Calibre is an excellent dedicated e-book reader and format converter that I discovered by accident when reading a review of the Amazon Kindle. If you are looking for an application that can handle all the various e-book formats, convert between them, manage your e-book library, upload and download e-books, and act as a reader, look no further. Even the application’s Web site oozes class.

Multimedia

SMPlayer multimedia player, and YouTube in Firefox

Snapshot 5 - SMPlayer multimedia player, and YouTube in Firefox

I have far too many multimedia players installed, but I like to alternate between them. In any case it’s useful to have several players installed because sometimes one of them is able to play a certain file that another cannot.

SMPlayer, VLC and Xine play DVDs, CDs, music files, video files, Internet radio, and digital TV (DVB). I like all three.

Miro is a music and video player, torrent downloader, Internet TV and podcast viewer, and more. Another very polished application I enjoy using.

Dragon Player is a KDE player for CDs, DVDs, audio and video files. It plays DVDs, audio and video files well on my laptop, but cannot play Audio CDs for some reason. It is not as versatile or as polished as the multimedia players mentioned above, so I rarely use it.

UPDATE (January 10, 2014): As of KDE 4.11.3, Dragon Player can play Audio CDs on my laptop. I believe this was due to an update to KDE’s Phonon and/or the Phonon backends.

Clementine music player

Snapshot 6 - Clementine music player

The music players I have installed are Audacious, Clementine and Amarok. These three applications focus on playing and managing collections of music files, Audio CDs and streaming Internet radio.

In the days of KDE 3 I used exclusively Amarok 1.4, which was darn near a perfect music player. But new releases of Amarok were buggy in early releases of KDE 4, and today Amarok still does not work as well for me as the KDE 3 version did. Some of the album covers disappear randomly from the album cover manager, and it is irritating to have to restore covers. Clementine, on the other hand, has no trouble managing album covers and I find it is more polished than Amarok and nicer to use all round. I cannot get Amarok to play Audio CDs with the KDE GStreamer Phonon backend, only with the KDE VLC Phonon backend. Even then the optical drive in my laptop spins very fast and produces a loud noise, making listening to Audio CDs painful. Audacious, on the other hand, plays Audio CDs quietly and perfectly on my laptop. Although Clementine is superb in other respects, for some reason it cannot play Audio CDs on my laptop, whichever KDE Phonon backend is selected. All three players can stream Internet radio without problem, although the long pre-configured list of radio stations in Clementine is simply excellent. If Clementine could play Audio CDs on my laptop, it would be my favourite music player.

UPDATE (January 10, 2014): As of KDE 4.11.3, Clementine can play Audio CDs on my laptop. I believe this was due to an update to KDE’s Phonon and/or the Phonon backends.

MIDI players and Karaoke

I have four different MIDI players installed. PyKaraoke (see HOWTO: PyKaraoke) and KDE’s own KMid can both play MIDI files with and without embedded karaoke lyrics. TiMidity++ is a MIDI file player, as well as an ALSA sequencer which can be used by the other MIDI player applications here. Drumstick has three applications: a MIDI player, a drumkit sequencer and a virtual piano keyboard. I enter the following command once before launching any of them:

modprobe snd_seq && timidity -iA -Os

Actually, I have put the above command in a Desktop Configuration File with a nice icon in my Desktop directory, so I just double-click on it. I could have instead loaded the snd_seq module automatically at startup by specifying it in the file /etc/conf.d/modules.

Audio CDs

KsCD is a simple KDE application with a sole purpose: to play Audio CDs. For me it fails miserably in this task, and has done in several releases of KDE. The last time I remember it working for sure was in KDE 4.3.3, and here we are today with KDE 4.8.4. The KDE Bug Tracking System has quite a few bug reports regarding KsCD. I don’t know if the application itself has a bug, or if the KDE Phonon backends are buggy, or if KDE has a bug, or if there is a problem with udev, or a combination. Anyway, whatever the reason, in my case KsCD is useless. Come to that, for Audio CDs Amarok is next to useless. Luckily for me, Audacious, SMPlayer, VLC and Xine can play Audio CDs perfectly on my laptop.

UPDATE (January 10, 2014): As of KDE 4.11.3, KsCD can play Audio CDs on my laptop. I believe this was due to an update to KDE’s Phonon and/or the Phonon backends.

YouTube

I should mention the excellent command line tool youtube-dl (‘YouTube download’) which is great for downloading videos from YouTube. You can specify the resolution, extract the audio, and various other tricks. Well worth adding to your set of mutlimedia tools. Or, if you prefer a GUI, Minitube is a cracking application for watching and streaming YouTube videos without using a Web browser, and also enables you to download them.

Backing up CDs/DVDs or ripping audio and video

K3b is a superb KDE application. It’s a one-stop shop for making back-ups of CDs and DVDs, creating data CDs and DVDs, and ripping CDs and DVDs. I use K3b to rip my Audio CDs to mp3 files.

Another well-known KDE application is the excellent K9Copy DVD ripper. Unfortunately the developer stopped working on it in July 2011. I hope someone else picks it up, as K9Copy has an intuitive GUI and I have used it on a number of occasions to rip my DVDs to my hard disk so that I could watch them when travelling.

dvd::rip does just what the name suggests, and I’ve used this excellent application too. The GUI is intuitive and the online documentation is very good.

Winki the Ripper is a good application for ripping DVDs to MKV files (it can also rip to AVI files). I have used it but noticed recently that the Web site is up for sale, so I hope the application is still being developed.

WINE

WINE menu in Lancelot Launcher

Snapshot 7 - WINE menu in Lancelot Launcher

I have mentioned Office 2007 already, but I have a few other Windows applications installed under WINE, such as IE7 (so that I can see how a Web site looks in a Windows browser), IrfanView, Lotus ScreenCam Player (so that it is still possible to view some videos of a specialist application running in Windows 95 many years ago), Notepad, Pinball and a few applications and utilities I need that are not available in Linux. WINE is not perfect, but it is wonderful software that also makes it possible to run some older Windows applications that are probably not able to run in Windows Vista and 7.

Utilities

Some utilities

Snapshot 8 - Some utilities

I used to use the brilliant command line utility ImageMagick to scale image files, but have not had to resort to the command line since the GUI front-end Converseen was released (see Converseen, a GUI batch image converter and resizer using Qt4 and ImageMagick).

I encrypt and decrypt some of my sensitive files using GnuPG GUI front-ends KGpg and Kleopatra. Kleopatra is slightly easier to use than KGpg, but they’re much of a muchness. The Enigmail extension I use in Thunderbird also uses GnuPG.

KAlarm is a handy KDE utility to produce sounds or pop-up reminder messages, or issue commands, at specific times or time intervals. The GUI is easy to use and KAlarm can be used in many cases as an alternative to setting up a cronjob. It was simple to configure it as a talking clock (see Setting up a talking clock easily in Linux).

AutoKey is a macro utility I use frequently. It can be used in a number of ways, but I use it to insert text in documents and e-mails. For example, I have configured AutoKey to insert the output of the Linux date command where my cursor is in an open document or e-mail if I press Ctrl-Alt-D: Sun Jul 22 14:41:25 BST 2012. For another example, I have configured AutoKey to enter my full postal address when I type “adr” and press the Space key (but puts it back to “adr” if I press the Backspace key). It is a very handy utility and can be configured to execute simple or complex scripts.

Easystroke is the mouse equivalent of AutoKey. For example, I have configured Easystroke to type “———- Original Message ———-” when I press the mouse scroll wheel and move the mouse pointer diagonally from left to right on the screen. As another example, I have configured it to launch an instance of DavMail to access a specific company’s OWA Exchange Server when I trace the first letter of the company’s name on the screen with the mouse cursor. It’s a clever utility!

BasKet Note Pads is a KDE application for recording and reading notes. The notes can be simple text or complex with embedded pictures, hyperlinks and so on. I switched to BasKet from Tomboy as the latter is a GNOME application and requires some GNOME-specific packages that I didn’t want cluttering up my hard disk. However, I can’t say I like BasKet: I miss the simplicity and easy-to-use UI of Tomboy which was a pleasure to use. I think I may have to try another KDE application (KJots) instead of BasKet, as it may fit my needs better.

KRename is a batch file renamer for KDE that has come in handy both at work and at home.

Filelight is a KDE utility that shows you graphically how much of each partition is occupied and how much is free. I like it because it makes it easy for me to see at a glance how much disk space I have left.

JDiskReport is another utility for showing you disk occupancy graphically. You can select pie carts, segment charts or bar charts. It is freeware but not open-source, but is nevertheless a nice utility to have in your set of tools.

Antivirus software

BitDefender Antivirus for Unices

Snapshot 9 - BitDefender Antivirus for Unices

As I run some Windows applications under WINE, and as I dual boot with Windows 7, I use both BitDefender Antivirus Scanner for Unices and ClamTk, the GUI front-end to ClamAV. That way I can scan my Windows directories from Linux. My work colleagues sometimes pass work files to me on USB pen drives, and I use these two anti virus utilities to scan the pen drives just to be a bit safer. Yes, it has flagged the occasional malware in Windows files.

Games

Games

Snapshot 10 - Games

I hardly ever play games, but still installed the entire KDE Games suite (you never know, after all!). Of the KDE games, I play KPatience, KCheckers, KBlocks (a Tetris clone), KBreakOut (takes me back to playing BreakOut written in Applesoft BASIC on an Apple II+!) and KMahjongg, a solitaire game using beautifully rendered Mahjong tiles.

I have also installed a few non-KDE arcade games such as Missile Command and Pacman Arena (nicely done in 3D). I loved Pac-Mania on my Acorn Archimedes in the early 1990s, so I also use SDLMame and its GUI front-end GMameUI to play Pac-Mania and a few other old favourites such as Frogger.

As far as chess is concerned, I installed the 3D DreamChess, as well as the older but perfectly decent XBoard and eboard.

Scrabble and Boggle are popular games in my family, so I installed XScrabble and GBoggle, the latter being one of only a handful of the packages mentioned in this article that I had to install outside the Portage package manager because there is no ebuild (another being the commercial game Machinarium, which is available for Linux, beautiful and I recommend highly).

I occasionally play TORCS, which is not bad for a car racing game.

There are a lot more Linux games to discover, if you’re that way inclined.

Summary

I’ve just scratched the surface, but hopefully have given you a taste of how I use KDE (and Linux). Of course my needs and uses are different from everyone else’s, but I hope this and the previous article have shown you the breadth of KDE and Linux applications, and that they are completely viable on the desktop. If you have not tried KDE yet, I hope this has tempted you. And, if you’re new to Linux, I hope this has tempted you to try Linux too.

A guided tour of my KDE 4.8.4 desktop (Part 1)

I have used GNOME, LXDE, Xfce and others, but KDE is my favourite desktop environment and I’ve used every release since 3.5.2. Although there are a few things that still need improving, by and large I find KDE to be an excellent desktop environment with every feature and facility I need, and highly configurable. It is the only desktop environment I choose to use professionally (I virtually never have to touch Windows at work, although I can dual boot Windows 7 on my laptop just in case I come across an application that only runs in Windows), and it is the main Linux desktop environment I use at home, although from time to time at home I use Xfce on another laptop, Android 3.2 on my Motorola Xoom tablet and Windows Vista on the family PC. I can honestly say that Windows Vista and Windows 7 feel clunky and old fashioned to me after using KDE, not to mention less easy on the eye.

All but one of my work colleagues use Windows or Mac OS X, and they notice the KDE desktop on my laptop and ask questions about it. So I thought I’d provide a guided tour of the KDE desktop on my laptop, as it might be of interest to newcomers to Linux or to Linux users contemplating trying KDE. There is too much to show in one or even two articles, but I thought I’d at least cover some of the main features in a couple of articles. So here is the first installment…

KDM greeter screen

The KDM Greeter screen (log-in screen) is the first KDE screen to appear, and it follows the framebuffer console decoration (‘bootsplash’) displayed after I select Linux from the GRUB 2 bootloader menu. I chose a simple KDM log-in screen called gentoo-linux-kde that I downloaded from the openDesktop.org Web site.

KDM Greeter screen

Snapshot 1 - KDM Greeter screen

Incidentally, if you’re wondering how I made a snapshot of the KDM log-in screen, I used a tip by Todd Partridge and added the following command to the file /usr/share/config/kdm/Xsetup and restarted my machine:

sleep 10 && import -window root /tmp/kdm.png &

KDE Splash Screen

The KSplash screen is displayed briefly after log-in. I chose the Air and Ariya Splash Screen, one of the splash screens that comes with KDE 4.8.4 and is selected via System Settings > Workspace Appearance.

KDE Splash Screen

Snapshot 2 - KDE Splash Screen

If you’re wondering how I made that screenshot, System Settings > Workspace Appearance has a ‘Test Theme’ button. I just clicked on that and pressed the Prt Sc key on my keyboard to capture it with the KSnapshot utility, which I had previously linked to the Prt Sc key by using System Settings > Shortcuts and Gestures.

My desktop

The five icons on KSplash pop up one by one and the KDE desktop itself then appears. I’m using the Air desktop theme with Oxygen windows decorations, Oxygen icon set, Oxygen Black cursor theme, Oxygen widget style and DejaVu Sans 8 fonts.

KDE desktop

Snapshot 3 - KDE desktop

I tend to change the wallpaper quite often, but the rest has been the same for I can’t remember how long. This wallpaper is a poster image of beautiful Chinese actress Ziyi Zhang (who doesn’t really have blue eyes) in Memoirs of a Geisha.

In KDE the number of Panels (‘task bars’, in Windows parlance) and their dimensions and position are up to the user, but I prefer to have only one Panel, and I prefer it to be situated at the bottom of the desktop. I suppose I’m traditional that way.

Everything you see on my desktop is a KDE Plasmoid (also known as a ‘Plasma widget’), and there are many KDE widgets to chose from, both bundled with KDE and available for download from the Web. Some excellent widgets have been developed by individuals who have nothing to do with the KDE development team. The positioning of widgets, be it on the desktop itself or on the Panel, is entirely up to the user. In fact, there is nothing stopping you from having mutliple instances of the same widget. For example you could have two instances of the Comic Strip widget, each showing a different comic strip.

The only widgets I want on the desktop itself are, clockwise from top left:

Folder View

I use the Folder View widget to view the icons in my ~/Desktop directory. This is perhaps one of the most confusing concepts for Windows users to grasp, and also confused a lot of KDE 3 users (me included). On a traditional desktop the user can place icons for applications, directories (folders), files and shortcuts. In KDE 4, if you wish, the icons in the ~/Desktop directory can be shown in a Folder View widget on the desktop instead of on the desktop itself. Initially I preferred the traditional way, but I finally came to like using a Folder View widget to show the contents of my ~/Desktop directory on my desktop. The width and height of a Folder View widget are user-configurable, so I can keep it out of the way of the wallpaper image yet still easily access my most commonly used applications, scripts, directories and files. The widget automatically adds scroll bars when you resize it.

Folder View widget

Snapshot 4 - Folder View widget

Folder View widget showing tooltip

Snapshot 5 - Folder View widget showing tooltip

By the way, you can see above that I have Microsoft Office 2007 installed on my machine. It runs under WINE (see my earlier article WINE tips: Giving each Windows application its own environment for how I installed Office 2007). I use LibreOffice too, but have found that Office 2007 does some things better. Those three Office 2007 icons in my ~/Desktop directory launch Bash scripts that set up the WINEPREFIX and WINEARCH environment variables and issue the WINE command to launch the relevant Office 2007 application.

Folder View also allows the user to preview the contents of directories and sub-directories, so you can drill down very quickly into nested directories without clicking.

Folder View widget viewing directory contents

Snapshot 6 - Folder View widget viewing directory contents

Note that you can have as many Folder View widgets as you want on your desktop, and they can be used to view any directory, not just the ~/Desktop directory.

Hardware Temperature

This widget displays the current reading of the two ACPI temperature sensors in my laptop, both as trend graphs and on dashboard-type dials.

Network Monitor

This widget displays trend graphs of throughput in KiB/s for network interfaces specified by the user. I choose to display both wired (eth0) and wireless (wlan0) network graphs.

yaWP

yaWP is an excellent weather widget with a lot of options. It is easily configurable for multiple locations, which is handy for my frequent travels.

My Panel

The widgets I added to the left end of my Panel are Lancelot Launcher, Takeoff Launcher, Pager (the four rectangles; more about that later) and Dictionary. The widgets I added to the right end of my Panel are: System Tray, Digital Clock and Wastebin. With the exception of Wastebin, all the icons shown on the right side of the Panel are inside the System Tray widget. Additionally, I placed the Icon-Only Task Manager widget in the middle of the Panel, to display an icon for each running application (file manager, browser, and so on), be it maximised or minimised.

An application launcher is a common feature of any Desktop Environment, and a number of launchers are available for KDE. The standard launcher is Kickoff, which originated in openSUSE. Naturally it is also a widget and, as with any widget, can be placed anywhere on the Panel or on the desktop itself (or both, if you feel like it!). Although I find the Kickoff launcher good, I prefer another launcher: Lancelot. I placed the Lancelot widget on the left side of the Panel, and configured it to use the Genxigen KDE menu icon. A click on the icon reveals Lancelot’s intuitive menu:

Lancelot Launcher

Snapshot 7 - Lancelot Launcher

The three System Actions buttons along the bottom of the Lancelot launcher pane are configurable. I have configured them to be Lock Session, Leave and Switch User. Clicking on Leave displays a menu with buttons Log Out, Reboot, Shut Down, Suspend to Disk and Suspend to RAM. A nice feature is that you can configure KDE to display a sub-menu for Reboot that allows you to specify which of the entries in your GRUB 2 bootloader menu you wish to boot (see GRUB2/BURG Integration in KDE).

I used to have more widgets and icons on my Panel, to enable me to quickly launch the applications I use most frequently (Firefox, Konqueror, Thunderbird, Dolphin, KCharSelect, KWrite, KCalc and so on). However, the icons took up space on the Panel and reduced the space available to the Icon-Only Task Manager for displaying the icons of running applications. So I added a second launcher widget on my Panel: Takeoff Launcher, the icon next to the Lancelot widget’s icon. I downloaded a crisp SVG Gentoo icon to use as that launcher’s icon on the Panel. Takeoff Launcher is a full-blown launcher, but I only use its Favourites pane, to launch my most frequently used applications.

Takeoff Launcher

Snapshot 8 - Takeoff Launcher

Lancelot also has a Favourites pane, but Takeoff is easy to configure to have a large pane with big, widely-spaced icons, and it is therefore good for quickly launching my most-used applications. So the only application I have left on the Panel is the KDE dictionary widget:

Dictionary widget on my Panel

Snapshot 9 - Dictionary widget on my Panel

System Tray

System Tray on my Panel

Snapshot 10 - System Tray on my Panel

The System Tray widget is the ‘notification area’ and holds a number of applets and widgets. The KDE icons for Clipboard, Volume, Device Notifer, Network Management, Printer Applet, Notifications, KOrganizer Reminder daemon, Desktop Search File Indexing and Battery Monitor (some of which are themselves widgets) are monochrome. I don’t think it is a coincidence that they were made monochrome after Microsoft changed to monochrome icons in the notification area of Windows 7. I wish I could change those KDE icons, as I prefer coloured notification icons in a System Tray: I find coloured icons quicker to recognise and I also prefer coloured icons from an aesthetic point of view. The coloured icons you can see in my System Tray are, from left to right, Compiz Fusion Icon, Easystroke, AutoKey, BasKet Note Pads, KAlarm and Keyboard Layout (clicking on the flag allows me to switch to other keyboard layouts, each with its own flag). One of these days I’ll get rid of the Compiz Fusion Icon, as I rarely use Compiz anymore because KWin Desktop Effects are now a match for Compiz in most areas.

EDIT (July 16, 2012): I have just discovered that there is a way to change the System Tray icons: see How to Use Custom Tray Icons in KDE.

Notifications applet pop-up messages can be disabled, but I prefer to leave them enabled as they come in handy when I’m sending photos from my phone to my laptop via Bluetooth. Here is what a pop-up from the Notifications applet looks like when Yakuake is launched at start up:

Notifications applet

Snapshot 11 - Notifications widget

By the way, Yakuake is another cool KDE application. Pressing F12 toggles a slide-down/up terminal window:

Yakuake

Snapshot 12 - Yakuake slide-down window

System Settings

The main GUI configuration menu for KDE is System Settings, which I can launch from either launcher. This is used to configure account details, workspace and application appearance, file associations, shortcuts, hardware settings, applications to run at startup, and just about anything else you can think of. I never bother to use System Settings to configure printers, though, as I prefer to use the CUPS Management interface http://localhost:631/ in a browser window.

System Settings main window

Snapshot 13 - System Settings main window

The items in the System Settings menu depend on which KControl modules are installed. For example, I installed the UFW KControl Module (the package kcm-ufw) so there is an entry in System Settings for UFW.

Firewall - System Settings

Snapshot 14 - Firewall - System Settings

One of the other configuration menus in System Settings is Desktop Effects, to configure the 3D and compositing effects that the KWin window manager provides. For screenshots of some of the effects see my earlier article Pimping my Desktop: have KWin Desktop Effects improved in KDE 4.6.2?

UFW KControl Module

Snapshot 15 - Desktop Effects - System Settings

Some people derisively call these effects ‘eye candy’ or ‘wobbly windows’ (the latter being one of the available effects) but I find some of them useful. The Desktop Cube (Ctrl-F11) and windows transparency (Alt + mouse scroll wheel) are two that I often use at work. Being able to place open windows on different faces of the cube, and flip quickly between them either with a mouse click, mouse wheel scroll or keyboard shortcut is handy. And sometimes I need to refer to text in a window underneath the one I’m typing in, and being able to make the latter transparent or semi-transparent quickly just to check something is also handy. Wobbly windows themselves are pure eye candy, but cool nonetheless. I’m so used to wobbly windows that I miss the effect if using another machine without it.

KWin Desktop Cube

Snapshot 16 - KWin Desktop Cube

I have configured the Pager widget to display the four virtual desktops (cube faces) as a row of four rectangles on the Panel, and I can click on any of the four rectangles to rotate the cube to the relevant virtual desktop (cube face). I have also configured the Pager’s keyboard shortcuts so that Ctrl-Alt- and Ctrl-Alt- rotate the cube left and right, respectively (see Switching from Compiz to the KDE Native Composite Engine).

Selecting Plasmoids (widgets)

Adding widgets to a Panel or to the desktop is easy. There is a small Tool Box icon in the top right of the desktop. Because of its shape, this icon is often called ‘the cashew’.

Tool Box ('the cashew')

Snapshot 17 - Tool Box ('the cashew')

You just click on it, select ‘Unlock Widgets’ then ‘Add Widgets’ (right-clicking on the desktop allows you to select ‘Add Widgets’ too), and a scrollable menu bar with widgets appears above the Panel:

Widgets menu

Snapshot 18 - Widgets menu

You can then select the widget you want and drag it to a place on the Panel or on the desktop itself. A ‘Get New Widgets…’ button allows you to search for, select and download other widgets from the Web or to install a new widget from a local file you downloaded earlier.

While ‘Unlock Widgets’ is selected there is also a cashew icon (‘Panel Tool Box’) at the right end of the Panel. If you click on that a menu pops up to allow you to configure the Panel itself (position, length, height, auto-hide, spacers and so on).

Activities

Activities are another unique KDE feature, and probably the least understood and least used of all KDE features. If you select Activities in the cashew menu (see Snapshot 17) or in the Widgets menu (see Snapshot 18), a new menu pops up:

Activities config menu

Snapshot 19 - Activities menu

Apart from my existing ‘Desktop’ activity (my normal environment with its four virtual desktops), I have three template activities titled ‘Search and Launch’, ‘Photos Activity’ and ‘Desktop Icons’. I could delete any or all of those or customise them as I wish (I could also click on the ‘Create Activity’ button to create further activities). For example, if I click on the ‘Photos Activity’ icon, I see the following desktop, which I could go on to customise by adding widgets and wallpaper that are unique to this activity.

an Activity

Snapshot 20 - an Activity

To see a screencast of Activities in action, check out ChaniBlog post Activities in Action. To read more about KDE Activities, see The Mystery of KDE Activities.

To be honest, I’m not particularly interested in using Activities, as I find the traditional virtual desktops in KDE adequate for my purposes. But I can see that Activities might have their uses. You can read some comments on the current state of Activities design, and suggestions to improve it, in the article Nine Ways to Make KDE Activities More Useful.

Docks

Mac OS X has made the dock concept popular, and there are a number of dock widgets specifically for KDE, such as Daisy. Cairo Dock is not specifically designed for KDE but works well in KDE. As you can see from the snapshot below, I installed it. To be honest, though, I never use it, as Lancelot Launcher, Takeoff Launcher, Folder View and the Panel do everything I want and more.

Cairo Dock

Snapshot 21 - Cairo Dock

Desktop Search

‘Desktop Search’ is one of the entries in System Settings. If I double-click on that entry I can then enable or disable Nepomuk Semantic Desktop (tagging and rating of files), Nepomuk File Indexer (searching of files by content instead of just by name) and E-mail Indexing (full text search in e-mails and their attachments).

If I click on the ‘Desktop Search File Indexing’ icon in the System Tray (the icon to the left of the Keyboard Layouts icon in Snapshot 11) then the following window pops-up, telling me the status of file indexing:

Nepomuk

Snapshot 22 - Nepomuk

To give you an example of how I use Desktop Search, I was looking for a MIDI file of The Monkees’ ‘I’m A Believer’ that I saved a long time ago. I can press Alt-F2 to launch KRunner, and enter a search string:

Searching via KRunner

Snapshot 23 - Searching via KRunner

or I can click on the Lancelot Launcher icon and enter the search string there:

Searching via Lancelot

Snapshot 24 - Searching via Lancelot

Either way, clicking on the file they find launches KMid, the KDE MIDI file player:

Searching via Lancelot

Snapshot 25 - KMid

By the way, both KRunner and Lancelot will accept commands as well as file names.

File Managers

Dolphin file manager

Snapshot 26 - Dolphin file manager

Dolphin is the default file manager in KDE. It has a raft of features and is very easy to use. Features have been added to Dolphin in each KDE release, and it is now a powerful file manager. Other KDE file managers I use frequently are Krusader and Konqueror, the latter also a Web browser that I have found will sometimes display Web pages that Firefox cannot (I installed the kwebkitpart package and configured Konqueror to use the WebKit rendering engine by default rather than the KHTML rendering engine). Konqueror is not so popular since the advent of Dolphin, but I use it quite often as it has several strings to its bow.

Konqueror and Dolphin can use KIO Slaves (in Gentoo these are available by installing the packages kdebase-kioslaves, kdemultimedia-kioslaves and kio-sysinfo), which provide additional functionality. One of the KIO Slaves for Konqueror is sysinfo:/, which I have bookmarked to save typing it in the address bar:

Konqueror using sysinfo:/

Snapshot 27 - Konqueror using sysinfo:/

For more detailed system information, I select System > KInfoCenter from the Lancelot menu, or enter the command kinfocenter in KRunner or in the input field of Lancelot or in a terminal window (you are spoilt for choice in Linux!).

Applications and Tools I use

If you’re wondering what I used to capture the images for this article, apart from the ImageMagick import command to capture the KDM Greeter screen, I used KSnapshot:

KSnapshot

Snapshot 28 - KSnapshot


And, after installing the package media-gfx/scrot, I used the following command in a Konsole window to take the above snapshot of the KSnapshot window:

$ scrot -d 6 -b -s snapshot.png

Coming in Part 2…

In my next article I’ll show you a few of the other applications and tools – both KDE and non-KDE – that I use regularly in KDE on my laptop.

AMD Catalyst for Linux driver 12.2 fixes the XVideo bug that crashed X.Org Server 1.11.x

Just a brief ‘heads up’ for users of the closed-source FGLRX driver in Linux: In a previous blog post I mentioned a bug in the AMD Catalyst driver for Linux that caused X.Org Server 1.11.x to crash if you tried to play a video and your media player was configured to use XVideo (Xv) output. The bug also meant that people talking to you via Skype could not enable their Web cams or X.Org Server 1.11.x would crash on your machine, as Skype uses XVideo.

The problem occurred with versions 11.11, 11.12 and 12.1 of the FGLRX driver (the package x11-drivers/ati-drivers). Well, today I installed version 12.2 of the driver and am pleased to report that I can again set media players to use Xv output without causing the X.Org Server to crash (I’m currently using xorg-server-1.11.4). Likewise, other people who I am talking to via Skype can again enable their Web cams without causing the X.Org Server on my machine to crash.

Installing the Takeoff Launcher in KDE 4.8.0

My application launcher of choice is Lancelot, which comes as part of the package kde-base/kdeplasma-addons. If you haven’t already tried it, you really should.

Anyway, recently on the blogsphere I read about Takeoff, another Plasmoid application launcher for KDE, first issued end July 2011. Looking at screen snapshots of Takeoff reminded me of a tablet’s screen: an uncluttered array of large application icons. My curiosity was piqued, so I decided to install the Takeoff Plasmoid. Here’s what I did to install it in KDE 4.8.0 in Gentoo Linux. The same straightforward procedure should also work in other Linux distributions with KDE 4.8, although installation is a bit easier for Arch Linux, Chakra, Fedora, openSUSE and Ubuntu, as packages exist for those distributions (see the Download page on the project’s Web site for details).

I downloaded takeoff-1.0.tar.gz to ~/Desktop

I right-clicked on the tarball and selected Extract > Extract Archive To… and extracted the files to the directory ~/takeoff-1.0

I opened a Konsole window and entered the following commands:

cd ~/takeoff-1.0
cat README

The README file tells you exactly how to install the Plasma widget (although I ignored the instruction to create the directory ~/takeoff-1.0/build/ as it already existed):

cd build
cmake .. && make
sudo make install
kbuildsycoca4

Then I did the usual in KDE to add the Takeoff widget to the Panel.

To configure Takeoff I right-clicked on its icon, clicked on ‘Takeoff Settings’ and, under ‘General Settings’, I unticked ‘Show Takeoff in full screen mode’. I also clicked on the icon under ‘General Settings’ and changed the icon to one of my choice. If you fancy a picture as the background of the launcher’s panel, tick ‘Show background image’, click on the ‘browse for file’ icon and select any wallpaper file that you have stored on your disk. There are other configuration options you can play with, such as the number of columns and rows of application icons to display in the launcher’s panel.

To display the launcher’s panel, just click on the Takeoff icon on your Panel. The Takeoff panel will pop up, as shown in the snaphot below of my screen.

Takeoff Launcher in KDE 4.8.0

Notice that there are tabs across the top of the launcher’s panel; these are the different categories of application available: Favourites, All Applications, Accessories, Education, Games, Graphics, Internet, Office, and so on. Click on one of these tabs to view all the applications in that category. If there are too many applications in that category to fit on the launcher’s panel, there will be a slider button at the bottom of the panel; just click on the next number on it to view the next page of applications in the category.

By the way, in case you’re wondering, naturally those are Gentoo penguins on my Desktop wallpaper. 🙂

EDIT (July 10, 2012): For users of Gentoo there is now an ebuild (kde-misc/takeoff) in the Portage main tree, so use that to install Takeoff Launcher.