Troubleshooters.Com Presents

Linux Productivity Magazine

August 2009

Desktop Linux that Just Works

Copyright (C) 2009 by Steve Litt. All rights reserved. Materials from guest authors copyrighted by them and licensed for perpetual use to Linux Productivity Magazine. All rights reserved to the copyright holder, except for items specifically marked otherwise (certain free software source code, GNU/GPL, etc.). All material herein provided "As-Is". User assumes all risk and responsibility for any outcome.

Recession Busters:
Twenty Eight Tales of Troubleshooting
Troubleshooting: Just the Facts
Manager's Guide to Technical Troubleshooting
Troubleshooting Techniques of the Successful Technologist

[ Troubleshooters.Com | Back Issues |Troubleshooting Professional Magazine ]

Linux is a wishing well.  --  Steve Litt, from the December 2002 Linux Productivity Magazine


Editor's Desk

By Steve Litt
After 9 years of Mandrake/Mandriva desktop Linux usage, I tried out Linux Mint and fell in love. It just worked! Up to date Flash for easy YouTube cruising. Excellent hardware detection (except wifi). Easy user GUI configuration that actually worked every time. Great looking fonts enabling my weak eyes to work long into the night.

Imagine my disappointment upon learning that Linux Mint issued a statement that people supporting one side of an international conflict were not welcome within the Mint Community. That statement was quickly removed from the Mint blog, and partially retracted on a personal blog. But as far as I could tell was never fully retracted on the Mint website.

Is free software that demands a political litmus test really free software? Not in my opinion. I stopped moving forward with Mint.

Yet knowledge cannot be unlearned. Now I wanted a GUI configurable true desktop Linux requiring no geekiness. A desktop Linux that "just works." A desktop Linux that's easy to use. A desktop Linux that totally precludes the need for Windows. If I couldn't use Mint, I'd have to make it myself.

So I told everyone who would listen what I was doing. At a GoLUG meeting I presented Mint, showing each feature making it so special. Time after time, as I showed off a feature, the audience said "hey, that's just Gnome" or "hey, Ubuntu has the same thing!" When I said "but look, Mint has the latest Flash right out of the box", they pointed out that behavior is just two checkboxes away in Ubuntu.

So when my Mandriva 2008 system disk permanently malfunctioned a few weeks later, I put my money where my mouth was, bought a new system disk, and installed Ubuntu. This was the first time in 9 years when Mandrake/Mandriva wasn't my daily driver operating system, and I'm quite pleased with the results. Ubuntu rocks if you want a "just works" desktop operating system.

As you read the instructions on making Ubuntu into a "just works" desktop, keep in mind that most of these instructions add extra capabilities. You can have a simple "just works" desktop, suitable for the average Windows user, five minutes after installing Ubuntu.
Steve Litt is the author of Troubleshooting Techniques of the Successful Technologist.   Steve can be reached at his email address.

Pre-Installation Decisions

By Steve Litt
Any Linux installation requires pre-installation decisions. The three I'd like to discuss here are:
  1. Syncing of user id numbers
  2. Quick installation of software you want
  3. Wifi

Syncing of user id numbers

Every user has a distinct user number (uid). For instance, on every system I've seen the user number of user root is 0. Typically, special users have lower numbers, while regular users have numbers starting at a specific number such as 500 or 1000.

Certain communication protocols such as NFS are simpler if user slitt on system A has the same user number as slitt on system B. I have a home office with a family LAN, and every computer has an slitt user with the same user number.

Before installing, you need to decide whether you want to sync user numbers or install with a special user number. If the latter, you'll need to install with a dummy user (I use username "init" for this purpose). Otherwise, just install with your desired username (slitt in my case).

Directions for assigning user numbers to user names will be given later in this document.

Quick installation of software you want

DVD based distros like Mandriva contain large package repositories right on the DVD. You choose which packages to install at installation time. Distros such as Knoppix, Mint and Ubuntu install a tiny system from which you can use the package manager to add software via the Internet.

There are benefits and drawbacks to both. I think the choice boils down to this: If you have broadband, the tiny installation followed by Internet package installation is the way to go. If you have dialup, package installation from DVD is vastly preferable.

In other words, I wouldn't recommend Ubuntu or any like distros for dialup, so from this point forward I assume if you're still reading, you have broadband.

Getting that "It Just Works" feeling

In order to get that "It just works!" feeling, you will be needing at the very least acroread and the flash utilities:
Put those at the top of your list in preparation for later use. If you just want a good general purpose desktop machine your list is done. If you're more of a power user, you need to install more packages.


Ubuntu is, and was designed to be, a "just works desktop" distribution. This means that you should NOT try to enable wifi with the iwconfig or ifconfig commands, or by editing configuration files. You should not manually download, compile and install wifi components unless you've tried ABSOLUTELY everything else. "Just work" desktops can get squirrely when half the config is via GUI and the other half is via Vim. Manual downloads and installs harm the integrity of the package manager database.

Getting a computer's Wifi to work dwarfs all other Linux difficulties. While it might not lead to the most incompatibilities (scanners, cameras and video cameras certainly give it a run for the money), it's by far the most burdomsome. Most people can live at least temporarily without transferrance from their camera or video camera, or even scanner. But nobody can use a laptop without an operable Wifi.

So before putting hours or days into setting up the perfect notebook, make sure you can get the wifi to work. If you can't, you need to make a different plan -- either an external wifi dongle, or different hardware, or a different version of the distro, or a different architecture (32 or 64), or a comletely different distro. Just make sure on any computer where wifi is important (laptops, for instance), that before you spend hours or days configuring it to your exact needs, you can get Wifi to work. Please read on...
Steve Litt is the author of the Universal Troubleshooting Process Courseware. Steve can be reached at his email address.

Check Wifi, Part I: Off the live CD

By Steve Litt
If you're lucky, the Ubuntu live CD will boot up with functional Wifi. This is more the exception than the rule, so don't despair if it doesn't happen, but maybe you'll get lucky.

A Wifi check has two prerequisites:
  1. You're in range of a known good, open, non-encrypted wifi access point. You should know the SSID of the access point. A library's a great place to do this.
  2. Your computer's physical wireless networking switch is set to enable wireless if it's the kind of switch that persists between reboots. If it's a toggle switch that doesn't persist (my Asus laptop ALWAYS starts up with the wifi hardware enabled, and then you can depress the toggle switch to turn it off), then you can ignore this prerequisite.
