Abstract

Tonight we are going to discuss how to customize a Linux distribution for your likes and needs.

What do I mean by customize a Linux distribution?

Here you are, you have just finished installing a new distribution of Linux on your laptop. You have created a login for yourself, and it connects to the internet. So you ask yourself what am I going to do now.

Well you could simply start using it, to browse the web, read email, and write letters. But I find myself wanting to Tailor the system to suit my likes and dislikes better.

Customization can take many forms. You can customize the desktop of course, change the background, the color of the windows, or the screen saver. These things you can do in most modern operating systems. But that is only the tip of the iceberg so to speak. Here is a list of some of the things you could customize, but I should remind you, in Linux you can change EVERYTHING.

  • Installed Applications is one of the areas many people forget. If you don’t want to use Mozilla email, there are alternatives.

  • Window Manager is a major change available in Linux, but not in other non-unix operating systems. Don’t like KDE, try Gnome, or XFCE, or ICE or something else.

  • Graphical or CLI interface is an option. You do not have to start the graphical interface if you don’t want it. This can be useful for servers, or even laptops.

  • Some Hardware features can be modified or customized for you. For example, I often swap the caps-lock and the left control keys.

  • The command line can be tuned to do special operations simply. Setting the environment is only the beginning of what you can modify.

So given this list of potential customizations, where to begin? As with many other things in Linux, the answer starts with what do you want. I am going to go through this list and detail how to accomplish the changes.

Customizing your Applications

Applications are key to our use of the computer. Think for a minute how would you use the computer without the applications? These programs pretty much define how we use a computer. Whether we are referring to an email program, or a web browser, or an editor, the specific applications define how we do things.

So like most other things, people have preferences for their applications. Of course, some people don’t even realize they have a choice of applications. They just accept that their computer come with one specific email program and that is what they use. But in the world of computers there are choices. Where Linux is unique is that it allows you to install and use a number of email programs for free. This can be a plus or a curse depending on your willingness to experiment. For example lets look at the number of email programs available on Linux.

Email Applications

I am not going to pretend that I know of all the email programs available, I am just making a comparison of the major ones. One issue that comes up immediately is, do you want a graphical email program or a command line one? This is not necessarily an either or choice. You can have and use both types, in different places.

First lets do a brief over view of a few of the graphical email programs available on Linux.

Mozilla Email

Mozilla Download

Thunderbird

Thunderbird Home

Evolution

Evolution Info

Kmail

Kmail Home

OK now that we have discussed graphical email programs, what about command line email programs. Here is a list of some of them.

Mutt

Mutt Home

Pine

Pine Home

Finally I found an article which might help you decide which email program is right for you called Linux Email Decisions. Additionally, I located a good list of Email clients at Sourceforge Loads of Linux Links

Web Browsers

In today’s modern use of computers the Web browser is probably the most used application. This can be seen by the number of web browsers as well as the quality. Aside from the common web browsers on Linux, Mozilla, and Firefox, there are a number of applications which use a web browser for other operations.

Because we have become so comfortable with graphical approaches to things, file browsing is now commonly done with a web browser. In the Gnome desktop, the file browser is Nautilas, or in the KDE desktop, it is Konqueror

Have you noticed how much like a web browser, the file browser is? When I use Nautilas to view files on my laptop, and I double click on an HTML file it uses the application Epiphany to open the file. Yes another web browser.

Getting bored of the browser name dropping yet? Lets look at some screen shots of browsers.

Firefox

Firefox Home

Mozilla

Mozilla Home

Konqueror

Konqueror Home

Epiphany

Epiphany Home

Opera

Opera Home

So we have seen the graphical web browsers, what about command line web browsers? Yes Linux has some non-graphical web browsers, which can be useful sometimes. For example the text web browser “lynx” has a dump option. Some times when I get an email which is all links and a little text I can take the HTML code and pass it through lynx to get a readable text rendition of the message. The command looks like lynx -dump file.html | less.

Lynx

Lynx Home

w3m

W3M Home

Editors

