Bug 122941

Summary: remove switchdesk dep, use Xclients.d instead
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: xinitrcAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gajownik, stefan.hoelldampf, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-05 12:35:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 136451    
Attachments:
Description Flags
use kde|startkde and gnome|gnome-session Session names
none
Xclients.d for xinitrc-3.42
none
Xclients.d for xinitrc-4.0.14 none

Description Rex Dieter 2004-05-10 16:47:15 UTC
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 16:50:24 UTC
Nevermind the switchdesk comment, that's already been removed I see.

Comment 2 Rex Dieter 2004-05-10 16:52:51 UTC
Created attachment 100135 [details]
use kde|startkde and gnome|gnome-session Session names

Comment 3 Sammy 2004-05-10 18:54:51 UTC
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 13:26:45 UTC
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 Than Ngo 2004-07-12 13:40:07 UTC
Created attachment 101811 [details]
xinitrc patch

Comment 8 Mike A. Harris 2004-12-23 05:07:51 UTC
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 05:11:04 UTC
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 13:49:14 UTC
Mike,
I'll shortly attach a first pass at implementing your Xclients.d idea.

Comment 11 Rex Dieter 2005-01-13 13:53:24 UTC
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 13:54:22 UTC
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 13:57:22 UTC
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 13:58:58 UTC
Of course, with this patch, the xinitrc rpm should create/own
/etc/X11/xinitrc/Xclients.d

Comment 15 Rex Dieter 2005-01-13 14:07:12 UTC
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 14:21:52 UTC
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 14:24:30 UTC
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 14:53:25 UTC
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 14:58:54 UTC
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 12:35:52 UTC
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.