Boot the computer, wait about a minute, and look for the NetworkManager Applet icon, which by default appears on the taskbar just to the left of the volume control and the date. Depending on the state of your computer's networking, it should look like one of these:

Network StateIcon
No networkingNo icon
Networking, but no connectionBroken networking icon
Networking, wired connection   Networking, wired connection
Networking, wireless only, wireless not associatedNetworking, wireless only, wireless not associated
Networking, wireless only, wireless is associatedNetworking, wireless only, wireless is associated

If there's no icon, you have trouble and will need to investigate further.

If it looks like the "wireless associated" icon (Networking, wireless only, wireless is associated), it's probably working. Verify by making sure there's no wired network connection (there almost certainly won't be with a wireless icon) and then surf the web. If you can surf, Ubuntu works with your wireless hardware right out of the box.

If it looks like the wireless nonassociated icon (Networking, wireless only, wireless not associated), leftclick the icon and you'll see the following little screen:
Left clicking the NetworkManager icon   This screen shows all wired interfaces and all wireless access points. In this case the wireless access point is called "piano", and it's the access point to which I'm connected. I did this at home, so piano is my home wifi access point, and it's locked down with WPA2 encryption, which acounts for the little lock symbol between the name and the strength meter.

The access point "linksys" belongs to someone in the neighborhood, and as you can see it's wide open. If I were to click on it, the computer would detach from piano and attach to linksys, after which I'd be able to surf the net using the linksys access point. But of course it's both wrong and illegal to use non-public access points belonging to others, so I won't do that. This is one reason I recommend the library -- you probably want your wireless network locked down with WPA or WPA2, which makes it very hard to use for troubleshooting, and it's really not a good idea to use neighbors' wireless access points.

Anyway, click any unsecured access point that you're allowed to (either public or owned by you, but not private and owned by others). If it associates there will be a brief message in the upper left saying so. Then try to surf the net, and if you can, that's it, your live distro automatically works with your wifi.

If it looks like the wired connection icon (Networking, wired connection), disconnect the wired network and note the change in the icon. If it's one of the wireless icons, follow the instructions already given. If the icon disappears or you get the broken networking icon (Broken networking icon), then it doesn't work and you'll need to do some diagnostics.

If wireless worked right off the live CD, you can be confident it will work when installed.


Be careful with versions and architectures. Just because it works at 32 bits doesn't mean it will work at 64, and vice versa. Test live CDs for all versions and architectures you're considering. Remember, Wifi is usually the most challenging part of Linux installation.

Steve Litt is the author of the Troubleshooting: Just the Facts. Steve can be reached at his email address.

Check Wifi, Part II: Troubleshooting

By Steve Litt
If you're reading this it means Wifi didn't work the minute you booted the live Ubuntu CD. That's OK, it usually doesn't.

If you have a known good access point and your computer is unable to network though it, you probably have a driver problem. See what's in the computer by using the lspci command:
ubuntu@ubuntu:~$ lspci | grep -i netw
03:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)
ubuntu@ubuntu:~$ lspci | grep -i eth
00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
This example shows bad news, it's a Broadcom. Broadcom makes little effort to make its' wifi adapters easier to use in Linux. But you can have trouble with almost any Wifi manufacturer -- that's the nature of the game.

The way NetworkManager is supposed to work is that it always gives you the best connection, no matter where you go. If wired networking is plugged in, your access will be through the wired network. If the wired network gets unplugged, it will automatically migrate to the strongest open, unencrypted wifi access point. As you walk through town, it continually shifts to the strongest access point. If you get on an access point that for some reason is "bad", you can always leftclick the NetworkManager icon and pick a more suitable access point.

If you can't a NetworkManager icon, or you can't find a known good access point, or you can't associate with that access point, do System->Administration->Hardware_drivers. In the list, try to find anything relating to the hardware you found in your lspci command. Try enabling that hardware and check again.

Be careful though. Some of the drivers tell you to reboot in order that the driver be instantiated. Obviously, you can't keep a driver setting through a live CD reboot. In this case, you'll need to do a quick install and then try to enable the hardware from there. You might even need to enable third party repositories and run a Synaptic update to get the proper drivers.

If, after trying all drivers, you still can't get wifi working, it might be best to find an older (at least 6 months old) wifi dongle, which will probably be supported by Ubuntu, and use that.
Steve Litt is the author of the Rapid Learning for the 21st Century. Steve can be reached at his email address.

Installing Ubuntu

By Steve Litt
Ubuntu installs pretty much like any modern distro. It's simple enough for anyone. Plug the computer's wired network adapter into any DHCP equipped wired network and boot the Ubuntu CD. Boot into the live CD -- you want to make everything's OK before actual installation. Also, installation works much better out of the live version than it does if you boot into installation.
Why not boot directly into installation mode?

Running the installation from a running live Ubuntu distro gives you a full GUI environment. Booting into it gives you a sort of framebuffer environment in which some of the text, and even the buttons to click, are off the screen.

When asked how to partition your installation, the simplest selection is to let it take over your whole disk. Personally I partition manually to get it just how I want, but the easy way is to let it take over the whole disk.

Aside from that, just answer the questions and let the installation proceed. It should take between 20 minutes and an hour, depending on the speed of your computer. Like most modern distros, you answer questions first and then let it do its thing unattended, so it doesn't waste your time.

Once Ubuntu has installed, the result looks something like the following screenshot:
Brand new Ubuntu installation
Steve Litt is the author of the Universal Troubleshooting Process Courseware. Steve can be reached at his email address.

Your New Ubuntu Installation

By Steve Litt
Your new Ubuntu installation looks like this:
Brand new Ubuntu installation

The bottom bar is mainly for showing gui applications in the current workspace. However, the leftmost icon minimizes all apps in the workspace, while on the right is a workspace list and a trash can.

The top bar is, for want of a better word, the menu bar. The bottom bar is a list of applications opened in the current workspace. Both these are generalizations, but they'll serve for now.

As mentioned, the top bar is the menu bar. Here is a close up photograph of the menu bar, with the right end shown below the left and lots of the empty center left out in order to fit comfortably on this web page:
The menu bar

