...making Linux just a little more fun!

<-- 2c Tips | TAG Index | 1 | 2 | 3 | 4 | Knowledge Base | News Bytes -->

The Answer Gang

By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You!

(?) Which Window Manager?


From Jimmy O'Regan

Answered By: Jason Creighton, Thomas Adam, Ben Okopnik, Kapil Hari Paranjape

Perl Linux. A distribution where everything, except the kernel and Perl, is written in Perl.


(!) [Jason] LUFS (Linux Userspace File Systems):
It's designed to allow you to write filesystem drivers for linux in userspace. (You'd never guess it from the name. :-) )
Bindings for python:
I don't know of there's any for Perl, but I wouldn't be surprised.
(!) [Ben] Wow. Weird. I'm very familiar with the Perl Power Tools (essentially, the GNU toolkit for Unix reimplemented in Perl) - in fact, I recommend them to my students as a bunch of well-written code to study; I also think it's a really good idea of the same kind as having a statically-compiled shell. An entire Perl-based distro, though? Is there a point to straining a Camel [1] through the eye of a needle? I mean, cool that it can be done... but you end up with pureed camel, and who wants that? Messy.
[1] Contrary to popular belief, the mascot's name is not "OCaml". Sheesh.
(!) [Thomas] Depends how you say it. :) Usually with perl, it is with heavy surprise with lots of skepticism thrown in for good measure. :D
(!) [Ben] Well, the way people seems to usually "learn" Perl (i.e., by looking at somebody's horrible code, figuring "I can do that!", and proceeding to do exactly that), I'd think it's more like "prayerfully, with a quiver in the voice and tears running down the cheeks". People who learn it the right way - i.e., by reading and following the documentation and learning from good examples (e.g., PPT, NMS (http://nms-cgi.sourceforge.net), etc.) - say it with a rising inflection, sorta singing the last part, and usually follow it up with a whistle.
"O Caaaa-mel! [whistle] Heeere, Camel-camel-camel!"
It always comes running and wagging its tail when properly invoked. Beware the fleas, though. :)

