Old-school desktop using a minimal Debian Jessie installation

June 19th 2017: Stretch - Debian 9 - does not install the ifconfig package as part of a default install. This will raise issues with network configuration just after installation. See Debian Wiki Wifi page for wifi.

July 5th 2015: This page has been updated since the release of Jessie as Debian stable, and to incorporate suggestions from a brief Hacker News discussion.

Summary

This page explains how to install a minimal Debian Jessie desktop using the IceWM window manager on top of Xorg. I wanted explore the kind of desktop that you can assemble without relying on components such as dbus or systemd. The result is viable for my day to day uses.

What I use the system for

This system is installed on a Thinkpad X60 laptop. I use the laptop for Web browsing using public wifi connections, and I need LibreOffice installed along with GIMP and Audacity. I use GPicView to view images and PCManFM as a file manager. I listen to mp3 tracks bought from Amazon with mocp or mpg123. I use the R statistics package and LaTeX. I need to be able to print documents, read and print PDF files and to scan images. I use Webmail for email on this laptop. I transfer files to and from other computers using USB thumb drives with VFAT formatting. I back up my user files using an NTFS formatted USB hard drive. I like to suspend to RAM between sessions to preserve window layouts and to reduce the time needed to start working on a task.

The stages needed to support my intended uses are...

Install the Debian Jessie base system

Set up a wifi connection to local router (temporary)

Replace systemd with sysvinit and alter the apt configuration (optional)

Install X and install and configure IceWM

Add command line applications such as locate and updatedb

Add graphical applications including a Web browser

Set up wpa_supplicant and wpa_gui to allow use of public wifi connections

Install pmount to mount usb drives

Install sudo and pm-utils to allow suspend to RAM and shutdown as user

Install the Debian Jessie base system

Lots of tutorials on the Web. If you have a wifi card that does not require non-free firmware or if you can make a wired connection to your router then you can use the netinstall image. Otherwise you can do a base install from CD-1 and sort out the wifi later.

Set up a wifi connection to local router (temporary)

You may need to install wpa_supplicant and other wifi software...

# apt-get install wireless-tools # apt-get install wpasupplicant

You may need to download a proprietary firmware package such as iwlwifi-firmware.deb for the Intel wifi cards used in older Thinkpads.

$ wget -c http://ftp.uk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_0.43_all.deb $ su # dpkg -i firmware-iwlwifi_0.43_all.deb # exit

As root edit the /etc/network/interfaces file so it looks like this...

# Home wifi auto wlan0 iface wlan0 inet dhcp wpa-ssid wifi-network-name wpa-psk wifi-password

...and reboot into your local fixed wifi. The steps to enable wifi roaming are detailed below once we have some software installed.

Replace systemd with sysvinit and alter the apt configuration (optional)

The systemd project has created a lot of discussion and some people would rather use sysvinit to load various components of the operating system as the system boots. Debian Jessie supports a choice of init systems and associated low level system control scripts. If you have no strong feelings about systemd, just ignore this section!

I followed the first two steps detailed on the without-systemd Wiki page...

# apt-get install sysvinit-core sysvinit sysvinit-utils

Reboot and...

# apt-get remove --purge --auto-remove systemd

I chose not to use the apt-pinning system to prevent any package with 'systemd' in the name being installed as a few applications have harmless libraries that talk to systemd as dependencies. I did create an apt-get configuration file in /etc/apt/apt.conf.d to set the default action to --no-install-recommends to save some typing as suggested by user icebraining on the HN discussion. As root, create the file 90norecommends (the number gives this preference priority over the other files in /etc/apt/apt.conf.d) and add the following lines...

# Puts --no-install-recommends into apt config as default # http://superuser.com/questions/615565/can-i-make-apt-get-always-use-no-install-recommends/615583 APT::Install-Recommends "0"; APT::Install-Suggests "0";

I add a comment line with the Web address of any references I used to find the command so I know the context in the future.

I use the following commands to keep an eye on what utility libraries are pulled in as dependencies when I install software...

$ dpkg -l *dbus* | grep ii $ dpkg -l *systemd* | grep ii