The main menu has three entries: Applications, Places and System. To the right of those is an icon for Mozilla, an icon for Evolution email, and an icon for Ubuntu Help. Oh the right end, from left to right, are the network icon, the volume control icon, the date and time, and finally the user name and an icon to shut down, restart, log out, and lots of other options.

Here is the menu structure:
Applications Places System
CD/DVD Creator
Character Map
Disk Usage Analyzer
Manage Print Jobs
Passwords and Encryption Keys
Take Screenshot
Text Editor
Tomboy Notes
Not of interest in this document
F-Spot Photo Manager
GIMP Image Editor Drawing
XSane Image scanning program
Ekiga Softphone
Evolution Mail
Firefox Web Browser
Pidgin Internet Messenger
Remote Desktop Viewer
Terminal Server Client
Transmission BitTorrent Client
Evolution Mail and Calendar Presentation Spreadsheet Word Processor
Sound and Video
Brasero Disc Burner
Movie Player
Rhythmbox Music Player
Sound Recorder
Pulls up an applet to add and remove
Home Folder
Connect to Server
Search for Files
Recent Documents
About Me
Assistive Technologies
Default Printer
Encryption and Keyrings
Keyboard Shortcuts
Main Menu
Network Connections
Network Proxy
PalmOS Devices
Power Management
Preferred Applications
Remote Desktop
SCIM Input Method Setup
Startup Applications
Computer Janitor
Hardware Drivers
Language Support
Log File Viewer
Login Window
Network Tools
Software Sources
Synaptic Package Manager
System Monitor
System Testing
Time and Date
Update Manager
USB Startup Disk Creator
Users and Groups
Help and Support
About Ubuntu
Steve Litt is the author of the Manager's Guide to Technical Troubleshooting. Steve can be reached at his email address.

Including Nonfree Software

By Steve Litt
The biggest difference I see between Ubuntu and Mint is that by default Mint includes nonfree applications including up to date Flash and codecs, whereas by default Ubuntu doesn't. This is a big reason why Mint "just works".

In order to make Ubuntu into a "just works" distro, you need some nonfree software. You can get that by adding the nonfree software repositories via the following process:
  1. System->Administration->Software_Sources
  2. Enter your password. The Software Sources app appears
  3. Click Third-Party software tab
  4. Check both of these:
    1. jaunty partner
    2. jaunty partner (Source Code)
    3. NOTE: Different Ubuntu versions might have different URLs
  5. Click the Close Button
  6. You are presented with a dialog box saying your available software is out of date.
  7. Click Reload. 
  8. Wait for downloads to register. There could be a lot of them and it could take some time.
  9. The Update Manager appears
  10. Click the Install Updates button
  11. Wait for updates to execute. This could take up to an hour. Find something else to do.
  12. You are presented with windows that tell you your system is up to date and asking you to restart your computer. Make sure no apps are open, then click the Restart Now button.
Now your computer is very close to "just works."
If for some reason the download or update is interrupted, you can start it again with the Update Manager. System->Administration->Update_manager.

Steve Litt is the author of Twenty Eight Tales of Troubleshooting.   Steve can be reached at his email address.

Install "Must Have" Nonfree Apps

By Steve Litt
  1. System->Administration->Synaptic_Package_manager
  2. Type your password
  3. Type "flash" without the quotes into the Quick Search field
  4. Place a checkmark in the following:
    1. flashplugin-nonfree-extrasound
    2. flashplugin-nonfree
    3. flashplugin-installer
  5. Click Apply and confirm
  6. From the command prompt type the following:
That's it. You have Acrobat reader and the latest Flash, and your computer is pretty much a "just works" computer. There will be a few outliers that don't work as expected, but for the most part this is a computer the average Windows user would be comfortable with.

That's right -- Ubuntu has done away with the need for Windows. And Ubuntu has done that without giving up the quality we've all expected of Linux. As a matter of fact, Ubuntu strikes me as one of the most solidly reliable operating systems I've ever used.
Steve Litt is the author of the Troubleshooting Techniques of the Successful Technologist. Steve can be reached at his email address.

Play Quicktime via Mplayer in Mozilla

By Steve Litt
The .mov files created by my wife's Kodak DX4530 digital camera have no sound if Mozilla uses its Quicktime player. Setting Mozilla's Quicktime plugin to Mplayer solves this:
  1. Within Mozilla, Edit->Preferences
  2. Click the Applications tab
  3. Scroll down to the Quicktime video line
  4. Click the "Action" side of the line
  5. Use Other...
  6. Navigate to /usr/bin/mplayer
  7. Click the Close button
Steve Litt is the author of the Rapid Learning for the 21st Century. Steve can be reached at his email address.


By Steve Litt
That's it! You've set up a sure fire "it just works" Linux desktop. You did that with these steps:
As you read the increasingly complex instructions in the rest of this magazine, it's important you keep in mind these instructions are to make the computer into a power-user's dream box, and would be as hard in Linux Mint and harder in Windows.
Steve Litt is the author of the Troubleshooting: Just the Facts. Steve can be reached at his email address.

Power Users

By Steve Litt
Some people use a computer as an appliance. As long as they can get email, IM, browse the web, access YouTube, Twitter, and their favorite social networking sites, they're happy. The Ubuntu computer set up previously in this document more than fulfills their needs.

Other people tailor their computer to facilitate what they do in their lives. The electrical engineer's computer contains CAD and circuit design programs. The graduate student's computer contains document creation software capable of creating a thesis. The tax pro's computer contains specialized tax software. My rock guitarist son's computer has TuxGuitar.

These people are power users. Their computer isn't an appliance they buy, use and enjoy. For them, the computer is a maleable tool molded to what they do in their lives. Every power user's computer is set up differently, because every power user does different things in life.

Each power user requires special software, special configuration, and special resources. Sometimes these things are bought, sometimes they're installed as free software, and sometimes, as a matter of fact more often than you would suspect, the power user programs these functionalities into the computer.

Here is a list of some of my life's activities:

