Gentoo Archives: gentoo-dev

From: Lukasz Pawelczyk <havner@××××.pl>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] xinitrc/startx scripts unification
Date: Sun, 10 Sep 2006 11:59:41
Message-Id: 20060910115656.GA8051@sirius.livecd.pl
1 I wanted to fill bugzilla report about this but found few existing
2 without neither serious solution nor being current.
3
4 There is an incosistency in current xinitrc behaviour (i'm only talking
5 about xinitrc run through startx, not {k,g,x}dm).
6
7 Problems:
8
9 1. /etc/X11/xinitrc tries to load xresources and xmodmap but not xkb,
10 this is done only in /etc/X11/Sessions/Xsession so to use it you need to
11 set XSESSION=Xsession (not giving yourself a chance to use chooser for
12 chosing windowmager which is i think it should be used for)
13
14 2. neither of them sources /etc/X11/xinit/xinitrc.d not letting f.e.
15 dbus to start in your session
16
17 3. /etc/X11/xinitrc tries to load ~/.xinitrc which is absolutely
18 unneccesary as this is done in startx and running ~/.xinitrc from
19 /etc/X11/xinitrc wont ever happen (and it should work this way as
20 ~/.xinitrc should be run on totally clean session, without any
21 resources/modmaps set, for the other case ~/.xsession or ~/.Xclients
22 should be used)
23
24 4. Most of this is workarounded f.e. in /etc/X11/Sessions/Gnome which
25 does all whats necessary (xkb, xinitrc.d) but this is just code
26 duplication with /etc/X11/Sessions/Xsession and requires other wm's
27 sessions do the same and they dont. F.e. windowmaker,
28 /etc/X11/Sessions/wmaker only runs wmaker bin, without setting anything.
29
30 Solution:
31
32 Completely remove /etc/X11/Sessions/Xsession and merge its functionality
33 with /etc/X11/xinitrc + add sourcing xinitrc.d (see attachment #1).
34 Remove all resource related things from /etc/X11/Sessions/* and make
35 these files only run windowmagers. All other things would be done from
36 /etc/X11/xinitrc for all windowmagers.
37 Gnome session after this should look like attachment #2.
38
39 All of these changes shouldn't break anything.
40 If someone is setting XSESSION to Xsession to rely on ~/.xsession,
41 /etc/X11/xinitrc will do it by default.
42 If someone set XSESSION to any other windowmanager it will work as well
43 (chooser is still run from /etc/X11/xinitrc) but in addition he'll have
44 properly set enviroment for wm's that dont it themselves (above example
45 of wmaker).
46
47 The only thing that will change is when someone have both XSESSION set
48 and ~/.xsession created. Now ~/.xsession will have priority over chooser
49 as it should be in my opinion. If you think this is unacceptable its
50 only enough to change order in xinitrc proposed by me.
51
52 Patch #3 is /etc/X11/Sessions/Xsession against new xinitrc.
53
54 What do you think about it? If you'd accept it I'd happily review other
55 wm's session files as well.
56
57 --
58 Regards
59 Lukas Pawelczyk

Attachments

File name MIME type
xinitrc text/plain
Gnome text/plain
xinitrc.diff text/plain

Replies

Subject Author
Re: [gentoo-dev] xinitrc/startx scripts unification Donnie Berkholz <dberkholz@g.o>