Saturday, February 21, 2009

"Mini" Ubuntu 8.04 with Blackbox Window Manager

Intro
Last couple of weeks I have been playing with Ubuntu text based alternate installer CD. All that in quest for minimal Linux setup that would run nicely even on older PCs. Machine I was playing on one 700MHz P3 with 128MB, and 1.7GHz P4. I also played on Virtual Box under my regular Ubuntu setup.


Obtaining CD and CLI install
Go to www.ubuntu.com and download Ubuntu 8.04 LTS CD that is labeled as Alternate Installer, which is not a regular Live CD, but actually boots a text based installer.
Once you get the ISO file burn a CD with it and you are ready to start. Boot the PC with the alternate installer CD. You should get the screen below:
Select English, and then type F4 key to enter menu at the bottom where you can select installation type. Select to install a command-line system.

After that you should go through "regular" text based installer (based on Debian setup). Be careful when making option selections, especially when partitioning the hard disk. On this 700MHz P3, I selected Guided Partitioning for the entire disk (had no data to save from it).

You will be asked several questions such as time zone, username and password, etc. Wait for install to finish, then reboot and you should get a screen like this:

Login with you new username and password. Basically what you see is a minimal Ubuntu command line setup. If you type "free -m" command you should get around (only) 17M memory being used.

Update System
Issue following two commands:
sudo apt-get update
sudo apt-get upgrade


Adding CLI programs
Not very many people would find command-line interface (CLI) user friendly. Although, I have to say there are several very powerful CLI programs that may significantly improve the experience. At the top of my list is Midnight Commander (mc) file manager, that is fairly similar to famous two-pane Norton Commander from DOS era. If you are using this PC as network server for file storage having Samba and Midnight Commander could be sufficient. The thing about MC is that you can even browse and copy to/from network shares with its interface. From command-like tools I like Nano (nano) editor, and htop system info programs.

Issue following command to install these CLI prorgams:
sudo apt-get install htop mc nano

Adding X (GUI)
In order to run some useful GUI prorgams (for example Mozilla Firefox) you will need graphical user interface. By default Ubuntu comes with Gnome, KDE, or XFCE. There are several other window managers that may not be as nice as those three but are much lighter and not as memory and other resources hungry. In this example I will use Blackbox, but IceWM, JWM, Fluxbox, or Window Maker are worht looking at as well.

To install Xorg, Blackbox, and Firefox issue the following command:
sudo apt-get install xorg xterm menu blackbox firefox

To run X and Blackbox use "startx" in command line:

The picture below is Blackbox with selected "Blue" theme and running Htop. I like nice and neat dekstop look as well as the fact that only 27MB of RAM is being used at this point.

Graphical Login
If you want to have graphical login (such as default GDM) you can install gdm, or even lighter wdm or xdm.
In terminal issue the following command (in this example wdm):
sudo apt-install wdm
sudo /etc/init.d/wdm start


You can actually skip this step and keep logging into command-line interface, then starting graphical desktop with "startx".

Adding Sound
To enable sound in your applications issue the following:
sudo apt-get install alsa-base alsa-utils

Then run alsamixer to set master volume and enable mic:
alsamixer

Use left right keys to move from one setting to the next. Pressing M key would toggle on/off selections (green 00 means "enabled", MM means "disabled"). Make sure you selected right outputs and right mic input (important for programs such as Skype for phone over IP).

This can be done either through pure command line interface or inside terminal (xterm) in your Blackbox desktop.

Enable Printing
If you need to print from this machine you will need cupsys:
sudo apt-get cupsys cupsys-client

Once installed you can access cupsys settings via web interface. Open firefox and go to the following address:
http://localhost:631

In this case I selected to access remote printer on my other Ubuntu machine by changing "Manage Server" options (selected show printers shared by other systems).


Additional Repositories
You should edit /etc/apt/sources.list file:
  • add "multiverse universe" text to first two uncommented deb-src lines
  • uncomment "partner" repositories
  • definitively add Medibuntu repositories by adding the following to the end of the file:
    # Medibuntu
    deb http://packages.medibuntu.org/ hardy free non-free

    deb-src http://packages.medibuntu.org/ hardy free non-free

After this issue the following commands:
sudo apt-get update
sudo apt-get install medibuntu-keyring


Answer with yes when asked, and then issue
sudo apt-get update

Other Programs
Pretty much here you are building your system by adding things to it. Things to imrpve the Internet experience are for example Flash and Java plugins, core fonts, etc. In this case I also installed Skype and VLC video player:
sudo apt-get install adobe-flashplugin msttcorefonts openoffice.org skype sun-java6-plugin vlc

There are definitively other apps you may want to add. I found it useful to have a standard Ubuntu install on another machine so that I can browse the packages and look what might be needed on this light setup. Definitively an interesting approach to add only things you need, while keeping your system lean and mean.


Editing Menu entries
To be added (Skype example)

References
http://www.ubuntu.com
http://www.psychocats.net/ubuntu/minimalold
https://help.ubuntu.com/community/

No comments: