Red Hat Bugzilla – Bug 20440
Make X startup more flexible
Last modified: 2007-03-26 23:37:21 EDT
With 7.0, xinitrc now calls out to scripts in /etc/X11/xinit/xinitrc.d.
Would it be possible to do a few things to make Xclients more like this?
1) Have a ~/.wm_desktop (or similar filename) that can
override /etc/sysconfig/desktop for a single user.
2) Add a xclients.d directory that works somewhat how xinetd manages
configuration. That way, if another desktop is added (like our local
fvwm2 configuration that some users refuse to let go of), it just becomes
an option by putting the right thing in a .wm_desktop file.
If these changes are made, switchdesk would need modification as well.
I've got most of a patch to xinitrc, based off of xinitrc-3.2-1 from rawhide.
I'll be ready to submit it in a day or so, after I've installed it and done
What I've done at this point is taken Xclients, and made it look in the user's
home directory for a file named .wm_desktop.$HOSTNAME, then .wm_desktop,
then /etc/sysconfig/desktop. It checks to see if the desktop is available, if
it isn't it goes to the next in the list. The current fallback if none of
those files is available is Fvwm95, then (ack) twm, same as before.
Other packages will need updating -- switchdesk & anything that provides a
desktop are the ones that I can think of.
Currently, the way that I have desktops "installed" is by creating a directory
as /etc/X11/desktops/$DESKTOP. Contents of that directory at the moment will
be a Xclients file. For switchdesk, a file containing information (i18n?) can
be kept in that directory, along with a file for an icon, etc. Using a
directory was also a way of avoiding name collision between packages.
Is there a chance of this getting used (in some form?) I'm not sure that I'm
willing to tackle the KDE and Gnome GUI's in switchdesk myself...
OK. Didn't look at this for a while, and simplified the approach. I haven't
reimplemented the .wm_desktop.$HOSTNAME bit, but it'd be easy to add. I'm
using this on a machine running Wolverine now, with a modified xinitrc-3.5-1
The other thing that I changed in the package was to have Xsession call out to
Xclients in most cases, and allow Xclients to take a single parameter for a
specified desktop. This removes most of the duplicated logic in Xsession, and
makes it much easier to make gdm work right with this (my next project for the
Attaching a simple diff to xinitrc's source right now.
Created attachment 11100 [details]
proof-of-concept patch to xinitrc sources
To make the patch work, you need "desktops" installed. For a couple of quick
ones, make the directory /etc/X11/Xdesktops/$DESKTOP, and make an executable
Xclients file in there with contents like (for gnome):
It does a tr to convert something like Gnome to gnome, so make the directory
name all lower case. I've got a patch to the gdm package as well that does the
Right Thing (tm) for this to work out.
I don't see a real major benefit to adding more complexity to xinitrc
right now personally. A user could just as easily edit .Xclients to
start some other desktop instead of using KDE or GNOME. Creating
a .wm_desktop or similar just changes the mechanics but still leaves
more or less the same. While we certainly want users to have choice
of what software they use, we also do not want to overcomplicate
choices for new users. Adding more desktop choices to switchdesk IMHO,
just adds more confusion. Users that want other desktops or window
managers are usually tech savy enough to edit .xinitrc or .Xclients
themselves and override the system defaults.