Using the Message of the Day (MOTD) in Ubuntu Linux

The message of the day file (/etc/motd) used to be so simple… but with great power often comes increased complexity. The Ubuntu motd file is very powerful and can be manipulated easily once you know how.

The actual file is composed in /var/run/motd so that the /etc file system can still be considered read only and the file /etc/motd is a symbolic link to /var/run/motd. To make the motd file a static file as before, just change the link to another file such as /etc/motd.static.

In older versions of Ubuntu, the file /etc/motd.tail was introduced for this purpose; however, it has been deprecated for some time in favor of the newer /etc/update-motd.d framework. The /etc/motd.tail file can still be used and is adapted into the new framework.

The update-motd framework was introduced with the update-motd package in Ubuntu Intrepid; it now resides in the libpam-modules package as part of the pam_motd module.

In earlier versions of update-motd, the /etc/update-motd.d directory contained multiple directories that would be executed hourly, daily, weekly, or monthly. The scripts would be executed by a daemon update-motd that was run from cron.

In Ubuntu Lucid, this structure was phased out in favor of a straight sequential operation. The motd file is now generated by the pam_motd module upon login.

Each of the files in the /etc/update-motd.d is executed in numerical order; those in a Ubuntu Lucid Server install are:

/etc/update-motd.d# ls -l
total 28
-rwxr-xr-x 1 root root  57 2010-04-23 04:45 00-header
-rwxr-xr-x 1 root root 248 2010-04-23 04:45 10-help-text
-rwxr-xr-x 1 root root  65 2010-04-13 15:45 20-cpu-checker
lrwxrwxrwx 1 root root  46 2010-12-02 12:26 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper
-rwxr-xr-x 1 root root  71 2010-04-13 15:45 90-updates-available
-rwxr-xr-x 1 root root  61 2010-06-30 09:01 91-release-upgrade
-rwxr-xr-x 1 root root  69 2010-04-13 15:45 98-reboot-required
-rwxr-xr-x 1 root root 261 2010-04-23 04:45 99-footer

These files generate a motd like this:

Linux myserver 2.6.32-32-server #62-Ubuntu SMP Wed Apr 20 22:07:43 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.04.2 LTS

Welcome to the Ubuntu Server!
 * Documentation:

  System information as of Tue Nov 22 11:01:48 CST 2011

  System load:  1.84                Processes:           167
  Usage of /:   80.6% of 115.84GB   Users logged in:     0
  Memory usage: 50%                 IP address for lo:
  Swap usage:   10%                 IP address for eth0:

  Graph this data and manage this system at

21 packages can be updated.
0 updates are security updates.

*** System restart required ***
Last login: Fri Nov 18 09:46:33 2011 from

SSH introduces some slight complexity: SSH has its own handling of the motd file and can produce it upon demand. In a Ubuntu Lucid install, this capability is turned off because the PAM framework shows the motd through the pam_motd module on login.

Despite the documentation for motd.tail stating otherwise, there is no /etc/init.d/ that runs and creates /var/run/motd; this is done upon login as previously mentioned.

If logging in with SSH, the SSH display of motd may be turned off either by adding a file ~/.hushlogin or by reconfiguring the server with a PrintMotd No option. Note that this is separate from the pam_motd process; thus if a Ubuntu system has PrintMotd Yes as well as pam_motd you will see double messages. Likewise, if a ~/.hushlogin file is present – or the option PrintMotd No is set – the pam_motd module will still run and a message of the day will still be seen.

In the PAM configuration of a standard Ubuntu Lucid install, both /etc/pam.d/login and /etc/pam.d/ssh contain the pammotd module. The /etc/motd file is selectable here; a different file entirely could be used by modifying the pammotd line appropriately:

session optional motd=/etc/motd.other

To modify the motd within the update-motd framework, just create (or delete) scripts in the /etc/update-motd.d directory. Each script must be in the format NN-xxxxxxx where the first two numbers NN specify the order and the last xxxxxxx specifies a reasonable name for the script. The script should be an actual file and not a link, according to the documentation (although the 50-landscape-sysinfo script is a symbolic link!).

Output should be to stdout and start with a blank line and end with a newline. Remember that the script will execute on every login, so it should be quick.

Rescuing an Interrupted Ubuntu Upgrade

