2006-06-11

My Window Manager beat up your Window Manager

UNIX Weenies Are Fully of Versus

Despite our collective assumption to the contrary, we UNIX weenies are just as bad as the common computer user -- let alone common American voter -- when it comes to "versus." We not only have the left and right, but we often claim, conflictingly, to be the "moderate," "middle ground," "best solution" or -- probably the most assuming -- "best common practice" (BCP). And don't even get us started on footprint and memory usage -- some will argue light is better while the others will argue that the added usage is minimal, efficient and better integrated than when the other starts launching additional support.

Vi v. Emacs, let alone the pico/nano crowd, among others for text editors. Bourne shell v. C shell, let alone Bourne-compatible replacements like ksh, Bourne Again and "oh we fixed csh in tcsh" for command line interface (CLI) shells. And even though X-Window 11 (X11) is the de-facto physical/virutal system used in "open standard" aka "UNIX-like" systems, there are still the "shell" options for the widget toolkit and window manager (wm) when it comes to the graphical user interface (GUI).

Heck, today it's gotten far worse with full-up, networked desktop environments such as the K Desktop Environment (KDE) and the GNU Network Object Model Environment (GNOME) that go well beyond the basic window manager. But more on those in a moment.

Revisiting Sun XView and OpenLook

Had an engineer at a client hit me up with a good one on Saturday. The client is an engineering firm with some design departments running various Electronic Design Automation (EDA) tools (think of EDA as the "CAD" for the microelectronics/semiconductor design world) on largely Linux and Solaris. This engineer is still using an old Tatung UltraSPARC IIi system with Sun's XView toolkit and the Open Look [Virtual] Window Manager (ol[v]wm) as his X-Server Root, running various EDA X11 programs on newer systems. I remembered Sun actually open sourced it years ago, and I mentioned this fact to the engineer -- although I hadn't built it on Linux in over 5 years (basically the last time I also saw a Tatung USIIi in use).

Lo'n behold, a quick web search turned up a group that not only has a full XView built for Fedora-based systems, but one that addresses small changes such as newer UNIX98 pts terminal-only support. The US' National Institutes of Health (NIH) National Center for Research Resources (NCRR) maintains a project known as Phyisonet, including a set of open source Physiotools which include the XView library and associated clients and utilities (including Open Look). Clock, cmdtool, shelltool, textedit, etc..., as well as olwm and olvwm -- all there.

Although they lacked Linux/x86-64 binaries yet , and attempting to rebuild with GCC was throwing out all sorts of serious portability warnings, I was able to load the .i386.rpm packages on my Fedora Core 5 x86-64 system and run olvwm. I not only ran the included olvwm binary as my window manager under Xnest and Xvnc sessions, but I was able to edit my ~/.Xclients-default file and use olvwm as my window manager (dual-head no less). Adding /usr/openwin/bin to my PATH in ~/.bash_profile (modify for other shells as appropriate), no other changes were necessary at all (except for menu customization -- the default is rather the bare, included XView-based binaries).

Here's an example ~/.Xclients-default that should work on Fedora Core 2+ using the XView RPMs** available at the aforementioned site:
#!/bin/bash
exec /usr/openwin/bin/cmdtool
exec /usr/openwin/bin/olvwm
exit 1

**NOTE: the Fedora Core 3 RPMs should work for Red Hat Enterprise Linux 4

The only other, additional detail I want to point out is that the Linux termcap settings for cmdtool/shelltool is sun-cmd. So for those remotely logging into a Linux system via telnet, rsh or ssh in a cmdtool or shelltool terminal on an older Solaris box, you want to set your environment TERM=sun-cmd.

Putting a XFCE on GTK+

I'm a Steve Jobs' *step weenie. I like the NeXTstep-like graphical user environment and all modern systems based on some of its concepts/foundations. As much as I 've supported various UNIX and Linux distros in various environments, I've been a heavy Red Hat, now Fedora-based, user since the mid-'90s. So other than early stints with Feeble-based window managers (wm), I've been using various *step-type wm -- Afterstep, WindowMaker, Enlightenment, etc... through my adoption of GNOME 1.053, which still used Enlightenment as a wm. I had no interest in trying out the MS Windows-like K Desktop Environment (KDE) -- especially with various legal questions and other details about it early on.

I also had little difficulty moving to the Sawmill (originally known as Sawfish) wm in GNOME 1.2+. And being an engineer with the typical 4x the processor and memory that most desktop users had, I really just ignored the arguments about the bloat and memory footprint of GNOME. So disliking KDE and having no interest in running a lighter, wm-only desktop, I stuck with GNOME. It was a complete, network-oriented desktop system -- it did the job, it ran fine and smooth for me, I liked it -- 'nuff said.