Now I don’t know about you, but the program that I find the most useful is an editor. To start with there are what I will call classes of editors. Lets define them this way.

  • Desktop Editors are what most people think of as an editor. These are programs like, Word, Ami Pro, Abiword, OpenOffice, etc.

  • Text editors are commonly used for simple tasks like jotting down a note, or modifying a shell script. Programs of this class would be Notepad, Editpad, Pico, Nano, Gedit, Kate, etc.

  • Programmer Editors are the powerful big brothers to he Text editors. These are the editors created for the heavy duty editing tasks. In this class I would put Emacs, Vim, Slick Edit, Boxer, etc.

  • Specialized Editors are like a subset of the programmer editors. These are editors tuned for a specific type of file. In this class I would put TexMacs, BlueFish, etc.

Since we are being rather visual tonight lets see some screen shots of these editors. Withing each class of editor you will find the most differentiation of applications. Editors is probably one of the widest categories of applications on a computer.

Word

Word Home

WordPerfect

WordPerfect Home

AbiWord

AbiSuite Home

OpenOffice

OpenOffice Home

Notepad

Editpad Lite

Editpad Lite Home

Pico

Pine Home the pico editor is part of the pine program.

Nano

Nano Home

Gedit

Gedit Home

Kate

Kate Home

Emacs

GNU Emacs Home You can learn more about Emacs from a talk I gave before Emacs, the Swiss army knife of Linux

Vim

Vim Home

Slick Edit

Slick Edit Home

Boxer

Boxer Home

TeXmacs

Gnu TeXmacs Home

BlueFish

Bluefish Home

Now to be honest, this hardly scratches the surface of application choices. But rather than trying to be exhaustive, this is more of a demonstration of what is available in the Linux world.

Window Managers

When most people think of Linux they picture the window manager. That is mostly because they come from a Windows world where the window manager defines the look of the operating system. In the Linux world, the window manager is replaceable since it is not hard coded into the operating system. This is a level of flexibility most computers do not appreciate.

Lets take a couple minutes to look at what the windows manager does so you can understand the choices. Now if any of you have played with Themes, you have an idea what can change in a window manager visually. But the window manager controls most every aspect of the look and feel of the interface.

No I am not going to go into what the X-windows system does, because we would be here until sun up. Let me instead point you to two HOWTOS which explain it in detain. The first is X Window System Architecture Overview HOWTO which will explain the details about the system. But the one which is probably more interesting to you would be The X Window User HOWTO which is aimed more at how to configure and use X-windows.

You will notice, I have been discussing X-windows, not the window managers. That is because Linux is a layered approach. The operating system sits on the hardware, X-windows sits on the operating system, and the window manager sits on X-windows. Finally the application sit on top of the window managers. I found this article The Architecture of X-Window, which has some interesting drawings about X-windows.

OK now that we understand what they can do, lets have a look at some of the better know window managers.

KDE

KDE Home

Gnome

Gnome Home

FVWM

FVWM Home

ICE

ICE Home

Fluxbox

Fluxbox Home

Blackbox

Blackbox Home

XFCE

XFCE Home

And for those of you who would like to look at even more, try Window Managers for X

GUI or CLI

Now I know that most of you use a GUI (Graphical User Interface) for most of your interactions with a computer. Correct? But have you thought about the advantages of using a CLI (Command Line Interface)?

I use a CLI interface on my server at home so that the bulk of the processing power can be used for the applications not to run the graphics, when I am not using the system. To give you an example of the difference. On my server I ran the command ps -ef | wc -l to count the number of active processes running in both text mode and in graphics mode. The difference was 134 for text mode and 247 for graphics mode. The trick is that I boot the computer into Text mode by default. Then when I want to use the graphics I issue the command startx which starts the GUI interface. When I am done, I exit the GUI and it returns to text mode.

For those of you who are interested in understanding the trade offs, I recommend the article: GUI vs. CLI: A Qualitative Comparison a well reasoned paper discussing this issue. Also for those who would like to read an old, but poignant article I recommend In the Beginning was the Command Line, a funny and well written comment on the GUI interface from a writer.

Hardware Modifications

Hardware modification by an operating system is not usually considered. But there are some customizations which are handled by the OS that are tunable to make your life easier. Here are a few of my favorites.

Disk Drives

