Shell Person Help me keep the shell people alive.


Install Adobe Reader 9.4 in Debian Lenny

This is so easy it's hardly worth writing, but perhaps it will be of some value.  Here's how I installed Adobe Reader 9.4 in Debian Lenny (32 bit, x86).

  1. Download Adobe Reader 9.4 from  Alternatively, I think you could use this direct link with wget:
  2. Make the installation binary file executable:
    chmod +x AdbeRdr9.4-1_i486linux_enu.bin
  3. Start the installation (as su or sudo):
    sudo ./AdbeRdr9.4-1_i486linux_enu.bin
  4. Tell the installer where you want Reader installed.  It suggests /opt, which is a fine place to put it.
  5. You're done.  Open a PDF with:
    acroread filename.pdf


Identifying a Program’s Package in Debian

If you need to discover from which package a particular program came from, you can use this command (note that that is a capital "S"):

dpkg -S /usr/bin/file_i_am_curious_about

Here's an example:

james@tv:~$ dpkg -S /usr/bin/sensible-browser 
debianutils: /usr/bin/sensible-browser

This was necessary because I apparently deleted /usr/bin/sensible-browser (which is a script that determines which web browser should be the default). To replace it, I needed to know the original package name, which turned out to be debianutils. From there it was a simple matter to do:

sudo apt-get install --reinstall debianutils

Tagged as: , No Comments

Changing Debian’s sensible-editor

Debian uses the symlink /usr/bin/sensible-editor to point to the default text editor to use. This is controlled by the Debian Alternatives system, which will work automatically if you want it to. If, however, you want to change the auto-selected "sensible editor", you can do so with this command:

sudo update-alternatives --config editor

This will let you select one of your installed text editors from a list that will look something like this:

