Debian Wheezy and Ubuntu Oneiric with Fluxbox

Desktop – Fluxbox

This article has been originally published in italian (here).Feedbacks on content and translation are appreciated. It will also take me some time to replace screenshots and links with the english ones. Contributions are welcome. The original article must be considered the reference in case of updates.

So, I have managed to achieve the Ubuntu minimal install and Debian netinstall and it’s time now to set up these very basic penguins with a graphic interface and an essential group of applications. As I already wrote in the previous articles, my aim is to obtain a low resources system allowing me just to “surf the Web” (that’s so ’90s!), play audio/video files and little more.

For this purpose the chosen window manager is Fluxbox. Fluxbox is currently developed (last release: 1.3.2 – October 2011 at the time of writing) and is independent from GTK (Gnome) and QT (KDE) libraries. The separation from these toolkits is beneficial for required disk space, although many softwares (most common ones, unluckily, like Firefox or VLC) require these libraries as dependencies.

An accurate selection of software will be the toughest part of the “building”. My first impression is that more than few compromises will be required… I will mostly pick softwares available in official repositories, for sake of simplicity, thus avoiding external repos, packages from untrusted sites or compiling from source.

Unless explicitly stated, described procedures and commands are suitable both for Debian and Ubuntu. In addition I will keep the default settings for users in the two installations. For administration tasks (package management, write operations in system folders) in Debian the standard user (referred to as “user”) will have to acquire root privileges through “su root” while in Ubuntu he will use “sudo”. For example, to install a package in Debian I will execute:

su root
apt-get install <package-name>

while in Ubuntu only

sudo apt-get install <package-name>

Fluxbox is a versatile WM, easy to configure although no GUI tools are available for these tasks. A small number of plain text files in /home/user/.fluxbox folder allows to modify the environment:

  • init: some settings of WM and configuration files recalling
  • startup: applications automatically launched at boot
  • menu: structure of system menu
  • slitlist: order of applications docked to the “slit”
  • keys: keyboard shortcuts settings (e.g.: Alt + F4→ Close window)

The main reference for all aspects of Fluxbox is its wiki page, from which I took most of information needed for setup.

Note (20/03/2012): due to time needed for research, tests and reporting of results I decided to gradually update this article, each time I am able to add a little “piece” of knowledge. I will be therefore adding short notes and references, tidying up the mess little by little.

Apart from some slight differences in package availability for Debian and Ubuntu, choices for both will be the same.

Suggestions, as always, are appreciated.

Base system

Starting from minimal / netinstall, the bare minimum to be added are xorg e fluxbox packages.

apt-get install xorg fluxbox

executed as root in Debian, with “sudo” in Ubuntu. To exclude recommended packages add “–no-install-recommends” to the command line.

Sound, if needed, requires alsa-base and alsa-utils packages.

Tuning

Removing some of the installed packages, although there’s very little to shave off (use apt-get remove <package> –purge, add “sudo” in Ubuntu):

Debian

exim*, bsdmailx and vim*. The first two are tools for mail management, the latter is, well, vim (a famous *nix text editor). Deleting exim also removes one startup process (the exim daemon).

Ubuntu

If you are installing Ubuntu in a language other than English, the “-en” language packs can be removed: language-pack-en, language-pack-en-base, language-pack-gnome-en, language-pack-gnome-en-base. The language packs for the chosen language (I chose Italian) are already installed.

~~~

In addition I disabled some consoles (tty4, 5 and 6) that I am never using for login. Theoretically two consoles will be enough: one for an alternative or recovery login (for example as root) and one more (tty7) for X server (source).

Debian

As root modify file /etc/default/console-setup. The line

ACTIVE_CONSOLES="/dev/tty[1-6]"

will become, for example

ACTIVE_CONSOLES="/dev/tty[1-3]"

After that, edit /etc/inittab commenting lines related to consoles to disable:

#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

Ubuntu

In /etc/init edit (with root permissions) the tty*.conf files related to consoles to disable

sudo nano /etc/init/tty4.conf