Now if there is one thing I can't stand it's someone who constantly recommends a solution they have actually little exposure to -- let alone no exposure in a production, enterprise environment. Well, for those of you who really hate this pet peeve of mine, it's now time to call me a hypocrite. Yes, while I made no attempt to hide the fact that I had never really put any serious time to trying or supporting the XFCE Desktop Environment, I have constantly recommended it as an alternative to KDE and GNOME 2003+ -- especially after Red Hat made it a stock, supported desktop environment out-of-the-box in mid-2004 with Fedora Core 2+.

But after this week, I am a hypocrite no longer.

One thing I also did not reserve prior was my general dislike for the Metacity wm that became the default in GNOME 2.x. But prior to this past week, I made little attempt to change to something else out of laziness (too busy with other things than to geek with my Linux desktop -- I wouldn't use Linux as a desktop if it didn't save me time). I won't go into the history of the change, but it's safe to say it bothered me from changing from Sawmill -- whereas Enlightenment to Sawmill (fka Sawfish) wasn't much at all. Ever since then, I've felt GNOME has had a big "disconnect" in managing its options and settings for the common user, and Red Hat has done little to address it in its distributions (a few other distros haven't done much as well).

It was William A. Mahaffey III's posts to LEAP/LUNA over the last few weeks in his first experiences running Fedora Core 5, coming from SuSE Linux 9.x (a major rev back from SuSE Linux 10.x, which is more equivalent to Fedora Core 4+) that caused me to bring up the XFCE recommendation again. And after a few of William's follow-up questions, I just "threw the switch" to make it my default. After a little light reading of the on-line XFCE 4.2 manuals, plus about a half hour of playing around with various settings, I was sold on XFCE for the long-term!

I always knew XFCE was light on resources, while still being GTK+ compatible -- including themes/settings -- as well as offering a full GNOME compatibility module. The XFCE Window Manager (xfwm) was also compatible with KDE as a replacement for it's default K Window Manager (kwm) as well the most compatible wm for the ROX Filer + Session manager (xfwm is even recommended over IceWM for ROX, among others). I was quickly shocked by not only the fact that XFCE/xfwm/xffm (including xfdesktop and session) took off more than 200MB of virtual memory usage from GNOME/Metacity/Nautilus -- but even still using more than 100MB less when GNOME's Evolution collaboration client was running. And unlike GNOME, which always launched various components like the Nautilus file manager, XFCE was more piecemeal and the XFCE File Manager (xffm) was not launched until I needed it (even if xffm is not as capable as Nautilus -- I veru rarely took advantage of Nautilus' power and only needed "basic" file management).

From there, I quickly found several things were more ideal with xfwm versus Metacity. One was that xfwm (including xfdesktop and session) under XFCE were fully dual-head aware, wherease Metacity under GNOME was not. XFCE/xfwm avoided mapping many base keys (like F1 and F10), whereas GNOME did not. I preferred the feel over Metacity by far, and even Sawmill as far back as I could remember. The layout was ideal. All the settings in one, centralized place. And I even came to quickly like the separate panel and taskbar options far more than those under GNOME/Metacity that I was used to.
I'm sold on XFCE now, especially since all the Fontconfig, GTK+, subpixel smoothing and other settings are all there, just like they are under GNOME -- but the overall visual experience just looks better and is easier to control IMHO.

Yes, GConf and Bonobo launch when I run Evolution, but Nautilus (which I virtually never use -- not even for desktop folder/icon operations) does not. It's just faster -- without unnecessary transition effects other than the base look'n feel that just works well (and much faster). With all sorts of things launched (Acrobat Reader, Evolution, Firefox, LyX, StarOffice, etc...), I'm using barely more than 512MB of total, virtual memory. On my older Celeron-M 1.4GHz Toshiba notebook with only 512MB of memory, I'm well under 200MB total virtual with Firefox and LyX, just over 300MB with StarOffice 8 running, and any mail client like Thunderbird doesn't use much more beyond Firefox (I only run Evolution on my workstation -- because I'm using the larger collaboration features -- but it should run just fine).

It's safe to say that I'm fixed on XFCE4 now, although I need to check to see if XFCE4 is available for and/or as well integrated in Red Hat Enterprise Linux / CentOS 4+ as it is in Fedora Core/Extras 2+. RHEL has always been focused on GNOME and, to a lesser extent, KDE -- but XFCE should be supported as well like it has been on Fedora Core 2+.