Activity Software
Author Troubleshooters.Com content     I use the komposer GUI web page creator plus Vim.
Author courseware OpenOffice, LyX, and Microsoft Word. This is the last usage I have for the headless Win98 machine sitting int he corner.
Author books VimOutliner, Vim and LyX
Personalize courseware LyX, custom shellscripts, and a custom Powerpoint binary modifier
Personalize eBooks LyX, pdftk, latex, ps2pdf, and lots of customized shellscripts
Ship print books Gnumeric, latex, customized shellscripts and Perl scripts
Account for book orders Gnumeric
Think VimOutliner
Plan VimOutliner
Research Wikipedia, search engines
Communicate kmail, xchat
Program computers gcc, perl, python, ruby, guile
Backup rsync, ssh, customized shellscripts, Ruby "best fit" DVD fitters

The preceding just scratches the surface of what I do and how the computer helps me, but it illustrates the fact that my computer is a very customized device. I'm a power user. Despite the trade press's preachings that we're entering the age of "cloud computing", there are plenty more like me.
Steve Litt is the author of the Universal Troubleshooting Process Courseware. Steve can be reached at his email address.

Activate Root User

By Steve Litt
To best please the unsophisticated user, Ubuntu has no root user by default. Instead, everything, and I mean everything, is done via sudo, which requires only the user's password, not a root password.

We power users know that's bad for security and it also makes it easier for us to make a stupid mistake and wipe out lots of things, so we're going to fix that. But before criticizing Ubuntu for this, keep in mind that it's how Windows works, and Ubuntu is probably the distro that will dethrone Windows on the desktop.

So do this:
That's it, you now have a root password.

You still have a normal user with huge amounts of power -- to much many might say. You can greatly reduce the power of this and all other normal users with tools like System->Administration->Authorizations and System->Administration->Users_and_Groups. You can also use visudo to eliminate the widely granted priveleges in the sudoers file.

Security vs. Convenience

If security were our one and only priority, we'd all be running BSD without X (GUI). In fact, many servers are run exactly this way. Or we could run Slackware with an empty sudoers file.

If convenience were our one and only priority, every user would have access to every command and process. Kind of like Windows 9x. This would benefit botnet herders, but it guarantees regular users constant malware and user-caused problems.

A realistic desktop Linux requires a compromise between security and convenience, based on the assumption that the computer will mostly be used by one user. So we lighten up a little on the security (demanding a password to mount a CD is sooooo 1998). A newly connected USB connection gets automatically mounted if it's mountable. The ordinary user can passwordlessly do user-centric things like changing the screen resolution or the window manager theme. After all, this is meant to be a desktop computer, not a server.

On the other hand, the power user probably wants to beef up Ubuntu's default security. Ubuntu "ships" with no firewall -- everybody can grab whatever they can see. The console user can do every conceiveable thing with his own password, and there's no root user.

As the desktop computer's user, you have to decide where to draw the line in security vs. convenience. It's almost bound to be closer to the security end than how Ubuntu defaults on initial install.
Steve Litt is the author of Twenty Eight Tales of Troubleshooting.   Steve can be reached at his email address.

Install Custom Software

By Steve Litt
As the preceding article points out, the power user needs to install custom software. The Synaptic Package Manager (System->Administration->Synaptic_package_manager) is ideally suited for installing software except one thing -- if you're going to be installing 50 packages, you don't want to point and click through the whole thing. The better way to do it is make a list of the packages and then turn that list into an installation script.

The following is my personal install list, with over 150 items:


Some of those are already installed by default, but rather than check a virgin install, I just put them in to make sure. A few of these are vital enough to warrant special mention:
gufw This is an easy to use graphical front end to the very cryptic ufw firewall that Ubuntu uses by default. Gufw is a must-have.
gnome-alsamixer All volume controls are not created equal. Some have just one adjustment. gnome-alsamixer is likely to have all the volume controls supported by your sound card.
imagemagick This contains conversions between the various types of graphic files. You'll almost certainly be using this.
sox Called the "swiss army knife of sound processing", if you ever work on sound files, or need to convert them, this is a must.
ssh Client and server for secure server and secure ftp. Using ssh relieves you of the security risk of typing your password unencrypted, as well as encrypting everything sent over the wire.
perl-tk This gives perl programs, whether written by you or others, a graphical interface. You'll almost certainly need this sooner or later, and lack of it creates difficult to diagnose symptoms.
vim The Unix world's most ubiquitous editor, and a highly productive one. Vim installs by default, but installing the vim package yields extra capabilities
vim-gnome This gives you a graphical Vim editor, which is much more convenient than running the editor in a terminal.
Make sure you have good looking screen fonts by installing the xfonts.

You'll also need to install Windows Arial, Courier and Times New Roman so your PDFs and presentations will be identical on Windows computers, but that will be covered later in this document.

Shellscripts to Make Installation Easier

OK, so you've made a list of packages to install, one package name on each line. That's great. What do you do now?

First of all, it's very likely you got some of your package names wrong. You need to get them all right, or you won't have all the software you think you have. Here are two shellscripts, called and, that check to see that every package name exactly matches the name of a downloadable package:
while true; do
read myline || break
./ $myline
foundpackages=$(aptitude --disable-columns -F %p search $1)
for i in $foundpackages; do
if test "$1" == "$i"; then
if test $returncode == 1; then
echo -n 'Package >'
echo -n $1
echo '< not found, investigate'
exit $returncode

You run this command like this:
cat mypackagelist.txt | ./ > mymistakes.txt
After running the preceding command, file mymistakes.txt contains all of your package names that didn't exactly match a downloadable package. Investigate each one. The following commands might help:
aptitude search --disable-columns packagename       #### finds packages with name containing packagename
aptitude search --disable-columns ^pack #### finds packages with name starting with "pack"
aptitude search --disable-columns . | grep regex #### finds packages whose names or descriptions contain "regex"

There might even be some packagenames that are good but do not register a hit with an aptitude search. Whatever, check out all package names before proceeding.

Once you have a good list of package names, you can turn it into an installation script with
echo '#!/bin/bash'
while true; do
read myline || break
echo -n "apt-get install "
echo $myline

The output is a list where each row is an apt-get install command. Use it like this:
cat mypackagelist.txt | ./ >
Then, wait til you don't have to use the computer for a few hours, make executable and execute it.

Checking What Got Installed

Wouldn't it be nice if every one of those apt-get install commands in the install script resulted in a successful installation? Dream on. You have to check which ones failed to install. Here are a shellscript and called perl script to do the checking.

