Bug 20440 - Make X startup more flexible
Summary: Make X startup more flexible
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xinitrc
Version: 7.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-06 21:39 UTC by Joshua Buysse
Modified: 2007-03-27 03:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-07-31 07:28:31 UTC
Embargoed:


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

Description Joshua Buysse 2000-11-06 21:39:06 UTC
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 12:46:33 UTC
Request seconded.

Comment 2 Joshua Buysse 2000-12-15 07:44:48 UTC
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 06:03:13 UTC
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 06:06:29 UTC
Created attachment 11100 [details]
proof-of-concept patch to xinitrc sources

Comment 5 Joshua Buysse 2001-02-26 06:11:29 UTC
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 07:32:52 UTC
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.