Snipping some light-heartedness, somehow the topic changed to window managers. -- Thomas Adam
(!) [Thomas] Don't use KDE, then.
(!) [Ben] It's certainly one of the major reasons that I don't. My current machine has plenty of disk, memory, and CPU for KDE to gratuitously throw in the trash (oops - was that my 'out-loud' voice? Darn), but I refuse to put up with the Micr0s0ft-style blinkenlights philosophy of the interface ("Fear not, small human creature; KDE has decided on everything you'll want and need, and will provide it for you.").
(!) [Thomas] It does have "wizards" or the equivalent so that even the complete clueless can give it a go.
(!) [Ben] What, to handle the configuration end? Nothing special there; IceWM, e.g., has "icepref" that does much the same thing. I'm very much a fan of "vi" as a configuration wizard, myself, but others may differ.
I dislike the standard RedHat install for the same reasons (it's a minor dislike, but that's the reason for it.)
(!) [Thomas] sigh. I agree. I liked it more when RH4 and the subsequent RH5 release used Fvwm. They now use Gnome, which is arguably better IMO, than KDE. Qt is horrible.
(!) [Ben] IceWM is small, fast, and lacks nothing in features that I want from a WM. From Thomas' previous rantings :), I gather that FVWM is much the same sort of thing. It's like having a spoon that you bought for a quarter; [ ... ]
(!) [Thomas] Kind of. But there are a lot of things Fvwm does that IceWM does not, and while I am not going to outline the individual merits of each, you cannot, for instance, in IceWM do event actions. And while I have used IceWm, it just doesn't have..., well, it lacks something. :)
(!) [Ben] EPID. That's why I didn't say that KDE was evil and should be wiped off the face, etc. - some people love it. And FVWM doesn't have a lot of things that IceWM has (i.e., a decent taskbar; I could never stand that huge thing they use that takes up so much real estate.)
(!) [Thomas] Actually, Fvwm provides a taskbar (FvwmTaskBar) that takes up no more space than any "normal" task bar, plus it can autohide. You can also configure FvwmIconMan to act as a taskbar.
Apart from the inherent motif theme [1] that Fvwm takes on by default ( \o/ ), perhaps the other major attraction to it for me was the fact that you can define events based on actions. AFAICT this is an idiom unique to Fvwm, and no other WM/desktop environment (The module that provides this is known as 'FvwmEvent').
Perhaps another addition that you might appreciate Ben is the fact that you can script commands to Fvwm, using the underlying $SHELL. There is even a full set of perl-bindings[2] [3]. The power that this gives, to allow complex things to be done simply, is quite amazing. Not only that but Fvwm has its own internal widget set (FvwmScript) so that you can define all kinds of things.
(!) [Ben] Perhaps I'm just not visualizing a scenario where this would be useful, but I can't really see the advantage. What WM functions would you want to script, and why?
(!) [Thomas] Lots of reasons that are situation dependent. One is to do things like compute the distance between windows and slide a window in a given direction to sit beside the window. Another is to take a snapshot of the window on iconify, and set the icon to the picture of the window.
For example, I have a function in Fvwm that displays the total number of windows that I have open, on the title for my pager. By "open", I mean those windows that are not iconified. You can see it here [4]. You probably couldn't do that easily in anyother WM. Whether or not you would want to, is another question entirely. :)
(!) [Ben] Yes. *That*' is the question I'm asking. If I really needed to, I'd parse the output of "xwininfo -root -tree" and get the information, but I don't see how it would benefit me in either case.
(!) [Thomas] /me comes down from his high horse.
But it really does just depend. I ask of nothing visual from my WM in terms of eye candy. Ick. The only thing I permit myself is xteddy. After all, a WM is just there to provide a means of being able to launch lots of rxvts. :)
Oh, I don't know. That one example of FVWM eyecandy you showed before was very impressive - and I like the idea of having a pretty desktop, although to me that means a nice background plus some good looking icons, not dancing rabbits that (again) waste my resources.
Don't forget the GUIs, now. I use mine to launch "gmplayer" and Mozilla quite regularly. :)
No matter how you improve the thing, it's still going to be a spoon, and the functionality of it will never be worth much more than that price.
(!) [Thomas] That's where I diagree. The environment you work in is what you make it. And since Fvwm is free, the amount of things I can do with it, and the extendability of it is immense. I joke not. There are over 1000 styles in all to Fvwm. You can configure the minutest.
(!) [Ben] Yeah, you could theoretically make it out of gold and attach it to a gadget that will feed the baby, wipe up the spills, and go to the store to buy the products to replace the ones it used up... but it's neither a spoon any longer, nor is it nearly as useful as a spoon is if you move away from the home/baby/store metaphor.
(!) [Thomas] Given that all of this is contained within Fvwm, the need to add on any features are irrelevant. It's ironic to think that despite all I have said, given my needs, I could quite easily go back to using TWM again....
  1. No, despite what you might have read. Motif is not dying. It's very much alive, and I for one am grateful that it is.
  2. http://fvwm.org/documentation/manpages/unstable/FvwmPerl.php
  3. Rumours that I'm working on FvwmRuby, are very true indeed.
  4. http://linuxmafia.com/~n6tadam/benexample.png
(!) [Ben] Have you seen the IceWM theme packs lately? I wouldn't be surprised if there were a thousand or more of them available. I generally take one, hack it a little, and use it for six months or so, and I don't see myself running out anytime soon.
(!) [Kapil] Since we're onto desktop/window manager wars ... :-)
My latest "standard" for how good such a thingy is has been:
  1. Can it emulate "ratpoison"?
  2. Can it improve on "ratpoison"?
  3. Can it do the above without bringing a low-end machine to a screeching, grinding, *thrashing* halt?