There are 5 alternatives which provide `editor'.

  Selection    Alternative
          1    /bin/ed
 +        2    /bin/nano
          3    /usr/bin/vim.tiny
          4    /usr/bin/mcedit-debian
*         5    /usr/bin/vim.basic

Press enter to keep the default[*], or type selection number: 

The "+" indicates the editor that would be selected if Debian had to choose, the "*" indicates your current choice.

Debian also maintains symlinks for sensible-browser and sensible-pager. You can change those easily as well:

sudo update-alternatives --config x-www-browser
sudo update-alternatives --config pager

If you find that your favorite program is not included in the list (most likely because it wasn't installed from a .deb package), you can add it like so:

sudo update-alternatives --install x-www-browser x-www-browser /usr/local/src/firefox/firefox 900

In English, this means install into the category x-www-browser, using the symlink named x-www-browser (found in /etc/alternatives), which points to the binary at /usr/local/src/firefox/firefox, and give it a numerical priority of 900. The priority determines which program Debian would select if set to auto. The largest number wins. This is how I added firefox into the list of potential sensible-browser selections.


Keyboard Hotkeys with Debian Lenny

Here are some notes on assigning functions to those special keys that come on so many keyboards. My Gateway SK-9920 has 12 of these hotkeys: volume up, down, and mute; play, stop, next, and last track; internet, help, mail, shopping cart (?), and back (presumably). I don't even know what the creators of this keyboard envisioned for the "shopping cart" key. Often these keys aren't recognized out-of-the-box in Windows, much less in Linux.

Like usual, there are almost certainly specific GNOME or KDE tools to accomplish this goal. Since I'm not running those, however, I'll stick to tools available in almost any X.Org environment (I happen to be using Ratpoison).


Install Google Chrome in Debian Lenny

This is simple.

First, get the package

Go to and select the 32-bit .deb for Debian/Ubuntu, then click "Accept and Install". This will download google-chrome-beta_current_i386.deb.

Optional: Prevent Chrome from adding the Google repository

If you want Chrome to keep itself up-to-date, don't do this step. However, if you just want to check Chrome out without changing too much, you might want to type the following command at the command line:


The Trouble with the Framebuffer

The original plan

I've tried for a long time to have a usable, console-only, desktop linux system.  By console-only, I mean running without (a.k.a. X).  I thought the key to this would be using the framebuffer.  Here's wikipedia's definition of the framebuffer, but in short it allows displaying graphics without running X.  When the framebuffer is enabled (some systems enable it by default), the first thing you notice is that the console font is smaller and nicer.  This alone makes the console considerably more usable, as the screen doesn't scroll nearly as much, letting you see more at once.  However, that's not all you can do with the framebuffer.  You can also view PDFs, images, and video (using mplayer) with the framebuffer, and even compile complex programs to use the framebuffer instead of X (i.e. gimp, using GTK-DFB).

The main thing that stood in the way of my console-only desktop system is a modern browser.  Now supposedly Firefox has been compiled for the framebuffer, as has uzbl.  However, I've had no luck with either, and I've sunk a fair amount of time into the task.  And links-g just doesn't cut it for me.


System Clock in a VirtualBox Debian Guest


By default, the system clock in Debian is set to UTC (Universal Time), and then adjusted to your local time, based on your time zone and daylight savings time.  This can be a problem if you are running a Debian VirtualBox guest machine, because VirtualBox sets the virtual machine's system clock to local time when the machine is started.  Because Debian expects the system clock to be UTC, the time zone adjustment results in the wrong local time (unless you live near Greenwich?).

You can fix the problem by editing the the file "/etc/default/rcS" (you'll need to be root).  Simply change the line "UTC=yes" to "UTC=no" and save the file.  After rebooting, Debian will treat the system clock as local time (which it is) instead of UTC, and won't adjust it for time zones.


Moving from Ubuntu to Debian


I get the impression that most people are migrating the other direction, from Debian to Ubuntu.  Or actually, from lots of other Linux distributions to Ubuntu (but Debian is significant because it's Ubuntu's parent distribution).

I have only good things to say about Ubuntu -- it's the distribution that allowed me to switch to Linux.  It's the first distribution to correctly configure my wireless card during installation (a task that both Windows XP and Vista fail at), which allowed me to get my questions answered online.  I started using Ubuntu Dapper Drake, and have since installed each new release.  I even convinced my Mom to switch to Ubuntu from Windows.  However, since installing Debian Unstable (Sid) a few months ago, I've come to prefer Debian.

Ubuntu is still a relatively young distribution, which, combined with the aggressive new release schedule (every six months), means that it's changing very quickly.  In general, I think this is a good thing.  Each release becomes increasingly user friendly.  But, it turns out that I don't really need a distribution that is that user friendly.  I'm a pretty quick learner, and I've gotten used to editing configuration text files instead of clicking buttons in an Options menu.  I think I became acclimated to how a Linux system works, and Ubuntu in particular, around the Fiesty Fawn release (maybe it was Gutsy Gibbon).  Ubuntu does a fair amount of hand-holding for inexperienced Linux users, but once I got enough experience, I found that I could work more quickly and more precisely without many of the GUI tools.  As I installed newer releases, I found myself disabling many of the new features.  As I was setting up and customizing the new Hardy Heron release, I noticed that the xorg.conf configuration file was no longer in use, and I no longer knew how to set things up the way I liked them.  (The xorg.conf file may be an odd thing to miss, as it is often the first truly confusing thing a new user comes across).  So, hoping to find something more like I was used to (Fiesty Fawn), I tried Debian.

Debian was exactly what I was looking for.  It had the same underlying system I learned on (specifically the APT system, which is awesome), but in less-shiny packaging.  I would describe it as a more transparent distribution than Ubuntu.  Debian doesn't hide as many of the available options (which is often the root of complexity) as Ubuntu, and consequently it's probably not as user-friendly.  While maybe daunting to a new user, it was refreshing for me.

I first installed Debian Stable (Etch) (stable sounds good, right? at least it sounds better than unstable).  Debian Stable is just that.  The trade-off, though, is that the software is not very cutting-edge.  Since I was already spoiled by always having new releases of Ubuntu, I knew I would have to upgrade to Unstable or go back to Ubuntu.  During the upgrade process, I discovered that Ubuntu's popularity is very nice when it comes to finding answers online.  It's not quite as easy to find the answer to a Debian question, but I survived.  Unstable seems to run software that's just as new as the new Ubuntu release, if not newer.  And, despite its name, I have had no problems at all with instability -- everything's worked great.  So now I have a system that works in similar ways as my old Ubuntu system, with newer or just-as-new software, but that preserves a bit more of the classic linux structure.  I'm pleased.

Another benefit of Debian is that it seems easier to have a minimalist installation.  I felt like Ubuntu was getting slower with each new release, perhaps because it increasingly attempted to be everything to everyone.  That definitely has its place, and I can see how it's helpful for Windows converts, but it's not for me.  Also, although I'll miss the excitement of a new Ubuntu release every six months, I might actually get a bit more done if I'm not installing a new release twice a year.

Tagged as: , , 5 Comments

Create a Debian Sid Virtual Machine with VMWare Tools


This post tries to describe how to create a Debian Sid (Unstable) virtual machine (including VMWare Tools) inside a Windows XP SP2 host.  I used, Debian Linux, and VMWare Server (all free).

This tutorial assumes that VMWare Server (free) is already installed.  VMWare player (free) can also be used, and it's a little easier in my opinion, but Server is what I was using.

First you need to have a blank virtual machine to install to.  EasyVMX ( is one of many ways to do this.  I chose EasyVMX 2.0.  Most of the settings will just depend on your preferences, but here are some of the options I chose.

  • I gave the VM 512 MB RAM. Debian will work fine with less, if you don't have it to spare.
  • I used a bridged network device (which gives the VM its own IP address).
  • I created two CD drives, one for actual CDs, the other for mounting .ISO images.
  • I gave the VM 6 GB hard drive space.  This seems to be plenty for me.  You could probably do 4.7 GB and get it to fit on a DVD.  Once I tried 3 GB and it didn't allow enough space to upgrade to Sid.

Download the zipped VM file from the download link.  Extract it into whatever directory you want.  I chose "c:virtual machines".

Log into VMWare Server using Firefox (or whatever browser).  There's a link in the Start Menu, or you can just go to https://[yourcomputername]:8333/ui/# (replace [yourcomputername] with your computer name).  The first time I tried logging in with Firefox, it wouldn't accept the self-signed certificate, so you have to create an exception.  Just follow the link at the bottom of the access restriction page to add the exception.  Once at the login screen, enter your Windows login name and password.

If you haven't already downloaded the Debian installation .ISO, you can get it from  -- I used the 'Stable' image.  Move the .ISO into the same directory as the virtual machine files you unzipped.

In the VMWare Server admin page, under the "Summary" tab, there's an "Add Datastore" link on the right-hand side.  Use this to specify the directory where you put the VM files (use the "Local Datastore" section).  Then select the "Virtual Machine" tab and click the "Add Virtual Machine to Inventory" link.  Select your virtual machine (the .VMX file) from the Datastore that you added earlier.  Once it's added, select the VM from the "Inventory" list on the left-hand side of the screen.

In the "Hardware" section, select the dropdown for CD/DVD Drive 2 and choose "Edit".  Use the following settings:

This is optional, but to install an easy link to your VM from the desktop, select "Generate Virtual Machine Shortcut" from the "Commands" section on the right-hand side, then click the link just above the "Enter" button on the dialogue that follows.  Click OK to allow Firefox to add the shortcut to your Desktop.

Power-on the VM (you can just press the play button at the top of the management console).  The VM will try to boot from the virtual hard drive, but since it's blank it won't find any boot instructions.  It will then check the virtual CD/DVD drive for bootable media, where it will find the Debian installation .ISO and boot from it.  Press "Enter" to start the installation.

Most of the installation options will vary according to your preference, but here were my choices:

I think the installation took me about 1 hour.  Now you have a functioning Debian Stable (Etch) virtual machine.  I'm not a huge fan of Debian Stable (well, I am a fan, but I prefer using Unstable for more up-to-date software).

To upgrade to Unstable (Sid), you'll need to change the APT repositories to use Sid instead of Etch.  From a terminal, login as root and open the sources.list file:


gedit /etc/apt/sources.list

Here is the sources.list file I used.  Save the file and close gedit.  Now to update the system from Stable to Unstable, you'll need to update the package lists and then do a dist-upgrade.  I'd do a regular upgrade afterwards, but I don't know if it's necessary.  I think you'll then have to do another dist-upgrade to catch a few packages that didn't get upgraded on the first pass.  Here are the commands (from that same root terminal):

apt-get update

apt-get dist-upgrade

apt-get upgrade

apt-get dist-upgrade

During the upgrade process it will ask you a few questions.  The default responses should work fine.  Once it's done upgrading, reboot the computer (this is important).  Now you have a functioning Debian Unstable virtual machine.  The only thing missing is VMWare Tools (just to make everything run more smoothly).  You'll need to install two packages before you can install VMWare Tools: "build-essential" and the kernel headers.  The "build-essential" package contains tools for compiling programs (like gcc - the GNU C# Compiler).  Without "build-essential", you will get the following error:

Setup is unable to find the "gcc" program on your machine.  Please make sure it is installed.  Do you want to specify the location of this program by hand?

The kernel headers are used for compiling the VMWare Tools modules.  Without the headers, you will get the following message:

What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]

The path "/usr/src/linux/include" is not an existing directory.

Here are the commands:

apt-get install build-essential

apt-get install linux-headers-`uname -r`

Note that those are back-ticks surrounding the phrase "uname -r" -- they are not single quotes.  `uname -r` specifies your current kernel version.  When I installed VMWare Tools, my system wanted to use gcc-4.3 as the C# Compiler -- unfortunately, the VMWare Tools installation script wanted to use gcc-4.1  This is the error it gave me:

Your kernel was built with "gcc" version "4.1.3", while you are trying to use "/usr/bin/gcc" version "4.3.3". This configuration is not recommended and VMware Tools may crash if you'll continue. Please try to use exactly same compiler as one used for building your kernel. Do you want to go with compiler "/usr/bin/gcc" version "4.3.3" anyway?

To fix this, in a root terminal, you'll need to tell Debian to use the older version.  It should already be installed, but if not you can "apt-get install gcc-4.1".

cd /usr/bin

cp gcc gcc.backup

rm gcc

ln -s gcc-4.1 gcc

If you want to reverse this in the future, you can:

cd /usr/bin

rm gcc

cp gcc.backup gcc

Once those packages are installed and the correct C# compiler is being used, you'll need to go back to the VMWare Server management console in Firefox on the host OS.  On the right-hand side, in the "Status" section, click on the link "Install VMWare Tools...".  This will mount a virtual CD in the Debian guest VM.  In my case it mounted it at /media/cdrom1.  Back in the Debian VM, in a root terminal, type the following commands:

cd /tmp

tar zxpf /media/cdrom1/VMWareTools-2.0.0-1222956.tar.gz

cd vmware-tools-distrib/


Note that the specific version number may be different on your system.  This will start the VMWare Tools installation script.  The installation script will finish and then launch the configuration script.  The configuration script will compile the necessary modules.  I used the default settings throughout, except I set my display size to [12] (1024x768).  The script will tell you that it "failed" when "Mounting HGFS Shares".  This is normal behavior and it will also happen at startup.  As far as I know, the HGFS Shares (a method of sharing files between host and guest systems) only work with VMWare Workstation (not free) and perhaps other enterprise (not free) releases.  Reboot the system.  You now should have a working Debian Sid virtual machine with VMWare Tools installed.

Note - If you want to share files between the host and guest, the easiest way I know is to share a folder in Windows XP and then open it in the Debian guest from "Network" in the "Places" menu.  While doing this I did encounter an odd Windows behavior (read: bug) that prevented sharing.  When I tried to access the share from the Windows machine, I got the following error:

serversharename is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

Not enough server storage is available to process this command.

I found the solution at -- in short, I had to add a DWORD registry key named "IRPStackSize" to "HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services -> Lanmanserver -> Parameters " and set it to "25".

UPDATE: I tried out VirtualBox (free) from Sun and vastly prefer it.  In my experience it's considerably faster and easier to use.

Tagged as: , , 1 Comment