Bug 20440 - Make X startup more flexible
Make X startup more flexible
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: xinitrc (Show other bugs)
7.0
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Mike A. Harris
Aaron Brown
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-06 16:39 EST by Joshua Buysse
Modified: 2007-03-26 23:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-31 03:28:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proof-of-concept patch to xinitrc sources (3.65 KB, patch)
2001-02-26 01:06 EST, Joshua Buysse
no flags Details | Diff

  None (edit)
Description Joshua Buysse 2000-11-06 16:39:06 EST
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.
Comment 1 Daniel Roesen 2000-11-07 07:46:33 EST
Request seconded.
Comment 2 Joshua Buysse 2000-12-15 02:44:48 EST
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 
some testing.  

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...
Comment 3 Joshua Buysse 2001-02-26 01:03:13 EST
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 
rpm.  

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 
night).

Attaching a simple diff to xinitrc's source right now.
Comment 4 Joshua Buysse 2001-02-26 01:06:29 EST
Created attachment 11100 [details]
proof-of-concept patch to xinitrc sources
Comment 5 Joshua Buysse 2001-02-26 01:11:29 EST
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):

#!/bin/sh
exec gnome-session

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.
Comment 6 Mike A. Harris 2001-07-31 03:32:52 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.