Most of the time people only use a single hard disk on a computer, But thanks to disk partitioning, you can divide that single disk into many sections known as partitions. Not that long ago we discussed dividing your Linux installation into at least 5 partitions, / (root), /boot (kernel load), /usr (program files), /home (user data), and swap (used by the OS for memory management). So we can see how creating additional partitions can allow us to customize the system.

Separate partitions allow us to prevent one part of the system from stepping on another. The common log files, config files and working files will live in /, and since it is a separate partition, if it ever filled up, it would not overwrite the data in your home directory.

Since the partitions are associated with the root partition using the mount command you can make space in the middle of your installation without a reinstall. Lets assume that the directory /usr/local have grown too big and are threatening to overload the /usr partition. If you had a spare hard disk, or extra space on your current hard disk, you could do the following steps to free up some space.

  • Create a new partition (fdisk /dev/hdb). Make a file system on it, (mkex2fs -j /dev/hdb1). Mount it to a temp location (mount -v -t ext3 /dev/hdb1 /mnt/temp)

  • Copy the data from /usr/local to the new partition, (cd /usr/local ; find . -print | cpio -pv /mnt/temp)

  • Remove the data from the old location, (cd /usr/local ; rm -fr *). Remount the new partition to the old location, (umount -v /dev/hdb1 ; mount -v -t ext3 /dev/hdb1 /usr/local)

  • Make the new mount point part of the system permanently, (vi fstab # Add a new entry to mount /dev/hdb1 to /usr/local )

You have now created more space in the /usr partition by scarfing a new partition into it.

Mount a remote file system

I have spoken before about how I have music on my server. I have a partition mounted at /mnt/emusic where I keep my downloaded music. I have then setup NFS (Network File Share) on the server and assigned /mnt/emusic to it.

On my son’s Linux box I then create a directory /mnt/emusic. When he boots up the system, I auto-mount the /mnt/emusic partition from my server on his computer. He can now play music on his computer which lives on the server. (mount -v -t nfs server:/mnt/emusic /mnt/emusic)

Modify the Keyboard

Since I use a keyboard a lot, I like the control key to be to the left of the A key. But on most of today’s keyboards that is the Caps Lock key. Well I can go to the directory /usr/share/keymaps/i386/qwerty and copy the file us.map.gz to jfm.map.gz. I then gunzip the file, and edit it.

What I do is find the line keycode 29 = Control and change it to keycode 29 = Caps_Lock, then I find the line keycode 58 = Caps_Lock and change it to keycode 58 = Control. I then save and gzip the file. Finally I copy the file to the location /etc/console-tools/boottime.kmap.gz under Debian for it to take effect.

Now if you don’t want to remap the Caps_Lock key, think about what you could do with the Windows keys on many keyboards.

Fine tuning the Command line

The command line, in most Linux system, means the Bash shell prompt. This shell is quite flexible in the number of elements you can customize. I will outline just a couple

The most common modification is to change the prompt. In Linux this is controlled by the environment variable PS1. To see your current prompt definition do echo $PS1 This will probably give you something like “PS1=’\u@\h:\w\%”. The number of variables can be seen in the command man bash or in the HOWTO Bash Prompt HOWTO.

Another useful element in the shell is the use of Aliases. I find that I like to customize the commands I use for directory listing, which I do using the following two aliases: alias =‘/bin/ls -axF –color=auto’ and alias ll=‘/bin/ls -laib –color=auto’. What these do is lc gives me a multi-column directory listing, including the hidden files. It marks the files a executable or directories using the * or the / respectively. And finally it color codes the files depending on their type. The ll command gives me a long listing with color coding for file types, and includes the hidden files. Additionally it show me hidden characters so I can see a blank space or control character in a name.

For those of you interested in learning more about the Bash shell, there is the HOWTO: BASH Programming - Introduction HOW-TO as well as books from OReilly, which lists 17 books concerning Bash. Or for a little fun have a look at bash Tricks From the Developers of the O’Reilly Network.


Written by John F. Moore

Last Revised: Tue Nov 1 18:14:05 EDT 2016

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
HTML5 Powered with CSS3 / Styling, and Semantics