Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26326 - Idea to unify X11/Gnome/KDE/etc. session startups
Summary: Idea to unify X11/Gnome/KDE/etc. session startups
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Highest enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 53517 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-10 04:47 UTC by Andreas Simon
Modified: 2009-06-19 14:29 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Simon 2003-08-10 04:47:11 UTC
Depending on what kind of X11 Session you run -- Gnome, KDE, Enlightment, etc. -- 
different non-desktop-environment specific things get done. I think it would be good 
to unify all session startups. 
 
Besides starting Gnome, the /etc/X11/Sessions/Gnome script 
* merges system wide Xresources and Xmodmaps 
* merges user Xresources and Xmodmaps 
* runs scripts in /etc/X11/xinit/xinitrc.d/ 
All things which are very convenient. But for example KDE's Session script does 
nothing of these things. 
 
I think the session starts should be unified. Let them all merge the Xresources and 
Xmodmaps, and all should execute the xinitrc.d scripts. I see no reason why a Gnome 
session should do these things but a KDE or Enlightment session not. 
 
Gentoo's /etc/X11/xdm/Xsession script also has code to merge Xresources and 
Xmodmaps but executes this only when /etc/X11/chooser.sh doesn't return a session 
string (so there is a bit code duplication in Xsession and Sessions/Gnome). 
 
Maybe it's a good idea to split the non-gnome specific code from Gnome's Session 
script (i.e. Xmodmap loading, Xresource merging, xinitrc.d scripts) into small scripts 
under /etc/X11/xinit/xinitrc.d/ and have code in Xsession to run these scripts before 
chooser.sh is called. Then all non-desktop-environment-specifig code in the Sessions 
scripts can be removed. 
 
Advantages would be: 
* no code duplication (like currently in Xsession and Sessions/Gnome) 
* all session startups (KDE, Gnome, xinit, etc.) behave the same 
* very flexible - just add or delete scripts unter /etc/X11/xinit/xinitrc.d/ to modify 
startup behaviour. No need to modify the Session scripts or Xsession or chooser.sh. 
* other ebuilds (like imwheel) could easily install small scripts under xinitrc.d to start 
during session startup.
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2003-08-10 12:47:28 UTC
Please take a look too at bug #14872, and say what you think about that.
Comment 2 Andreas Simon 2003-08-10 13:34:31 UTC
To have pre- AND postsession scripts is even better. But the patches as they are in  
#14872 don't change the different behaviour/code duplication of Xsession and KDE/
Gnome session scripts (which was not subject of that bug report at all). But they are 
IMO a very good start. 
 
If such a mechanism is implemented, i.e. having scripts in /etc/X11/PreSession.d/ 
and /etc/X11/PostSession.d/ (as Martin Schlemmer suggested) which get executed 
before or after the session, it's easy to unify startup behavior of the various desktop 
environments. All it needs then is to move non-desktop specific code from the 
session scripts (like in Gnome's session script) and the Xdefaults/Xmodmap stuff 
from Xsession into small scripts under /etc/X11/PreSession.d/. And the suggested 
DMSession script can also take the form of small /etc/X11/{Pre,Post}Session.d/
scripts which then execute systemwide or user specific things. 
 
Hmm .. I feel a bit silly. I did a bugzilla search for xinitrc and session, etc. but 
somehow managed to overlook bug #14872 , otherwise I would have posted a 
comment there. 
Comment 3 Paul de Vrieze (RETIRED) gentoo-dev 2006-03-27 00:59:41 UTC
In the current kdm and gdm this is partially implemented as sourcing ~/.xprofile.
Comment 4 Charlie Shepherd (RETIRED) gentoo-dev 2007-02-25 16:00:55 UTC
*** Bug 53517 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-08 19:58:45 UTC
comment #3:

True, for the user.  But I agree that it'd be nice to have scripts for the system.  Think /etc/env.d vs. ~/.bashrc and ~/.profile

I'm in favor of this proposal.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-06-19 14:29:54 UTC
Nearly 5 years after this bug was opened, it seems no-one cares about merging those scripts anymore.

In any case, patches will of course be welcome by the X11 herd, but this is very very low on our TODO list.

Thanks