It turns out that (in combination with GNU "screen") FVWM, ICEWM and even (surprise) Gnome2+Metacity can do this. I haven't tried with KDE.
Some notes of explanation:
  1. in combination with "screen" what this really means is that you should be able to maximize a window *without* title bars, menubars, borders, handles and all that fluff. This is what you *really* need when you are doing a deep hack or writing a paper.
  2. means that you should be able to "switch" in and out of this ratpoison mode with some key combination (don't touch that mouse yet!). In the "real" GUI mode you should be able to use GIMP (which is ratpoison disabled or vice versa) and other such programs that require a mouse and/or graphical interface and non-mazimized windows.
  3. is reasonably clear---low on memory usage for (a) but could use more memory in (b).
I might be able to write a little piece on how this is done but I wouldn't be able to withstand that flamage that might result :-) Besides my ESP-enabled fortune signature generator has something to say about the time I've spent on doing all this configuration... (See below).
I got tired of spend^H^H^H^H^Hwasting my time configuring my window manager/desktop/themes/what have you and switched to "ratpoison". After a deep and productive hack I come up for relaxation and am faced with the pest-killer again. Can't do GIMP, screensavers, and the rest. How do I relax? Go and play football (soccer to some...)? No. Back to configuring my window manager so that it can at least be like ratpoison some of the time.
Defining the problem:
How do I get my window manager to maximize a window without the handles, titlebars, buttons and all that fluff. In this window I might have a term with screen or emacs or mozilla (for those do-not-disturb browse-fests :-) why should the window manager care!
	Golem: (The first WM that I learnt to do this with) Alt-z
		z is for zoom.

	ICEWM: Alt-F11 (Yes, that's all!) F11 for "Fill the screen"

	FVWM:  For a window manager that can do it all this should
	        be easy; but I haven't quite figured it out.
		There *is* fvwm-shell and that has some settings that
		are 90% of the solution. (Unsurprisingly this is my
		current UI---I *need* to figure it out!).
(!) [Thomas] Lots of ways you can do this. I would define a function for it:
DestroyFunc FvwmMaximiseWindow
AddToFunc   FvwmMaximiseWindow
+ I  ThisWindow WindowStyle !Handles, !Title, !Borders
+ I  Maximize 100 100
+ I  Key z  A  SCM NoFullScreen

DestroyFunc NoFullScreen
+ I ThisWindow WindowStle Handles, Titles, Borders
+ I ThisWindow UpdateStyles
+ I Maximize 100 100
(!) [Kapil]
	Metacity+GNOME2: You can define the relevant key using the
	        window key bindings menu (there is no default binding).
		The relevant function is Toggle Maximize Window. Imagine
		the surprise on people's faces when they come and say
		"What! Are you running that pest-killer again? Give me a
		real desktop", you press a key and *wham* there is GNOME
		in all its glory (once it gets out of swap space that
Yes. I know that all this does not reduce memory usage! On the other hand if you work/hack for long enough all that unused stuff should go into swap/disk so it shouldn't bother you.
Alternate Answer:
For those who really want to work 90% of the time the alternative is to run ratpoison with one of the frames containing an Xnest that runs the eye-candy window manager. There is one problem with this solution---no DRI for the eye-candy which means that GL screensavers and the like will not produce good results.
(!) [Rick] Surely no desktop is complete without the Moaning Goat Meter (which used to lurk^Wreside at http://www.xiph.org/mgm):

MGM, the Moaning Goat Meter, is the ultimate sixty-ton cast iron lawn
ornament for the desktops of today's hacker set: A gorgeous, highly
configurable load and status meter written entirely in Perl. Serious
pink-flamingo territory. For evil geniuses only.

Disclaimer: MGM will not get your whites whiter or your colors
brighter. It will, however, sit there and look spiffy while sucking
down a major honking wad of RAM.
A review on taint.org states: "Silly: The Moaning Goat Meter, by xiph.org -- a load meter written in a proper[1] programming language, and with an inexplicably spinning fish that stares at you.
Je suis desolé, desolé, that the Web pages for this procmeter3-like (but much prettier) mostly-ornamental system-monitoring widget have disappeared. The FAQ in particular was priceless, not to mention the pictures with those pink flamingos in them.

This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

Each TAG thread Copyright © its authors, 2004

Published in issue 105 of Linux Gazette August 2004

<-- 2c Tips | TAG Index | 1 | 2 | 3 | 4 | Knowledge Base | News Bytes -->