commenting (#) the line “start on runlevel [23]”. An example of final result for tty4:

# tty4 - getty
#
# This service maintains a getty on tty4 from the point the system is
# started until it is shut down again.

#start on runlevel [23]
stop on runlevel [!23]

respawn
exec /sbin/getty -8 38400 tty4

Then rename file, adding “.disabled” to the extension

sudo mv tty4.conf tty4.conf.disabled

~~~

The two combined actions allow for 1-2 MB RAM saving (used) and a similar amount of cached RAM since the processes are inactive.

Login

I am not adding a login manager: the system will only have fluxbox as WM and root (Debian only) + standard user (from now on simply “user”) so this component seems not essential to me. Login will be text-based from console. There is a drawback anyway: X server (the graphical environment, that is) is not automatically started. Login managers, when present, modifies the startup files in order to start X.

Fixing this little annoyance is quite easy: just edit the /home/user/.profile file (Debian/Ubuntu) adding “startx” at the bottom (source: Debian Admin). The same source reports the steps to enable automatic login although I will not use this feature. I have executed the said modification only for user, while root will stay at the command line after login.

The light and dependency-free alternative might be lightdm, that is going to replace GDM and KDM for *ubuntu. The package is also in Debian repos. It works fine, but I don’t find it essential, therefore it can remain dormant in the repos. 😉

Currently computer can be shut down only with “halt” or equivalent command issued as root (Debian) or with “sudo” (Ubuntu). While a full DE is able to shutdown the computer (a login manager must be installed so that all users have such right), Fluxbox is however unable to. I am investigating to find a more “comfortable” solution…

File manager

To begin, I have added Midnight Commander (Home Page) that works fine despite its “old school” look.

apt-get install mc --no-install-recommends

A nice alternative is xfe (Home page XFE). To install it, adding the pdf viewer and localization files,

apt-get install xfe xpdf xfe-i18n --no-install-recommends

Browser

For the momento I have w3m, Midori and Chromium. Midori is quite light and functional but it requires libgtk2.0 and other dependent packages. To have a full-featured browser I have not yet found applications completely independent from GTK or QT. It might be worth to take the chance of such an addition to install other softwares depending on the same packages. I am also trying Firefox, a choice that can look not consistent with a light system. This is a reasonable point if we have little available RAM (<512 MB I would say it is an acceptable limit). Instead, counting on a little more RAM and a decent CPU (>1 GHz), all the resources “saved” by using Fluxbox can be redirected towards such RAM-greedy softwares.

Multimedia players

Testing: Audacious, VLC (depending on QT). Despite the dependencies, VLC is my favorite since it includes all the codecs.

Software management and updates

Aptitude can be easily used for every operation if we prefer a more “visual” tool than apt. Often apt-get itself straight from the command line is more than enough (to launch a system update, for instance). Installing synaptics or similar software is not advisable, due to the large group of dependent packages.

Timed updates can be also managed via a cron job. Two reference articles for cron on “The Geek Stuff”: (1) Syntax – (2) Examples

Ubuntu

Added repositories from Medibuntu, fixed an error for repo “extras” (key not valid), modified /etc/apt/sources.list excluding repos of source code (comment out lines starting with “deb-src”).

~~~

Customization (themes, icons, wallpaper, etc.)

Debian/Ubuntu

Added from standard repos “fbpager” (pager of virtual desktops). A “resource file” with pager settings must be created: default file is /home/user/.fluxbox/fbpager. Application can be executed automatically at boot adding the line “fbpager -w &” in file /home/user/.fluxbox/startup. Option “-w” makes the pager dock in the “slit”.

I have had some issues starting fbpager in Ubuntu before creating the resource file (although fbpager has some default values already set).

The suggested alternative in Fluxbox wiki is “Ipager”, that must be compiled from source; compiler requires a library (x11-dev-stuff) not available (obsolete?) and exits with error messages suggesting that the program itself it quite obsolete. That’s a pity, Ipager looked neat. So long, Ipager, and thanks for all the source.

Another nice little application listed in the wiki (not essential but works fine) is the network monitor “wmnd“. In /home/user/.fluxbox/startup the command line is already present: just uncomment and you’ve done the trick. A similar tool is also gkrellm, succesfully tested. Generally “dockapps” built for Windowmaker can be used docking them to the slit. These docks/monitors are not strictly necessary but they look like something a really “geek” setup must have and, lastly, need little resources to run. In such a basic window manager, lacking many configuration and “tweaking” tools, they can provide some handy shortcuts (volume setting, for example). Same story for the famous Conky, which seems quite popular… I am considering to give it a go, but it is not a priority at all.

Icons: fbdesk doesn’t want to work. I switched to idesk that, despite being older, worked from the first attempt.

Background/Wallpaper: fbsetbg (wallpaper) and fbsetroot (solid / gradient color) just do their job.

I am not going into further details on graphical customization, being it very personal. For sure I sugest to start with a full set of icons (gnome-hicolor or oxygen to begin) in order to assign each application the proper icon, even in root menu, and get a glimpse of the final appearance.

Making colors, background and icons “consistent” is a very time consuming task: I will be working on it very very slowly.

~~~

Results so far (26/03/2012)

Icons (idesk), tabbed window (XFE, terminal), pager. Theme: Meta

Ram: 48 MB (excluding open applications)

Disk space: 1.1 GB

Annunci

Informazioni su Man from Mars

https://extendedreality.wordpress.com/

Un Commento

  1. Pingback: Window managers -3- Fluxbox (ENG) | Extended Reality

Comments are disabled. Please comment and share on Twitter, G+, Facebook.

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: