Living without Windows!by Jos Visser
Part 2a: Configuring the system
After having installed Linux, the next task awaits me: configuring the system. A bare-bones Linux installation leaves the system only half-usable and I now faced up to the task of turning the system into a useful tool. This means: configuring the X Window System, loading extra applications, creating a user for myself, configuring the network and so forth. I decided to perform only the most pressing (or fun) configuration right now, and cross other bridges like printing and dialing out when I come to them.
If there is one thing I am solidly against, it is people logging on as "root" to do day-to-day work. The awesome power of "root" can turn even a small mistake into a major system-wide disaster. I myself have rendered systems completely unusable with one mistyped "mv" command. Fortunately one of the beautiful things of UNIX is that performing day-to-day monitoring tasks can usually be done with normal user privileges. Only modifications to the system configuration need "root" powers. So I always logon as myself (with the login name "josv") and start working. If I need to change the system configuration I use "su" to become root temporarily, do whatever I have to do, and then leave the root subshell.
Creating a user in UNIX is a simple but somewhat elaborate task. As a real UNIX hacker I usually create users manually: editing the password file, changing the group file, creating the home directory, copy any profiles to that home directory and changing the ownership of the home directory and any files contained in there. Most UNIXes contain a somewhat friendlier method of creating users, usually in the form of an "adduser" (command line) program and/or an interactive (form-based) utility. SuSE Linux is no exception here, it contains both "adduser" and the SuSE interactive setup tool "YaST" contains user creating features as well. Partly out of laziness, partly out of curiosity, I decided to use YaST to create "josv". Well, nothing interesting here, the utility works as you'd expect and within one minute "josv" existed and could logon.
As you might remember from the prologue to this series, One of the important enabling factors for me to sink Windows NT and convert to Linux was the ApplixWare office suite for Linux. So, one of the first things I would do was install ApplixWare. I had installed ApplixWare once before on my desktop PC (Belana), and that had proved to be rather simple. The ApplixWare CD-ROM contains a script called "setup" that asks some questions and then copies the software to the local file system. The entire setup takes less than 15 minutes (from a local CD-ROM drive).
Since my laptop (Jadzia) does not contain a CD-ROM drive, I would have to perform the ApplixWare installation across the network. To achieve this I should setup Belana as an NFS server and mount the CD-ROM remotely from Jadzia. When installing Red Linux 5.1 on Belana I had selected the NFS server software but opted not to start it automatically at system boot time. This meant that I would now have to start the NFS server manually. A minimum NFS server system runs three daemons: the portmapper "portmap", the NFS server daemons "rpc.nfsd" and the NFS mount daemon "rpc.mountd". I had never configured an NFS server on Linux, but fortunately starting these manually did the trick. I mounted the ApplixWare CD-ROM as "/cdrom" and modified the NFS configuration file "/etc/exports" to signify that NFS clients are allowed to remotely mount "/cdrom". On other UNIX systems I always have to run "exportfs -a" after modifying "/etc/exports" and I did so now as well. Nobody complained so I reckoned that all had went well.
Next I would have to hook Jadzia to the LAN in order to access the Belana NFS server. Now each UNIX system seems to have its own method and set of configuration file to configure the network. I did not feel like researching this in great depth right now, so I used YaST to configure an IP address on my PCMCIA network adapter (network device "eth0"). I then remotely mounted Belana's CD-ROM ("mount 10.1.1.4:/cdrom /mnt") after which the CD-ROM could be accessed as if it was local through the "/mnt" directory.
To install ApplixWare I started "/mnt/setup" and answered some questions. I was not completely aware which pieces of ApplixWare I wanted so I selected everything, feeling confident that I could always remove unneeded stuff later. But hold on! What happened here? Instead of starting the file copy the setup program crashed with a segmentation fault! This was bad! How could I run ApplixWare if it did not install correctly? True to the art of computer science, I started the setup script again to see if it would go right now. Unfortunately, it barfed again, right after I had selected the international dictionaries (presumably for things like spell checking). Hmmm, I started the setup program again, and this time I opted not to install the international dictionaries. Things went swell this time. The file copy started and proceeded rather uneventful. It took longer then the promised fifteen minutes, but given that we installed across an NFS network link this was to be expected. As is common in UNIX, the setup program does not tell you where it is in the file copy. Just trust the system and the system prompt will return when it is done! Some people might get nervous here....As it later turned out, the abnormal end of the installation program was a known problem at Applix. Their web FAQ page mentions it and also contains a pointer to a new and improved install program that you have to download and run instead. To my shame, my friend Edwin Kremer even pointed me to a "Readme Before Installing" leaflet that is packaged with the ApplixWare box that mentions the problem! So much for not reading the documentation..... :-)Applixware was installed, but I could not run it right now because the X Window System was not yet configured.
If there is one thing for which I admire Windows 9x and Windows NT it is their almost flawless recognition and easy configuration of a PC's graphics card and monitor. To get the optimal results you have to tweak the settings a bit, but ordinary users are normally quite satisfied by what the Windows setup program configures for them.
How different things are in UNIX!
Although the X Window System (abbreviated to X in the rest of this article1 ) is conceptually far superior to Microsoft Windows, it is a bear to configure on PC's. The free implementation used by Linux and FreeBSD (XFree86) contains a configuration file "/etc/XF86Config" which configures X for a certain graphics card, monitor, mouse and keyboard. Amongst the more obscure things you have to specify here are the frequency characteristics of your monitor, its dotclock timings and its vertical refresh rate. In addition, for wildly different graphics card you might have to configure a different X server program. The default program "XSVGA" works for most video cards, but if you have an S3 chip set based graphics card you might have to use another. The content of the "/etc/XF86Config" is critical. You can easily physically damage your monitor by specifying wrong parameters here!
XFree86 contains a configuration program called "XF86Setup" which guides you interactively through the various X configuration settings. I've used it a lot with varying degrees of success. Although XF86Setup makes life a bit easier, it still requires an expert's eye. I have been especially unsuccesful configuring XFree86 for laptops. The laptops' LCD screens require completely different settings, ones that I have never been able to get right. An option is to run XFree86 in its default mode, in which it accesses your screen with the VGA defaults of 640x480 and 16 colours. There is not much useful you can do in that mode however.
In addition to XF86Setup, SuSE Linux has its own XFree86 configuration program called "sax". Fortunately I had another option at my disposal. Martijn, a collegue of mine, has the exact same type of laptop and is running Red Hat Linux on it. He is a real XFree86 guru. He always configures it manually and tinkers with the frequency settings until they are exactly right. He has configured most (if not all) of our XFree86 installations, with very good results indeed. Some of the PC's he configured are dual boot Linux/Windows and due to his manual optimisations graphics look better in Linux than they do in Windows! Since Martijn has the same laptop, there exists an optimal "/etc/XF86Config" for it! I phoned him and asked whether he could e-mail his configuration file to me, which he did immediately.
However, to download that configuration file I first had to be able to access the Internet!
Now I could have taken the easy road and dialed in to the Internet from Belana (running Windows 95), downloaded the X configuration file and transported it to Jadzia on a floppy. Not me though!
Some weeks before I had subscribed to the Internet service delivered by our local cable operator through the TV cable network. Chance had it that they had delivered the cable modem and fixed my cable connection just the other day. While I'm experimenting, why not configure and use the cable modem as well? There exist a number of different technologies for accessing the Internet through a TV cable. My operator has a scheme by which each subscriber gets a cable modem that functions like an ethernet bridge. On one end I connect the modem to a cable outlet using a straight 75 ohm cable. On the other end of the modem is a RJ45 connector that I can connect to a computer and an ethernet card using a normal (straight-through, no twist!) UTP cable. So technically, our entire neighbourhood is one ethernet LAN segment that is bridged across the cable modems to a central switch. When subscribing to the service I had chose a DIY (Do-It Yourself) setup so I had all the necessary cables and connectors delivered to my by the cable company in a neat package.
Right now, I unrolled a few yards of cable from my connection point (in the famous meter closet that is a compulsory part of each Dutch home) to the living room. I connected the cable modem to the TV cable, to the local power grid and to my PCMCIA ethernet connecter. Lights blinked, and voila, the cable modem was online! The cable company had allocated me a fixed IP address and had provided some other IP configuration details (like the default gateway) which I should use. I hadn't quite figured out where SuSE Linux stores IP configuration information, so I used YaST again to configure "eth0". I tried to "ping" my company's Internet server and was promptly answered! I was online!
After that, configuring X was a breeze. I logged on to our company server, downloaded the configuration file Martijn had sent me, copied it to "/etc/XF86Config", and started X (using the "startx" command). The screen turned grey and a familiar "X" cursor appeared. X worked (thank you Martijn)!Another of Martijn's XFree86 achievements: at home he has a TV VGA connector that allows him to use his TV as a PC monitor. According to the manufacturer of the TV VGA box, the TV only supports 640x480 output. However, by tricking the video card of his PC to emit completely different frequencies the TV now displays 800x600! The XFree86 parameters for this are also in the "/etc/XF86Config" Martijn sent be. I'd better not activate it on my laptop or run the risk of serious damage to the laptop's LCD screen!
The next point of order was to install a WWW browser. SuSE includes Netscape 4.0something on their CD-ROM's, but I knew that during the meanwhilst, Netscape had also released Communicator 4.5. Well, being online (through the cable modem), getting and installing a browser is a piece of cake. I used "ftp" to connect to one of Netscape's FTP servers and downloaded Communicator 4.5 for Linux. Unpacking and installing it requires only a little UNIX knowledge, so the browser was up and running within minutes of completing the download. By the way, downloading the browser did not go as quickly as I had expected (approximately 11Kb per second). The cable connection was not as fast as I had hoped. I should look into this.
I was now setup to try and run ApplixWare. From an "xterm" window I entered "/opt/applix/applix", and, ......... BARF! Segmentation fault! This is not good!
I started feeling a bit depressed. ApplixWare had installed and run without any problems under Red Hat Linux 5.1 (on Belana), and under SuSE Linux it had given me problems already and I had not even started using it. First the installation crashed, now running it gives me problems as well. Maybe I should redo everything from start and install Red Hat Linux instead of SuSE? But then again, I would install Red Hat Linux 5.2 and maybe that would give me problems as well. I'd better first look into this problem.
Since Communicator 4.5 was up and running, I connected to the Applix site and looked around a bit. After some searching, there it was: in the FAQ there was an entry that exactly described my problem! It seemed that ApplixWare distributed an older version of a shared library "libdl.so.1" that was also present in "/lib". Now if there is one thing I hate about Windows it is all those DLL version problems. Are we getting these in UNIX as well? Anyways, the FAQ entry gave me two solutions. One involved setting an environment variable before starting ApplixWare, the other would have me remove the older shared library from the Applix directory. The second solution seemed a bit drastic, so I opted for the first:
$ export LD_PRELOAD=/lib/libdl.so.1ApplixWare ran like a charm! Or at least, so it seemed.....
$ /opt/applix/applix &
One of the choices one faces when using X is which window manager to use. The window manager is that component of the X Windows System which is responsible for maintaining the desktop and for drawing window ornaments like borders. Any interaction with a window's decoration (like resizing, the minimise/maximise or the window menu) is being handled by the window manager as well. Different window managers give a completely different look and feel, ranging from the bare bones "twm" (Tom's Window Manager) to the wildly outrageous "Enlightenment". Over the years, scores of window managers have been written that either introduce a completely new look and feel, or mimic that of another operating system or graphical environment.
As far as window managers go I grew up with the Motif Window Manager ("mwm"), which used to be the native window manager on HP workstations. Later, HP developed "VUE", their Visual User Environment, which was "mwm" compatible but threw in an entire desktop environment complete with a dashboard (front panel) for starting applications. VUE was donated to the Open Software Foundation, which turned it into the Common Desktop Environment (CDE), which is now the leading window (and session) manager on HP-UX, AIX and Solaris.
Some years ago, an article appeared in the "X Window Journal" about a public domain window manager called "fwvm" (reportedly standing for "For Val Window Manager"). Back then I had retrieved and compiled "fwvm" for a Sun Sparc 1+ box (running SunOS 4.1.3) I happen to own. Fvwm is a Motif look-a-like but with an enormous amount of extensions. I liked "fvwm" better then the native SunOS 4 OpenLook Window Manager, and I had used it ever since on that box.
One "fvwm" extension I immediately liked was the possibility to run multiple desktops and be able to switch between them. Fvwm contains a small "Pager" utility (see picture) that allows you to see which windows you have open in which desktop and to immediately switch between them. Over the years, a second version of "fvwm" was released ("fvwm2"), and even "fvwm95", a version of "fvwm" with Windows 95 look and feel (including a task bar and a "Start" button).
Some weeks before a co-worker and I were discussing another major project going on: "KDE", the Kool Desktop Environment. I looked up their web site and it looked rather "kool". KDE promised to be a user friendly desktop, incorporating many fine ideas from CDE, the Motif and Windows 95, without directly emulating them. Apart from a window manager, KDE also delivers an development environment for writing X applications that integrate tightly with the KDE. To test this out I had installed KDE on Belana (when it was still running FreeBSD 2.2.7) and tried it out. It looked great and worked flawlessly. It even contained a bunch of handy utilities, for instance one to make a dial-up connection to the Internet. Naturally, I would run KDE on Jadzia as well.
SuSE distributes KDE on their CD-ROM's, and I had selected the KDE environment during the initial package selection and installation. Once I had X running, I could configure myself for KDE. The way that works in X is that you explicitly start the window manager you like in your "xinitrc" script. This script is executed by X when it starts, and it is the place to start any X related programs. There is a system wide "xinitrc" script (in "/usr/X11R6/lib/X11/xinit/xinitrc"), but each user can have his own version in "$HOME/.xinitrc". I created my own ".xinitrc" (by copying the system wide "xinitrc") and modified it to add "/opt/kde/bin" to the PATH and run "startkde". I started X, and presto, KDE started in all its glory! (KDE sample shown here is taken from http://kde.themes.org).
I played around a bit with KDE. Although it looks great, I felt a bit uneasy. It was, ....... how shall I put it, ..... a bit too user friendly for my taste. Furthermore, when I dragged windows around (using full drag, which moves the window content as I drag the cursor) it left behind a trail of squares in the window title background colour. Obviously a bug somewhere. This problem got worse when I ran "xearth", a small X utility that fills the root window (desktop background) with a picture of Earth as seen from the sun. Dragging a window clobbered up my "xearth" display severely, which was only put right after an "xearth" redraw. So, for all its advantages and great looks, I did not feel happy with KDE. The decision to remove KDE and run "fvwm2" instead was made in an instant.
To manage softeare installations, SuSE Linux uses the renowned Red Hat Package Manager (RPM), the nearest thing there is to a software packaging and distribution standard in Linux. For an old command line hacker like me, RPM is pretty easy to use. "rpm -a -q" tells me which packages are installed and "rpm -e <package_name>" removes a package from the system. KDE comes in various packages, whose names fortunately all start with "k". "rpm -a -q | grep ^k" then obviously barfs up a list of all packages whose names start with "k". I redirected this list to a temporary file ("/tmp/aap"), edited the list to remove any packages whose names also start with a "k" but that are not part of KDE, and turned the list into a shell script using the ":1,$s/^/rpm -e " vi command. Now, who said UNIX is cryptic? Executing the script with "sh /tmp/aap" removed all the packages. As it turned out, I had to run this script twice in order to remove the packages.Quiz question: Why?
If you know the answer, mail me at email@example.com. At the time of updating this page, the correct answer has already been sent to me by the following persons:
- Rene Hamberg, of ABN AMRO HQ in the Netherlands
- Hans Lunsing, DOS User Group, the Netherlans (Uhh?)
So now I needed to install "fvwm2". I was still sitting in the living room, with my cable modem hooked up, and I did not feel like walking two stairs to my study in order to load "fvwm2" from the SuSE CD-ROM. Fortunately, the nice folks from SuSE have made their setup and installation YaST quite generic. I had mentioned before that I had installed Jadzia across my local LAN from an FTP server. As it turns out, you can also update your system with packages from an FTP server, any FTP server! SuSE maintains an image of their complete Linux distribution at their FTP server at "ftp://ftp.suse.com/pub/SuSE-Linux/5.3". Using YaST one can point to this FTP source and update the system remotely across the Internet. Quite a cool feature, and one which I would use again in the coming days. Pointing to the "fvwm2" package and installing it turned out to be very easy (as I had expected :-).
After installing "fvwm2" I edited my private ".xinitrc" (in $HOME) to automatically start the fvwm2 window manager (which the default "xinitrc" does by itself) and the "xearth" background. After this, "startx" and there it was:
Well, enough done for one day, time to implement a bit of family life.......