Upgrading Ubuntu from one version to the next has always been amazingly reliable; yet, sometimes, things happen. How do you recover when your upgrade is interrupted and you can’t boot the system in the usual way?

First step is to boot the machine to a shell that you can use to recover. This can be done in the standard system by using the Recovery Mode. Press the left shift key as the system boots up and choose a recovery mode kernel from the menu that appears – it will be labeled with “(recovery mode)” on the end. The recovery mode kernel will present you with the option to use a recovery shell.

You could use the rescue mode by booting with an Ubuntu install CDROM and entering “rescue” at the boot prompt, but then you must remember to mount all of your partitions and to perform a chroot to /target where the root partition is mounted.

After the system has booted to the menu, select the item that says “Drop to root shell prompt with networking”. This provides you with the ability to update the software packages from the Internet.

When the prompt appears, start by making sure that all currently installed programs are configured:

dpkg --configure -a

This may take a long time, depending on how many programs were installed before the system stopped. Then go ahead and update the current list of packages:

apt-get update

Following this, upgrade the software on the system:

apt-get upgrade

This last step, again, may take a long time to complete. You should pay attention to the list of packages held back (listed at the top of the output from this command); these packages will have to be requested specifically. Usually, packages are held back because they require new software or other drastic changes: the Linux kernel is always held back. Use a command like this one to install these packages:

apt-get install some-package some-other-package

You may have to repeat this more than once until all of the packages have been installed and none are held back.

Then, you should repeat the update and upgrade in order to completely verify that the system is as updated as it can be:

apt-get update
apt-get upgrade

These last commands should execute quickly, as everything is probably complete – however, it is not impossible that the upgrades would have affected something that requires another upgrade. Not doing this probably won’t matter, but why not do it anyway?

Once done, a reboot is required to make sure that the old software is no longer being used and all that is used is the new upgraded software. Don’t just continue the boot: reboot.

One more thing can be done to clean up afterwards – possibly after the reboot. At a command shell, enter this command to remove unneeded software:

apt-get autoremove

Some general tips on making distribution upgrades as easy as possible: first, upgrade the system to the latest set of patches and software available. If there are bugs in the ugprading software, you want to fix it first.

Once upgraded to the most recent patch set (or the most recent minor level), then upgrade to the next major level (and no more!). Upgrades are normally tested only to the next major release. Any other upgrade is certainly not tested and not guaranteed to work.

If you want to upgrade beyond just the next major release, repeat the above steps for each major release: first upgrade to the most recent software, then upgrade to the next major release.

Make sure that you have reliable power throughout: if a system loses power in the middle of an upgrade process (or otherwise stops cold) then you will have to perform a recovery and hope that nothing was lost.

Turning off NET-SNMP overlogging

In the normal configuration – both on Red Hat and Ubuntu – you’ll find that SNMP is filling your logs with an endless amount of log entries, especially if you have monitoring tools that use SNMP every five minutes. They’ll generate messages like this:

Jan  8 13:45:02 example snmpd[2048]: Connection from UDP: []:51890
Jan  8 13:45:02 example snmpd[2048]: Received SNMP packet(s) from UDP: []:51890
Jan  8 13:45:02 example last message repeated 2 times

To get rid of these, change the priority levels that are logged by NET-SNMP. This can be done by changing the options sent to SNMP.

Look for a file /etc/default/snmpd or /etc/sysconfig/snmpd or similar. There should be a set of SNMP options – probably with an option like this one:

-Ls d

Change this option to be:


This will log everything at level NOTICE or higher (that is, severity level 5 down to severity 0). The severity levels used are those used by syslog; they are described in syslog(3).

This works because the messages being seen are logged at level INFO; by not logging items at that severity level the log entries no longer clutter the syslog files.

However, there is another set of messages that are common to NET-SNMP logs:

Sep  7 09:47:29 burp snmpd[19242]: diskio.c: don't know how to handle 9 request
Sep  7 09:47:29 burp snmpd[19242]: diskio.c: don't know how to handle 10 request
Sep  7 09:47:29 burp snmpd[19242]: diskio.c: don't know how to handle 11 request