On a fully installed Old School Desktop, these commands produced the following output...

keith@moka:~$ dpkg -l *dbus* | grep ii ii libdbus-1-3:i386 1.8.18-0+deb8u1 i386 simple interprocess messaging system (library) ii libdbus-glib-1-2:i386 0.102-1 i386 simple interprocess messaging system (GLib-based shared library) ii libdbusmenu-glib4:i386 12.10.2-1 i386 library for passing menus over DBus ii libdbusmenu-gtk4:i386 12.10.2-1 i386 library for passing menus over DBus - GTK+ version ii libnet-dbus-perl 1.0.0-2+b2 i386 Perl extension for the DBus bindings ii libqt5dbus5:i386 5.3.2+dfsg-4+deb8u1 i386 Qt 5 D-Bus module keith@moka:~$ dpkg -l *systemd* | grep ii ii libsystemd0:i386 215-17+deb8u1 i386 systemd utility library

Enough plumbing, now we need some applications to run...

Install X and install and configure IceWM

I decided to use the venerable IceWM window manager as it comes with applications for displaying desktop wallpaper and is relatively easy to configure with plenty of information just a Web search away. The result looks sufficiently like Windows XP that casual users don't have to ask too many questions. Explaining my other favourite window manager might take a bit longer.

Install the X server and IceWM using the following command as root...

# apt-get install xorg icewm

I like to install all the X drivers for various supported video cards as I sometimes move my operating systems between computers. Some people like to install just the drivers they need for their specific hardware. A Web search will bring up many recipes. I don't bother with a desktop manager such as xdm or slim, I just use a .xinitrc file in the root of my home drive as follows...

keith@moka:~$ cat .xinitrc xrdb ~/.Xresources icewmbg & icewm

The .Xresources file is used to set preferences for xterm which I use as my terminal. I pinched this file from somewhere on the Web and tweaked a few settings...

keith@moka:~$ cat .Xresources ! Use a nice truetype font and size by default... xterm*faceName: DejaVu Sans Mono Book xterm*faceSize: 11 ! Every shell is a login shell by default (for inclusion of all necessary environment variables) xterm*loginshell: true ! I like a LOT of scrollback... xterm*savelines: 16384 ! double-click to select whole URLs :D xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48 ! DOS-box colours... xterm*foreground: rgb:a8/a8/a8 xterm*background: rgb:00/00/00 xterm*color0: rgb:00/00/00 xterm*color1: rgb:a8/00/00 xterm*color2: rgb:00/a8/00 xterm*color3: rgb:a8/54/00 xterm*color4: rgb:00/00/a8 xterm*color5: rgb:a8/00/a8 xterm*color6: rgb:00/a8/a8 xterm*color7: rgb:a8/a8/a8 xterm*color8: rgb:54/54/54 xterm*color9: rgb:fc/54/54 xterm*color10: rgb:54/fc/54 xterm*color11: rgb:fc/fc/54 xterm*color12: rgb:54/54/fc xterm*color13: rgb:fc/54/fc xterm*color14: rgb:54/fc/fc xterm*color15: rgb:fc/fc/fc ! right hand side scrollbar... xterm*rightScrollBar: true xterm*ScrollBar: true ! stop output to terminal from jumping down to bottom of scroll again xterm*scrollTtyOutput: false

A default install of IceWM is not pretty. The default themes look a little too much like Windows 95 by today's standards. I found the 'Shades of Grey' theme for IceWM which provides a nice flatish looking set of window borders. Installing a theme in IceWM is a case of unpacking the archive in the ~/.icewm/themes directory. The theme then becomes available in the Menu | Settings | Themes list.

The .icewm configuration folder contains a number of files that can be used to customise IceWM...

keith@moka:~$ ls .icewm menu preferences prefoverride theme themes toolbar winoptions

Below are the entries in these files that I have used. First the menu file...