# $dashcol is the 1's based column in which the dash preceding
# the package description occurs, when running this command:
# aptitude search .
# Note that your version of aptitude might format differently,
# in which case you'll need to change the value of dashcol for
# this script to work correctly.
# To verify correctness, look at file insts_temp.txt,
# and use an editor to find the 1's based column number
# of the dash.
let dashcol=37
let b4dashcol=$dashcol-1

# Get sorted version of installation list
cat $1 | sort >temp.txt

# Record separator
echo '%%%sep%%%' >> temp.txt

# Get sorted list of installed packages
aptitude search . | grep ^i > insts_temp.txt
cat insts_temp.txt | cut -b5-$b4dashcol | sed -e "s/ *$//" | sort >> temp.txt

# Send the whole thing to perl to match
cat temp.txt | ./

The preceding takes the list of desired packages (which you made earlier) as arg1, creates a list of installed packages, then pipes the desired and installed packages separated by %%%sep%%% to, which contains the logic to match desired with installed. The script follows:
#!/usr/bin/perl -w
use strict;
use warnings;

my @desired = ();
my @installed = ();
my $state = 0;
my $line = $_;
chomp $line;
if($line eq "%%%sep%%%"){
$state = 1;
push(@desired,($line)) if $state == 0;
push(@installed, ($line)) if $state == 1;

my $installedss = 0;
my $installed_rec = shift(@installed);
foreach my $desired_rec (@desired){
while($desired_rec gt $installed_rec){
$installed_rec = shift(@installed);
if(!defined($installed_rec) || $desired_rec ne $installed_rec){
printf("%s NOT installed.\n", $desired_rec);
#printf("%s successfully installed.\n", $desired_rec);


The following is a typical run:
slitt@mydesk:~$ cat mypackagelist.txt | ./
alsa-oss NOT installed.
alsa-tools NOT installed.
alsa-tools-gui NOT installed.
alsa-utils NOT installed.
perl-tk NOT installed.
python-tk NOT installed.
ttf-freefont NOT installed.
You then check each of those. Perhaps aptitude was wrong about their being installed. It happens. Try running each one in its own apt-get install command and manually see what happens. If it says it's already installed, aptitude was wrong. Perhaps there's an unresolvable conflict and it's not worth working around to install the package. Just make sure you research each reported failure so you know what is and is not on your machine.


You could have manually installed each package with Synaptic Package Manager. It would have taken less thought and less preparation. However, making an install list that converts to an install script has two benefits:
  1. The install script method takes less time and MUCH less human intervention.
  2. Your install list can be kept to ease your next reinstallation or new installation.
The basic method is to make a list of names of packages to install, check the names with a script, investigate and fix the non-matches, use a script to convert the list to an install script, and run the install script. Do this when you don't need your computer for several hours, because it's likely to take over an hour to install a large number of packages. Fire it off at night, and wake up in the morning with a fully loaded computer.

Once the mass installation is finished, use scripts to see which packages didn't get installed, and investigate.
Steve Litt is the author of Twenty Eight Tales of Troubleshooting.   Steve can be reached at his email address.

Fire Up Your Firewall

By Steve Litt
In the Windows world, millions of people type away, blissfully unaware that their computers are being used as bots to send spam or deny service to websites. Many others are blissfully unaware of the keystroke logger malware on their machines, giving mobsters their bank account passwords and their most secure information.

Badguys can get into your computer many different ways. Firewalls prevent one way -- coming in through an unused port. A firewall disables all unused ports so the badguy bounces harmlessly off it. Even if the badguy gets in via an email virus, a buffer overrun or a purloined password, the firewall has closed off a lot of ports he might have used to get back out. Sure, the badguy could include code to tweak your firewall, but every additional piece of code makes his job harder -- writing good reliable code is just as hard for a badguy as it is for a legitimate software developer.

So start by running gufw, or System->Administration->Firewall_configuration. Input your password when asked and you'll be presented with a screen like the following:
gufw initial screen   As you can see, Ubuntu ships with the firewall disabled, so your ports are hanging out in the breeze for anyone to access. Now of course, if your LAN has a firewall at its gateway, like it should, this possibility is lessened, but desktop computer firewalls are still desireable. Also, a gateway based firewall does nothing to protect you against hostility or fun and games on your own LAN. You need a firewall!

The first thing you need to do is enable the firewall by clicking the "Firewall enabled" clickbox. Then, click the "Deny incoming traffic" radio button. A firewall whose default rule is "allow" isn't much better than no firewall at all.

The preconfigured screen   Once your firewall is running, click the "preconfigured" tab, so gufw looks like the image at the right.

This is for quick and dirty pinholing of major well known services such as ftp, ssh, pop3, smtp, ipp and the like.

The first dropdown lets you choose allow or deny. Given the fact that the default is deny, you'll leave all of these at allow. The service dropdown, which is marked "ftp" in the image on the right lists a choice of several common and well known services.

gufw preconfigured, dropdown   Click on the service dropdown and select a service to allow. Then click the "Add " button to add it to the list of rules.

gufw preconf tab, filled out   The screen on the left shows an allowance for ssh (port 22) and the ipp print sharing protocol (port 631).

Now click on the "Advanced" tab...

gufw, advanced tab   Here we enabled this computer to be a DNS server. It will handle queries from anywhere on the 192.168.100 subnet and reject queries from anywhere else. It opens both (tcp and udp) port 53, the DNS port, for queries coming in through interface Finally the "Add" button is clicked, and the rule is formed.
Steve Litt is the author of the Manager's Guide to Technical Troubleshooting. Steve can be reached at his email address.

Wifi the Ubuntu Way

By Steve Litt
The December 2006 issue of Linux Productivity Magazine took great pains to advocate network invocation and administration from the command prompt. That's great for "near the metal" distros like Slackware and maybe even Mandriva, but Ubuntu is a "just works" desktop distribution intended to be used graphically. Ubuntus tools are so good that graphical administration is usually perfect. In fact, in many distros, if you configure sometimes in GUI and sometimes in CLI, things often get out of sync resulting in hard to diagnose problems.  You're using Ubuntu as an easy to admin desktop computer -- I suggest you administer it in the Ubuntu intended way.
Steve Litt is the author of the Rapid Learning for the 21st Century. Steve can be reached at his email address.

Optional: Install Custom Usernames

By Steve Litt
If you just want to use one machine alone, you can install with your desired username (in my case that would be slitt). But sometimes you want specific numerical IDs for specific usernames. In that case, you need to follow the procedures outlined in this article.

To start with, you must have installed using an unwanted username. I typically use "init" for such a username. Then you must figure out all user/id and group/id combos you want, and make Ubuntu recognize these as regular users rather than system users. Find the lowest numerical ID, and change three files to change what users are special system and which ones are ordinary users. I got this info from Assume here that you want to change the system/ordinary border from the Ubuntu default of 1000, to the old Mandrake default of 500. Here's what you do:
  1. /etc/login.defs: Change value of UID_MIN from 1000 to 500.
  2. /etc/gnome-system-tools/users/profiles changing: Change every uid-min=1000 to uid-min=500.
  3. /etc/adduser.conf: Change LAST_SYSTEM_UID=999 to 499 and  FIRST_UID=1000 to 500.
  4. Just for fun, reboot.
    Steve Litt is the author of the Troubleshooting: Just the Facts. Steve can be reached at his email address.

Custom Keystrokes

By Steve Litt
Many, especially touch typists, want to work with keystrokes as well as the mouse. For instance, I always associate the Ctrl+9 key combination with the UMENU program. Here's how I do it:
  1. System->Preferences->Keyboard_shortcuts.
  2. Click the Add button. The Custom Shortcut dialog box appears.
  3. Insert "mykey" (minus the quotes) in the name, and "xterm" (minus the quotes) in the command.
  4. Click the Apply button. A new row whose action is "mykey" appears in the keyboard shortcuts list.
  5. Click on the Shortcut column of the mykey row. That column changes to "New shortcut..."
  6. With the keyboard, hit the keyboard combo that you want to invoke the new command. In this case we'll use Ctrl+1, so hit the Ctrl+1 keystroke combination.
  7. Test the new shortcut by hitting the Ctrl+1 keystroke combination. A copy of xterm should appear on the screen.
    Steve Litt is the author of Troubleshooting Techniques of the Successful Technologist.   Steve can be reached at his email address.

The Politics of Free Software: Free Software Fanaticism

By Steve Litt
When Linus Torvalds forbid restoration of ndiswrapper in the kernel on the grounds that it loaded non-GPL code, he became eligible for the Ralph Nader Screw Your Constituancy award. He set Linux adoption back considerably.

Here's why. The existance of ndiswrapper enables the prospective laptop buyer to be pretty darned sure that when he buys a laptop he can get its wireless networking to work. Without ndiswrapper, prospects for wifi on a brand new laptop are bleak because the free software community hasn't yet reverse engineered drivers.

Linus' abandonment of ndiswrapper materially reduced Linux usage. I don't have the tools to measure the reduction, but it's common sense. Let's say you're on the fence between staying with Windows or going with Linux on your next laptop. You know it's likely that the wireless networking on that brand new $600 laptop at Costco won't work with Linux. Here are your choices:
  1. Buy one of those farcically overpriced Linux Preload laptops
  2. Buy the Costco laptop and wait several months for Linux drivers to catch up
  3. Buy a Linksys wifi dongle and hope you can get THAT to work under Linux
  4. Stick with Windows
Is it any wonder you see so few people with Linux laptops?

In a 2/29/2008 email, Linus stated the following:

"Quite frankly, I don't care about ndiswrapper enough (at all) to push this along in the least."

Linus has his own priorities, but frankly, I care a lot. Here's why. We have a vicious circle going here. Hardware vendors won't help Linux developers because Linux has only 1% of the desktop market. Linux has only 1% of the desktop market because the hardware vendors won't help the Linux developers.

If and when we push our desktop market share up to 20%, hardware vendors won't blow us off. Innovative products like ndiswrapper, which form a connector between the Linux kernel and the vendor's Windows driver, help promote market share growth. By opposing things like ndiswrapper, we're relegating ourselves to permanent hobbyhood. Personally, I look forward to a day when I can go to Costco and buy a Linux computer for $600, but that will only happen if we quit blowing off curious Windows users with stuff like anti-binary discrimination.

The Twentieth Century is Gone

Remember the late 1990's? Thousands of Geeky people migrated to Linux, made it work, made it work on hostile hardware, did whatever it took. We dreamed of world domination by Linux. Our viewpoint in those ancient times -- hey, all the user has to do is find and download the latest drivers, sort out all dependencies, compile the driver, recompile the kernel, and he'll have a computer just as convenient as his Windows computer.

We could be forgiven our irrational exhuberance -- those were times of endless possibility. Linux was on the lips of the great unwashed. Retirees were investing in Linux stocks and asking whether they should switch their computers to this promising new operating system. Microsoft was in serious danger of being broken up like monopolies of the past. The dot com implosion, 9/11, the 2001-2003 recession, the wimpout of the Justice department in the Microsoft antitrust case, and the 2008-2009 recession were in the unseen future.

Now we know better, or at least we should. Rank and file computer users don't view Linux as compelling because it's the darling of Wall Street. They just want a useful computer, and don't want to spend brainpower getting it useful. And these people have their own definition of useful, which includes being able to work on Microsoft documents, interface with Microsoft servers and middleware, and have their hardware and various multimedia just work. These things are obvious to anyone paying attention. These things are imperative if Linux is to garner the market share necessary for hardware vendors to give us drivers.

And yet, within our own Linux community, free software fanatics continue to blow off the very convertees who could force the change, enabling purchase of a Linux Laptop at Costco. Our own free software fanatics denigrate the intelligence and free software credentials of those using binary drivers. They criticize ndiswrapper, the last resort of wifi. They believe coexistence of nonfree software and free software on a Linux box makes the free software impure.

The free software fanatics don't evangelize Linux, but instead treat Linux as an exclusive club in which membership must be earned through trial by fire. It's not their problem if people don't use Linux. It's not their problem if, for marketshare reasons, hardware manufacturers don't help with drivers and software vendors don't port their commercial software to Linux. They cannot imagine why a businessperson might want to keep on using Quickbooks after converting to Linux, or might see lack of Quickbooks as an impediment to conversion.

This is the Twenty First Century

We long ago converted all the free software enthusiasts to Linux. We long ago converted the true Geeks who wanted the best OS, and had the knowledge to put the best OS together. We've even converted a few power users. All these conversions have gotten us 1% of the desktop market share. The other 19%, or better, 49%, must come from normal, everyday Windows users. You know, those guys we used to laugh at.

Those everyday Windows users have an expectation born of pre-sale installations, hardware vendors who write drivers for Windows, software vendors who write apps for Windows, and file formats that originated as Windows apps. That expectation: "It Just Works!"

They don't give a flying flamingo about free software purism, or the details of a software license, they just want it to work. The extent of their impression that Linux "just works" will the be extent of their conversion. Very few people in the 21st century believe Windows is the best -- they just believe it's the easiest. Eliminate that belief and they'll migrate  in record numbers.

Achieving "It Just Works"

There are a million and one ways to achieve "It Just Works." The oldest is probably the equivalent app -- Mozilla does just about everything Internet Explorer does, and OpenOffice does most of what Windows does, and does it with the same files. Another is providing access to nonfree software. The United States DMCA law makes this harder, but it's obviously doable -- all the distros make it available whether or not they turn it on by default.

And of course an important method to achieve "just works" is the nonfree binary, such as the binary drivers hardware manufacturers give us, or the free software interfaces to nonfree Windows drivers: ndiswrapper. If we blow off this method of achieving "just works", we might feel freesoftwarily pure, but we've just relegated Linux to an upper limit of one or two percent of the desktop market, and relegated ourselves to forever being denied drivers and ports of important commercial software.
Steve Litt is the author of the Troubleshooting: Just the Facts. Steve can be reached at his email address.

The Politics of Free Software: Pet Predjudices

By Steve Litt
This Linux Productivity Magazine was planned to be on Linux Mint. It was planned to be authored on a Linux Mint machine. Then this verbiage appeared on the Linux Mint official blog, posted by Linux Mint founder Clem LeFebvre, on or about May 3, 2009:

"If you do not agree I kindly ask you not to use Linux Mint and not to donate money to it."
and this:
"I don’t want any money or help coming from Israel or people who support the action of their current government."

Excuse me? I thought free software was about freedom as in speech, not as in cost. If software requires a certain political viewpoint, it's not free software. Your mileage may vary, but if it's not free software, I don't use it.

Clem LeFebvre chose sides in a conflict. That's fine and admirable. He expressed his opinions. That's fine and admirable. But when he posted it on Linux Mint's website, he crossed the line. He made Mint nonfree.

Everyone makes mistakes. That's why pencils have erasers. Clem made a mistake. He admitted as much. His post was wiped from the official Mint blog within a day, and moved to a personal blog. He even moderated his position to express sympathy for victims on both sides of the conflict. The trouble is, the Linux Mint website has never placed a prominent retraction on their front page.

On 6/15/2009 I emailed Clem asking that Mint place the following on their front page:

"The Linux Mint project welcomes users, contributors and community members from all political persuasions. We regret earlier Linux Mint Blog statements to the contrary. We continue to hope that the world's differences can be
solved peacefully."

That's not exactly asking for a public self-flogging or a term in the public-square pillory. But they did not do it, or anything close. And so today, Mint's latest prominent stance on the subject is contributors need to pass a mideast conflict litmus test.

You want to know the real shame of this? Free software is our generation's version of the 1971 ping pong game that reopened Chinese/American relations. The LGPLed FriBidi software was written by cooperative Iranian and Israeli developers. Here are two countries who could very possibly incinerate one another in a radioactive maelstrom, yet through free software there is cooperation. At least among those developers, there will be a second thought when someone says "they're evil, nuke em!" By excluding one side, Linux Mint has effectively prevented this avenue of communication.

This serves as an object lesson for every free software project leader. Leave your personal beliefs on your personal blog, make it clear your personal beliefs have nothing to do with your software, and if you stray from that policy, quickly and prominently post a retraction on the project website. Otherwise, how long will it be until there is an "all Christian project" or an "all White project?"

It's a slippery slope, so stay well away.
Steve Litt is the author of the Universal Troubleshooting Process Courseware. Steve can be reached at his email address.

Life After Windows: When the Revolution Ends

By Steve Litt
Most Linux users; at least we old timers who came to Linux in the 20th century, came to Linux in a wave of revolutionary zeal. How well I remember the euphoric evangelism of the 1999 LinuxExpo in Raleigh, North Carolina. We all came to Raleigh to celebrate our ascendency. We were working for Linux world domination. Our every word and thought was on Linux. We bought Linux stocks. We were the new way. We would soon bury Microsoft.

How well I remember my May 1999 Troubleshooting Professional Magazine, themed "Where Have All the Heroes Gone?", a pro-Linux issue that was Slashdotted and broke all Troubleshooters.Com page traffic records. I remember those heady 1999 and 2000 days writing chapters for "Red Hat Linux 6 Unleashed", "Linux Unleashed", "Red Hat Linux 7 Unleashed", and becoming the main author of the highly acclaimed "Samba Unleashed."

I remember the triumph of those March 2001 days when I put my business where my mouth was and converted my business from Windows to Linux. When my email headers said "Kmail" instead of "Eudora." My business's Windows to Linux conversion happened in one big step followed by many small steps as I moved first backup, then outlining, then book authoring from Windows to Linux.

Most of all, I remember the excitement of new discovery. Making my first Samba setup. My first DHCP server. My first kernel compile. DNS servers. HTTP servers. VNC servers. NFS servers. Socket programming. IPChains, and then IPTables. Config files xorg.conf, fstab, inittab, printer config files (pre-cups), network config files, cron config. I felt more powerful with each discovery.

Where did those wonderful times go?

Today all I do with Linux is use it. Today, Linux is just the tool I use to keep my business running. I don't remember all the config files and their syntax. Once an acknowledged authority on Samba, today I've forgotten most of what I knew, and haven't kept up on its gains since 2000. Samba's not part of my world -- my one and only Windows box sits headless in the corner, used once a month if it's lucky. You don't need Samba if your office and your entire household is Linux.

By 2004, not only did I have a Linux computer, but so did each of my three children. Now admin and troubleshooting weren't fun any more -- they were a pain in the petunias. The kids took over minor admin and troubleshooting, and I began to look for distros that would be easier for them.

It's 2009 now. My wife and each of the kids has a Linux Mint box -- soon to become Ubuntu in the "just works" configuration discussed in this Linux Productivity Magazine issue. My two laptops are Ubuntu "just works." I get less calls for troubleshooting, and when I do, modern distros' graphical tools mean I don't have to try to remember which config file and which syntax the config file uses. I can quickly fix or enhance, and get back to the business of writing and teaching.

In 1999 I was considered a Linux hotshot. Today I'm just a Linux desktop power user. How far I've fallen. In 1999 I was the Linux revolutionary fighting for a world where Windows would be unnecessary. Today I'm a boring desktop Linux user who uses his Windows 98 box maybe 3 hours a month. How the mighty have fallen.

Of course, there's another way to look at it. Our vision as revolutionaries was a world where Linux was our OS -- nothing more, nothing less. Thanks in no small part to the modern "just works" Linux distros, 2009 is the embodyment of our 1999 revolutionary vision.

What happens when the Revolution Ends? You win!
Life After Windows is a regular Linux Productivity Magazine column, by Steve Litt, bringing you observations and tips subsequent to Troubleshooters.Com's Windows to Linux conversion.
Steve Litt is the founder and acting president of Greater Orlando Linux User Group (GoLUG).   Steve can be reached at his email address.

GNU/Linux, open source and free software

By Steve Litt
Linux is a kernel. The operating system often described as "Linux" is that kernel combined with software from many different sources. One of the most prominent, and oldest of those sources, is the GNU project.

"GNU/Linux" is probably the most accurate moniker one can give to this operating system. Please be aware that in all of Troubleshooters.Com, when I say "Linux" I really mean "GNU/Linux". I completely believe that without the GNU project, without the GNU Manifesto and the GNU/GPL license it spawned, the operating system the press calls "Linux" never would have happened.

I'm part of the press and there are times when it's easier to say "Linux" than explain to certain audiences that "GNU/Linux" is the same as what the press calls "Linux". So I abbreviate. Additionally, I abbreviate in the same way one might abbreviate the name of a multi-partner law firm. But make no mistake about it. In any article in Troubleshooting Professional Magazine, in the whole of Troubleshooters.Com, and even in the technical books I write, when I say "Linux", I mean "GNU/Linux".

There are those who think FSF is making too big a deal of this. Nothing could be farther from the truth. The GNU General Public License, combined with Richard Stallman's GNU Manifesto and the resulting GNU-GPL License, are the only reason we can enjoy this wonderful alternative to proprietary operating systems, and the only reason proprietary operating systems aren't even more flaky than they are now. 

For practical purposes, the license requirements of "free software" and "open source" are almost identical. Generally speaking, a license that complies with one complies with the other. The difference between these two is a difference in philosophy. The "free software" crowd believes the most important aspect is freedom. The "open source" crowd believes the most important aspect is the practical marketplace advantage that freedom produces.

I think they're both right. I wouldn't use the software without the freedom guaranteeing me the right to improve the software, and the guarantee that my improvements will not later be withheld from me. Freedom is essential. And so are the practical benefits. Because tens of thousands of programmers feel the way I do, huge amounts of free software/open source is available, and its quality exceeds that of most proprietary software.

In summary, I use the terms "Linux" and "GNU/Linux" interchangably, with the former being an abbreviation for the latter. I usually use the terms "free software" and "open source" interchangably, as from a licensing perspective they're very similar. Occasionally I'll prefer one or the other depending if I'm writing about freedom, or business advantage.
Steve Litt has used GNU/Linux since 1998, and written about it since 1999. Steve can be reached at his email address.

Letters to the Editor

All letters become the property of the publisher (Steve Litt), and may be edited for clarity or brevity. We especially welcome additions, clarifications, corrections or flames from vendors whose products have been reviewed in this magazine. We reserve the right to not publish letters we deem in bad taste (bad language, obscenity, hate, lewd, violence, etc.).
Submit letters to the editor to Steve Litt's email address, and be sure the subject reads "Letter to the Editor". We regret that we cannot return your letter, so please make a copy of it for future reference.

How to Submit an Article

We anticipate two to five articles per issue. We look for articles that pertain to the GNU/Linux or open source. This can be done as an essay, with humor, with a case study, or some other literary device. A Troubleshooting poem would be nice. Submissions may mention a specific product, but must be useful without the purchase of that product. Content must greatly overpower advertising. Submissions should be between 250 and 2000 words long.

Any article submitted to Linux Productivity Magazine must be licensed with the Open Publication License, which you can view at At your option you may elect the option to prohibit substantive modifications. However, in order to publish your article in Linux Productivity Magazine, you must decline the option to prohibit commercial use, because Linux Productivity Magazine is a commercial publication.

Obviously, you must be the copyright holder and must be legally able to so license the article. We do not currently pay for articles.

Troubleshooters.Com reserves the right to edit any submission for clarity or brevity, within the scope of the Open Publication License. If you elect to prohibit substantive modifications, we may elect to place editors notes outside of your material, or reject the submission, or send it back for modification. Any published article will include a two sentence description of the author, a hypertext link to his or her email, and a phone number if desired. Upon request, we will include a hypertext link, at the end of the magazine issue, to the author's website, providing that website meets the Troubleshooters.Com criteria for links and that the author's website first links to Troubleshooters.Com. Authors: please understand we can't place hyperlinks inside articles. If we did, only the first article would be read, and we can't place every article first.

Submissions should be emailed to Steve Litt's email address, with subject line Article Submission. The first paragraph of your message should read as follows (unless other arrangements are previously made in writing):

Copyright (c) 2003 by <your name>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, version  Draft v1.0, 8 June 1999 (Available at (wordwrapped for readability at The latest version is presently available at

Open Publication License Option A [ is | is not] elected, so this document [may | may not] be modified. Option B is not elected, so this material may be published for commercial purposes.

After that paragraph, write the title, text of the article, and a two sentence description of the author.

Why not Draft v1.0, 8 June 1999 OR LATER

The Open Publication License recommends using the word "or later" to describe the version of the license. That is unacceptable for Troubleshooting Professional Magazine because we do not know the provisions of that newer version, so it makes no sense to commit to it. We all hope later versions will be better, but there's always a chance that leadership will change. We cannot take the chance that the disclaimer of warranty will be dropped in a later version. 


All trademarks are the property of their respective owners. Troubleshooters.Com(R) is a registered trademark of Steve Litt.

URLs Mentioned in this Issue