Bug 122941 - remove switchdesk dep, use Xclients.d instead
remove switchdesk dep, use Xclients.d instead
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xinitrc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks: FC4Target
  Show dependency treegraph
 
Reported: 2004-05-10 12:47 EDT by Rex Dieter
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-05 08:35:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
use kde|startkde and gnome|gnome-session Session names (596 bytes, patch)
2004-05-10 12:52 EDT, Rex Dieter
no flags Details | Diff
Xclients.d for xinitrc-3.42 (1.79 KB, patch)
2005-01-13 08:53 EST, Rex Dieter
no flags Details | Diff
Xclients.d for xinitrc-4.0.14 (1.81 KB, patch)
2005-01-13 08:54 EST, Rex Dieter
no flags Details | Diff

  None (edit)
Description Rex Dieter 2004-05-10 12:47:15 EDT
xinitrc should consistently name sessions 
kde|startkde 
and 
gnome|gnome-session

It also should either consitently *use* switchdesk, or consistently
*not use* switchdesk, though IMO, switchdesk should not be used.
Comment 1 Rex Dieter 2004-05-10 12:50:24 EDT
Nevermind the switchdesk comment, that's already been removed I see.
Comment 2 Rex Dieter 2004-05-10 12:52:51 EDT
Created attachment 100135 [details]
use kde|startkde and gnome|gnome-session Session names
Comment 3 Sammy 2004-05-10 14:54:51 EDT
I see a somewhat problem for a long time now. The condition 
 
case "$1" in 
 
etc. never makes it to the kde section even though I have  
 
# cat /etc/sysconfig/desktop 
DISPLAYMANAGER=KDE 
 
However, the kdm does start somehow. BUT if I replace $1 with $PREFERRED 
than it does it correctly. This seems right since xinput.sh is sourced and sets 
the $PREFERRED variable there. I only noticed this becase I was starting 
some ssh-add process in the kde section of the script. 
 
Comment 4 Rex Dieter 2004-07-06 09:26:45 EDT
switchdesk is definitely a problem, and without the attached patch,
kde is broken.

FYI, using this patch also makes it possible to remove
Requires: switchdesk
as well.
Comment 6 Ngo Than 2004-07-12 09:40:07 EDT
Created attachment 101811 [details]
xinitrc patch
Comment 8 Mike A. Harris 2004-12-23 00:07:51 EST
Than:

Wouldn't it be better if xinitrc itself just had a:
"/etc/X11/xinit/Xclients.d" directory local to itself,
and put the logic of what startup script to invoke in
xinitrc, instead of switchdesk?

I'm thinking perhaps switchdesk could end up being just
a config tool that sets a couple env vars in
/etc/sysconfig/desktop then, and just lets xinitrc
check them and do it's magic.

That way wm rpm packages both in and outside the OS,
can just drop in "/etc/X11/xinit/Xclients.d/Xclients.foowm.sh"
and switchdesk would either use the .foowm. to extract the
wm name, or get it from a variable inside the script or a
comment or something, and present the choices of each installed
wm for users to pick.

Just a thought.  I'd like to make xinitrc basically, so it
works with any wm, and works wether switchdesk is being used
or not and wether switchdesk is even installed or not.

If we can do that, we make less maintenance in future for
$newwindowmanager's that creep into the distro, or are added
on separately.

Comments/feedback from anyone appreciated.
Comment 9 Mike A. Harris 2004-12-23 00:11:04 EST
Just to supplement my last comment.  I'd like a solution that
works both with startx, xdm, kdm, gdm, and with or without
switchdesk being used, or installed.  That would cover all
cases, and probably make the universe happy, with zero future
xinitrc maintenance per $windowmanager_du-jour

just a thought...
Comment 10 Rex Dieter 2005-01-13 08:49:14 EST
Mike,
I'll shortly attach a first pass at implementing your Xclients.d idea.
Comment 11 Rex Dieter 2005-01-13 08:53:24 EST
Created attachment 109713 [details]
Xclients.d for xinitrc-3.42

Removes switchdesk usage, using /etc/X11/xinitrc/Xclients.d instead
remove special case kde/gnome entries
remove superfluous twm entry
change all kdm/gdm comments to refer to LOGINMANAGER instead
Comment 12 Rex Dieter 2005-01-13 08:54:22 EST
Created attachment 109714 [details]
Xclients.d for xinitrc-4.0.14

Removes switchdesk usage, using /etc/X11/xinitrc/Xclients.d instead
remove special case kde/gnome entries
remove superfluous twm entry
change all kdm/gdm comments to refer to LOGINMANAGER instead
Comment 13 Rex Dieter 2005-01-13 08:57:22 EST
With these patches, kde and gnome are no longer a special case, though
gdm (not kdm, it's ok) uses session names of kde/gnome instead of the
proper startkde/gnome-session, so either 
1.  gnome-session rpm should be patched accordingly (to use
gnome-session/startkde)
or
2.  Create symlinks in Xclients.d to handle it
Xclients.d/Xclients.kde.sh -> /usr/bin/startkde
Xclients.d/Xclients.gnome.sh -> /usr/bin/gnome-session
Comment 14 Rex Dieter 2005-01-13 08:58:58 EST
Of course, with this patch, the xinitrc rpm should create/own
/etc/X11/xinitrc/Xclients.d
Comment 15 Rex Dieter 2005-01-13 09:07:12 EST
Also, if you wanted a maintain a bit of backward compatibility, one
could also search the switchdesk dir(s) for Xclients bits (*after*
looking in /etc/X11/xinit/Xclients.d, of course)
Comment 17 Mike A. Harris 2005-03-22 09:21:52 EST
This bug is related to bug #145534 and bug #138482.  Mentioning it here,
so all 3 end up getting resolved at the same time hopefully.

Comment 18 Rex Dieter 2005-03-22 09:24:30 EST
Wouldn't it be easiest just to pick 1 of these as the "master" bug, and set the
others as dups? 
Comment 19 Mike A. Harris 2005-03-22 09:53:25 EST
They are not all the exact same issue however.  I am hoping to find
solutions to all of the problems with one fix though.  The right way
to track 3 similar but different issues would be to use a separate
bug tracker bug, and make all of the issues block the tracker, however
it's just as easy for me to query bugzilla for "xinitrc" open bugs
for these issues.  ;o)

Comment 20 Mike A. Harris 2005-03-22 09:58:54 EST
In comment #17 I pasted the wrong bugs.  The correct bugs are:

Bug #112478 and bug #142260.
Comment 21 Mike A. Harris 2005-04-05 08:35:52 EDT
I've implemented my own similar Xclients.d solution for this problem,
and various similar bugs reported in bugzilla.  It will be present in
xinitrc-4.0.16-1 and later in rawhide.

Please test and provide feedback.  Setting status to RAWHIDE.

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