This is the result of a bug (Red Hat Bugzilla #474093 – login required) which causes these “errors” when the SNMP diskIOTable is traversed. Red Hat fixed this bug back in September of 2009.

According to this message by Chris Rizzo, Red Hat stated:

The message that you see here is a result of querying for statistics
that are not available on the linux system. Requests 9, 10, and 11 are
defined as:

#define DISKIO_LA1 9
#define DISKIO_LA5 10
#define DISKIO_LA15 11

You can see where these statistics pop up by querying the SNMP diskIOTable using this command:

snmptable -v 2c -c public host diskIOTable

The output will look like this:

SNMP table: UCD-DISKIO-MIB::diskIOTable

 diskIOIndex diskIODevice diskIONRead diskIONWritten diskIOReads diskIOWrites diskIOLA1 diskIOLA5 diskIOLA15 diskIONReadX diskIONWrittenX
           1         ram0           0              0           0            0         ?         ?          ?            0               0
           2         ram1           0              0           0            0         ?         ?          ?            0               0
           3         ram2           0              0           0            0         ?         ?          ?            0               0
           4         ram3           0              0           0            0         ?         ?          ?            0               0
           5         ram4           0              0           0            0         ?         ?          ?            0               0
           6         ram5           0              0           0            0         ?         ?          ?            0               0
           7         ram6           0              0           0            0         ?         ?          ?            0               0
           8         ram7           0              0           0            0         ?         ?          ?            0               0
           9         ram8           0              0           0            0         ?         ?          ?            0               0
          10         ram9           0              0           0            0         ?         ?          ?            0               0
          11        ram10           0              0           0            0         ?         ?          ?            0               0
          12        ram11           0              0           0            0         ?         ?          ?            0               0
          13        ram12           0              0           0            0         ?         ?          ?            0               0
          14        ram13           0              0           0            0         ?         ?          ?            0               0
          15        ram14           0              0           0            0         ?         ?          ?            0               0
          16        ram15           0              0           0            0         ?         ?          ?            0               0
          17        loop0           0              0           0            0         ?         ?          ?            0               0
          18        loop1           0              0           0            0         ?         ?          ?            0               0
          19        loop2           0              0           0            0         ?         ?          ?            0               0
          20        loop3           0              0           0            0         ?         ?          ?            0               0
          21        loop4           0              0           0            0         ?         ?          ?            0               0
          22        loop5           0              0           0            0         ?         ?          ?            0               0
          23        loop6           0              0           0            0         ?         ?          ?            0               0
          24        loop7           0              0           0            0         ?         ?          ?            0               0
          25          sr0           0              0           0            0         ?         ?          ?            0               0
          26          sda  2840214016     1178369536     8946299      2080062         ?         ?          ? 990682692096     18358238720
          27         sda1      598016         208896          82            8         ?         ?          ?       598016          208896
          28         sda2        2048              0           2            0         ?         ?          ?         2048               0
          29         sda3     2286592        4649984         449          332         ?         ?          ?      2286592         4649984
          30         sda5  2836463104     1173473792     8945636      2079527         ?         ?          ? 990678941184     18353342976
          31          sdb  2960873984     1173473792     1940422      2079476         ?         ?          ? 990803352064     18353342976
          32         sdb1      638976              0          83            0         ?         ?          ?       638976               0
          33         sdb2      798720              0         153            0         ?         ?          ?       798720               0
          34         sdb3        6144              0           2            0         ?         ?          ?         6144               0
          35         sdb5  2958672384     1173473792     1940080      2079284         ?         ?          ? 990801150464     18353342976
          36          md0  3051716608     1727252992       93765      1641387         ?         ?          ?   3051716608     14612154880
          37          sdc  3067452416      425118208     1640751      3638614         ?         ?          ? 101851700224    438511782400
          38         sdc1  3067317248      425118208     1640721      3638613         ?         ?          ? 101851565056    438511782400
          39          sdd      307712              0          76            0         ?         ?          ?       307712               0
          40         sdd1      147968              0          37            0         ?         ?          ?       147968               0
          41         sdd2      131072              0          32            0         ?         ?          ?       131072               0

Towards the right side of center, you can see the metrics diskIOLA1, diskIOLA5, diskIOLA15; these are unsupported on Linux (as marked by the ? in each column). These are the 1 minute average disk load (as a percentage), the 5 minute average disk load, and the 15 minute average disk load respectively.

The three have SNMP OIDs of . and . and . respectively – thus, the logged complaint of not knowing how to handle request 9 (or 10 or 11).

Without changing the code, there doesn’t seem to be any way to eradicate this message if you are querying the diskIOTable. Red Hat fixed the bug, perhaps others will? The bug remains on Ubuntu Lucid Lynx, unfortunately.

The Current State of Window Maker

I’ve always liked the Window Maker window manager. However, the current state of Window Maker is in some turmoil.

Development on the original Window Maker window manager has ceased, and new development has been taken up by wmaker-crm (a fork). Nightly builds of wmaker-crm had been available for Debian from a user-created repository, but no new builds have been put up since 29 April 2011 – and the repository information hasn’t been rebuilt since 26 May 2011. Building a Debian package seems to be problematical in any case. According to this mailing list thread, Andreas Metzler and Martin Dietze are responsible for changes therein, but the changelog hasn’t reflected any changes in wmaker-crm.

It was recommended to the Debian Window Maker package maintainer, John H. Robinson IV, to use the wmaker-crm sources for the package; he was receptive but nothing has happened since. As of 6 July 2011, he stepped down as maintainer of the package, leaving the Debian package orphaned. This event did not go unnoticed; a thread was taken up on the wmaker-crm development list.

The person behind wmaker-crm, Carlos R. Mafra, also created a git repository for numerous Window Maker dockapps that are no longer maintained.

The standard Window Maker display manager, the WINGs Display Manager, apparently is much less desired than Window Maker itself: according to the popularity contest statistics, at a peak during January 2011, 2000+ people had Window Maker installed while less than 200 currently have WDM installed.

Statistics about the installed base (and user base) of Window Maker and other packages can be seen over at; these statistics come from people who have installed the popularity-contest package.

Over at ArchLinux, their wiki has an excellent write-up on Window Maker (including basic technical details and information on wmaker-crm) which certainly makes one think that Window Maker is vibrant in that community. Both Window Maker and wmaker-crm are packaged (as windowmaker and windowmaker-crm-git respectively) and available to ArchLinux users from the Extra Repository as well.

If you want to see Window Maker in action (more or less – it does show a lot of Tux Commander too…) you can check out this video showing Window Maker on a Duron 850MHz system with 256Mb.

I may post a short video of my own Window Maker desktop; having forced myself to run with Window Maker as my default desktop has made me a complete convert – and helped me to force myself to research and resolve problems with making Window Maker a default desktop. Recently, I wrote about just what it took to make Window Maker fully capable and up-to-date.

If GNOME or KDE are finally just too much – and XFCE isn’t quite what you want – try Window Maker instead.


The Wheel Group: Updated

Working with Ubuntu Server (Lucid Lynx) the wheel group has been changed slightly.

Firstly, there doesn’t seem to be any wheel group at all – not by name. The group is now called root by default, and is enabled the same as before: uncomment the appropriate line in /etc/pam.d/su so it looks like this:

auth required

The system uses the root group because that is the group name for group 0, and because there is no group named wheel. However, if you want to maintain the original standard – make the entry look like this instead:

auth required group=wheel

Then rename (or duplicate) the group in /etc/group with id 0:


This maintains the highest level of compatibility: the group root remains as before, but the name wheel is also available. Having two groups with the same group ID is not typically recommended, but it doesn’t necessarily break anything either as long as the two groups are seen as completely equivalent. The first group in the list will normally be used when names are given for GIDs, but both names will be recognized from the user.

According to the documentation, this is overkill – but it does force the issue and make su work with the actual wheel group rather than a renamed one.

What pam_wheel actually does is search for group wheel first, then if it can’t find that, searches for group 0 (zero) next. It is this configuration that allows the renaming of the wheel group.

Apparently Debian or Ubuntu named the group sudo at one point, now root. The best thing to do – when there is no distinct advantage to change – is to go with the status quo: in doing so, any administrator that comes along will be able to learn and adapt to the system rapidly, leading to quicker completion of administration tasks, simple and complex.

Why doesn’t my /bin/sh script run under Ubuntu?

This is a very interesting question – and the resolution is simple. In Ubuntu 6.10 (known as Edgy Eft) the decision was made to replace the Bourne Again Shell (bash) with the Debian Almquist Shell (or dash) as /bin/sh in Ubuntu. There was considerable uproar in Ubuntu brainstorm (community ideas) and in Ubuntu bug reports, as using dash instead of the original bash caused numerous scripts to break.

In particular, the entire reasoning given for this change was efficiency: dash is more efficient (i.e., faster) than bash. According to the explanatory document created by the Ubuntu developer team, Debian has required scripts to work on POSIX-compliant shells for some time (even pre-dating the Ubuntu project). Thus, any scripts that broke were, in essence, not “following directions” and deserved what they got.

To undo this change by the Ubuntu team, one can do this:

sudo dpkg-reconfigure dash

When this command executes, specify that you do not want dash to act as /bin/sh. This will make every script that runs /bin/sh run bash as has traditionally been the case.

You can also make your scripts run /bin/bash instead of /bin/sh; this provides all of the bash capabilities without any concern as to whether /bin/sh will change again.

Making the boot process faster is a laudable goal, but like the removal of OSS from the kernel, it caused a lot of problems for users.

In both cases, it appears that the Ubuntu team is more focused on doing the technologically “right” thing rather than providing a stable and reliable platform. Unfortunately, this means that you cannot rely on Ubuntu to stay reliable – at least from one version to the next. The response of Ubuntu to such system failures has always been that they are doing the “right” thing and the problem must be fixed by someone else (i.e., it’s not Ubuntu’s problem).

Users – many of them system administrators – take the brunt of this: they don’t care whose fault it is, nor do they care whether the boot process is faster or whether the Linux sound environment is “cleaner”; they care about the stability of their systems. A system that boots faster doesn’t matter if it crashes during the boot process because of a broken script.

If the focus of Ubuntu were to provide a stable and unchanging environment, then their decisions would be different – and would result in an improved customer experience.

Configuring a WindowMaker desktop in Ubuntu

Ubuntu Linux comes with a variety of desktops, including GNOME, KDE, and XFCE – all supported in their own distributions. You can install any of these by selecting the appropriate packages: either ubuntu-desktop, kubuntu-desktop, or xubutnu-desktop respectively. There are, however, other desktops not as well supported such as Window Maker (I’ve just got to discuss 9wm sometime…).

Before discussing too much, note that Window Maker is currently not in active development, and a fork called wmaker-crm has taken on active development for Window Maker. However, there are no packages for wmaker-crm in the Ubuntu repositories; to actually use wmaker-crm you’ll have to build it from source.

Creating a complete and working Window Maker desktop is not hard, but it is not straight-forward, nor documented well. There are a number of things to do which will enhance the desktop.

First, make sure that the menu package is installed. If it isn’t, most of the applications you have installed will be missing from the Window Maker application menus. Install it from your choice of package installers, or from the command line:

apt-get install menu

there are no applets running when you first start out. There are a number of good applets in the repositories; I selected these:

  • wmforkplop
  • wmhdplop
  • wmbattery
  • wmdiskmon
  • wmclockmon
  • wmcpuload
  • wmmemload
  • wmwave

Install these with synaptic or with this terminal command:

apt-get install wmforkplop wmhdplop wmbattery wmdiskmon wmclockmon wmcpuload wmmemload wmwave

Get the applets started by starting them at the command line with the appropriate options:

wmforkplop &
wmhdplop &
wmbattery &
wmdiskmon -p /dev/sda7 -p /dev/sda1 -p /dev/sda6 &
wmclockmon &
wmcpuload &
wmmemload -b -c & &
wmwave &

Be sure to adapt the options to your liking; most likely the only change will be the partitions listed in the wmdiskmon options – for me, these partitions are /, /boot, and /home respectively.

Note that (nor almost any other mixer) will not work in Ubuntu 10.04 and above as the sound daemons it depends on have been removed. That sound system is called OSS, and it has been removed from the Ubuntu kernels entirely. To fix this, you have to compile your own kernel. If you are technically savvy, this will not be too difficult. If you follow some good instructions, you’ll be alright.

The Ubuntu repositories have many more dock apps. If that isn’t enough, there are even more at – including, for instance, a that works with ALSA sound drivers instead of OSS.

You’ll probably want to add multiple desktops. Right-click on the desktop, then select from the menu the option WorkSpace, then Workspaces, then New – and create as many as you like.

The Clip – found at the top left of the screen – is quite handy, but doesn’t provide much without some configuration. To have the Clip automatically consume any running application icons, right-click on the Clip and select Clip Options, then Autoattract Icons. You may also like to have the icons disappear automatically, only to reappear when the mouse hovers over the Clip: select Autocollapse in the Clip options menu.

To tweak even more options, use the Window Maker Preferences application – this is found in the panel with a screwdriver on it. Double-click and prepare to spend a lot of time – though not many options need to be changed.

The desktop appearance and theme can be changed; right-click on the desktop, then select WorkSpace, then Appearance. If you are going to try out a lot of themes and backgrounds, click on the Appearances menu title bar or drag the menu using the title bar to a place of your choosing – then right-click on the desktop. The Appearances menu will stay on the desktop as long as you like; close it like any other window by clicking on its close button.

Backgrounds are normally stored in ~/GNUstep/Library/WindowMaker/Backgrounds or in /usr/share/WindowMaker/Backgrounds. You can quickly set a background from the command line by using this command:

wmsetbg -u myfile.jpg

There are many more options for wmsetbg in its man page.

GNOME applications will have a generic GTK display; most likely, you’ll want to change this. This can be fixed by using the gnome-settings-daemon. However, the gnome-settings-daemon will want to manage your background as well; use the gconf-editor program to fix this; go into /apps/gnomesettingsdaemon/plugins/background and change the active key to false by clicking on (and clearing) the checkbox. You can also use gconftool-2 at the command line:

gconftool-2 --set /apps/gnome_settings_daemon/plugins/background/active --type bool False

To use the gnome-settings-daemon, put it into the ~/GNUstep/Library/WindowMaker/autostart file. This file will handle automatic startup of programs that either don’t recognize an X session or that are daemons. Here is the one that I use:


xset mouse 20/10 4
gnome-settings-daemon &
dropbox start &

Window Maker will not finish starting until this script is complete, so long running applications should be backgrounded.

If you like shadows, you might want to use the package xcompmgr. Run it from your autostart file with a command like:

xcompmgr -C -c -r 8 -t -12 -l -12 &

A problem with xcompmgr is that it hasn’t been updated in quite a long time – and there is talk that it has memory leaks and other bugs. An alternative is the Cairo Composite Manager, although it is not in the Ubuntu repositories. One benefit of the Cairo Composite Manager is that it will use the 3D capabilities of your video card if it has them.

If you want transparency, then load the transset-df package. This package will set transparency of specific windows, but may have bugs and other problems – it hasn’t been updated in many years. Use it like this:

transset 0.7

This will set a transparency of 0.7 (70%) on the window that is clicked. You can select windows by using the -n option which will set transparency of windows with an associated name – for instance, -n Terminal will make all Terminal windows transparent by the specified amount. However, in my experience, using transset resulted in some windows not displaying correctly – the colored terminal window became gray and was not transparent; your experience may differ. There may also be bugs in transset; caveat emptor.

One thing missing from the Window Maker desktop is the ability to control networking interfaces. To fix this, you’ll have to stop the network-manager service as it doesn’t work with Window Manager, and replace it with the wicd package:

sudo service network-manager stop
sudo mv /etc/init/network-manager.conf /etc/init/network-manager.conf.noboot
sudo apt-get install wicd wicd-daemon wicd-gtk python-wicd
sudo service start wicd
wicd-client -n

Configure the network options as you desire. You’ll most likely want to keep the icon for this application around for easy access; if it is under the Clip, then right-click on the icon and select Keep Icon.

Unfortunately, there is no decent front-end for VPNs such as OpenVPN. The way to start a VPN remains the command line, at least until wicd supports VPNs.

Now having gone through this, you’ll have yourself a much nicer Window Maker desktop to work with. Have fun!

Update: I forgot to mention how to set up good icons. Window Maker will automatically choose an icon, and often its not a good choice: either the icon is low resolution and jaggy, or too big and only part of it can be seen.

Cached icons are stored in ~/GNUstep/Library/WindowMaker/CachedPixmaps/. You can find better icons by search with the locate utility – in Ubuntu, many icons can be found in /usr/share/icons/hicolor/ – and if there is a 48×48 or 64×64 icon conversion will not be necessary; just copy the file to the CachedPixmaps directory and change the icons location to the new file: right-click on the icon in the Clip (or wherever), select Settings… and change the location listed for the icon.

If you can’t find a 48×48 or a 64×64 you’ll have to convert the image: use the convert utility to do this:

convert orig-icon.png -resize 48x48 new-icon.png

You can also convert formats with convert; check its man page for details.

One more thing: here is my current desktop:

My Current WindowMaker Desktop

My Current WindowMaker Desktop

Just in case anyone asks… Wikipedia describes R.O.D the TV well.

Putting Debian packages on hold

When administering a Debian (or Ubuntu) system, putting packages on hold can be very useful. For example, if a critical part of the system is used by developers, and is continually updated, the developers will want to be aware of updates and will want to check their code in the new environment. Programs like Tomcat, Cocoon, MySQL will be in this category.

Similarly, if a critical portion of the system is to be updated, you wouldn’t want it to be part of the automatic updates – though you really shouldn’t automatically update, since you don’t know what can break until you test it.

To hold a package or packages, you should use dpkg --set-selections. If you run the command dpkg --get-selections you can see what is set already:

# dpkg --get-selections | head
acct                                            install
adduser                                         install
apparmor                                        install
apparmor-utils                                  install
apt                                             install
apt-transport-https                             install
apt-utils                                       install
aptitude                                        install
at                                              install
auditd                                          install

As an example, let’s consider the package dnsutils. Let’s see what would happen before we do anything:

# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccc60 libisccfg60 liblwres60
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,257kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n

Now let’s change this. We’ll put the package dnsutils on hold using dpkg --set-selections:

# echo dnsutils hold | dpkg --set-selections

Let us check the results:

# dpkg --get-selections | grep dnsutils
dnsutils                                        hold

Now, when we try the system update again, things have changed:

# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccfg60 liblwres60
The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 29.9kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n

Now, dnsutils – and its related packages – are being held back, just as we wanted. The other packages are being held back because they are only required by dnsutils; without upgrading dnsutils, they won’t be upgraded either.

OSS Audio support removed in Ubuntu Maverick Meerkat

According to this bug report (or feature request), all OSS support in Maverick Meerkat (10.10) was removed. This means that a lot of programs which are included in the base Ubuntu install do not work out of the box – and may never work if they are not updated. For some odd reason, this removal of OSS did not make it into the release notes for Ubuntu 10.10.

It appears that Debian has not removed OSS.

The removal of OSS by the Ubuntu team was continually refered to as part of “cleaning up the audio mess”; one person created a large graph of the Linux audio subsystems – which shows the complicated layout of all of the Linux audio possibilities.

There are numerous programs (in Ubuntu repositories and outside) that this affects, including:

  • tksnack
  • xawtv
  • tvtime
  • gnomeradio
  • Enemy Territory
  • Quake
  • Unreal Tournament 99
  • Video4Linux
  • mythTV
  • Wine
  • mplayer/mencoder
  • Kino
  • XSquawkBox plugin for X-Plane
  • transcode
  • Audacity (if using OSS)
  • gtkguitune
  • CMU Sphinx (PocketSphinx)
  • gtick
  • Sniper Elite
  • VLC (if using OSS)
  • wxtoimg

These are just the ones that I could track down; there almost certainly dozens of others. Unfortunately, the removal of OSS was done without notification to users or developers, and the general response is that the programs are broken if they use OSS. This means that Ubuntu Maverick Meerkat was shipped with programs that had no audio because of missing OSS support.

This is no way to create a distribution. The only fix is to revert the “fix”: compiling your own kernel with OSS support. If you do this, you’ll also want to pin the version to the one installed so APT doesn’t try to overwrite your version with a new kernel without OSS support. There is a good tutorial that shows you how to compile your own Ubuntu kernel.

Taking a screenshot in Linux

Taking a screenshot in Linux should be simple – and it is.  Pressing the PrintScreen key is all it takes – but what if….?

There is always more than one way to do things, and taking screen shots is no exception. In fact, it may be rather surprising how many ways it can be done. It can be done from the shell, from a keypress, and from various applications.

Over at Webmaster Tips, there is an excellent article that details most of them – and a followup article that describes a few more. The articles are worth reading – even if they focus on Ubuntu. The tips transfer to other Linux variants, though.


Get every new post delivered to your Inbox.

Join 43 other followers