keith@moka:~$ cat .icewm/menu #/usr/share/icewm/menu #keith@moka:~$ cat /usr/share/icewm/menu # This is an example for IceWM's menu definition file. # # Place your variants in /etc/icewm or in $HOME/.icewm # since modifications to this file will be discarded when you # (re)install icewm. # prog "Xterm" "xterm" xterm prog "Files" "/usr/share/icons/Tango/32x32/apps/file-manager.png" pcmanfm prog "Firefox" "/home/keith/firefox/browser/icons/mozicon128.png" /home/keith/firefox/firefox prog "Chrome" "/opt/google/chrome/product_logo_48.png" /opt/google/chrome/chrome prog "Office" "/usr/share/icons/gnome/128x128/apps/libreoffice-main.png" /usr/lib/libreoffice/program/soffice prog "Leafpad" "/usr/share/icons/hicolor/32x32/apps/leafpad.png" leafpad prog "Images" "/usr/share/icons/hicolor/48x48/apps/gpicview.png" gpicview prog Gimp gimp gimp prog Hugin /usr/share/pixmaps/hugin.png hugin prog Audacity /usr/share/icons/hicolor/48x48/apps/audacity.png audacity separator menuprog Gnome folder icewm-menu-gnome1 --list menuprog Gnome folder icewm-menu-gnome2 --list menuprog KDE folder icewm-menu-gnome --list /usr/share/applnk/ menufile Programs folder programs menufile Tool_bar folder toolbar

Then the preferences file...

keith@moka:~$ cat .icewm/preferences # Desktop background image DesktopBackgroundImage = "/home/keith/Pictures/tetris_wall_piet.png" # 1 for centre, 0 for tiling - had to put in prefoverrides # DesktopBackgroundCenter="0" # Workspaces on task bar WorkspaceNames=" 1 ", " 2 ", " 3 ", " 4 " # Clock stuff TaskBarShowClock = 1 TimeFormat="%H%M"

Some preferences have to be put in prefoverrides because of the theme clobbering the preferences...

keith@moka:~$ cat .icewm/prefoverride # overriding the shades of grey theme... DesktopBackgroundColor = "#300002" # 1 for centre, 0 for tiling DesktopBackgroundCenter="0"

I've slightly customised the toolbar (bottom panel)...

keith@moka:~$ cat .icewm/toolbar prog "XTerm" "xterm" xterm prog FTE fte fte prog IceCat "/home/keith/icecat/browser/icons/mozicon128.png" /home/keith/icecat/icecat prog Firefox "/home/keith/firefox/browser/icons/mozicon128.png" /home/keith/firefox/firefox prog Chrome "/opt/google/chrome/product_logo_48.png" /opt/google/chrome/chrome

And I have one entry in winoptions to get rid of the toolbar on LibreOffice...

keith@moka:~$ cat .icewm/winoptions # WM_CLASS(STRING) = "libreoffice" # Found using the xprops utility over a libreoffice window # You might need the WM_NAME as well as WM_CLASS depending on prog. # No title bar on LibreOffice libreoffice.dTitleBar: 0

One hidden gem in IceWM is the way you can navigate the menu by keystrokes - IceWM automatically assigns hotkeys to each entry in the menu. I can launch LibreOffice Impress by hitting mod4 | O | Alt-N | I.

Add command line applications such as locate and updatedb

I just installed some old friends...

# apt-get install powertop curl ssh updatedb locate rdesktop rsync htop alsa-base alsa-utils mpg123 lame moc R texlive gnuplot

Add graphical applications including a Web browser

I decided to run Firefox-ESR and Chrome as user from the binaries downloaded direct from mozilla and google. See the IceWM config files for how to create toolbar launchers and menu entries. Other graphical applications were installed as below...

# apt-get install mtpaint gimp scrot hugin audacity libreoffice pcmanfm geany leafpad tango-icon-theme myspell-en-GB

The tango-icon-theme package (or any other set of GTK2 icons you like) is needed for the graphical PCManFM file manager to display some icons. You also have to add a gtkrc-2.0 file with the following line in...

keith@moka:~$ cat .gtkrc-2.0 gtk-icon-theme-name = "Tango"

Music: as jackalope pointed out on the HN page, you can run mpg123 with the -C option and use keyboard shortcuts to control volume and pause...

$ cd Music $ mpg123 -C *.mp3

Then press h for a help screen within mpg123 like this...