patch - Property box to select window manager.



Hi,

One day last week I was experimenting with using various different window
managers (to see which I liked best). This involved editing my .xinitrc
quite a lot. I got to thinking that it would be nice if gnome would
provide a way to choose which window manager to use, without editing
.xinitrc. 

To that end I have written a window manager properties dialog
(wm-properties), following the same idea as background-properties. What it
does is: 

When run with `--init' 
---------------------- 
When it is run with `--init' it will start the window manager that the
user was using last time, if this is the first time it has been run it
will try to start a default window manager (currently it just tries to run
fvwm2), if that fails the user will still be able to choose a window
manager by starting wm-properties from the panel menu. This means the
users .xinitrc will be something like this:

	background-properties --init
	wm-properties --init
	exec panel

When run with no options
------------------------
When run without the `--init' flag (for example from the System menu on
the panel menu) it will bring up a dialog box allowing the user to select
a window manager from a list or browse the file-system for it. When the
user presses apply it will kill (via SIGKILL) the current wm and start
the new one (via a fork() and exec()), this new window manager will also
become be the default next time X is started. I have succesfully tested
this with fvwm2, blackbox, enlightenment and icewm. A kind of side affect
of this is that you can keep changing window managers on the fly, which I
suppose some people might find useful.

Do you think this is a useful feature for gnome? I think it must be, since
it saves fiddling around with configuration files.

If you do think it is a good idea, I have a question regarding
implementation. When changing window managers, occasionally the old wm has
not exited by the time the new wm starts, this means that the new wm can't
grab the X display and exits - leaving no window manager. Can I do a
waitpid() on the old wm? I'm not sure because it is not necessarily a
child of the current wm-properties process (it might have been inherited
by init when the previous wm-properties exited). Does anybody know how to
check if any process has completed (not just a child)?

I have made a patch against the gnome-core-0.30 release, is this OK or
would it be better to make a patch against CVS? It is only 3 new files and
a tiny change to Makefile.am. I have attached the patch vs gnome-core-0.30
anyway.

Cheers,

Ian Campbell

patch-wm-properties.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]