First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 25273
Alias:
Product:
Component:
Status: RESOLVED
Resolution: WORKSFORME
Assigned To: Gentoo Linux Gnome Desktop Team <gnome@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Daqing Li <lid@ecn.purdue.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
xinitrc-common xinitrc-common text/plain Donnie Berkholz 2005-09-08 10:24 0000 2.11 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 25273 depends on: Show dependency tree
Bug 25273 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-07-25 13:01 0000
/etc/X11/Sessions/Gnome has a bug in following results it cannot run 
~/.xinitrc.

# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for i in /etc/X11/xinit/xinitrc.d/* ; do
        if [ -x "$i" ]; then
            . "$i"
        fi
    done
fi

The bug is caused by the fact that there is no directory named xinitrc.d under
/etc/X11/xinit/ except a script file named xinitrc. In /etc/X11/xinit/xinitrc,
~/.xinitrc is checked and executed if exits. Becaused of this bug, ~/.xinitrc
will not be checked and executed. So either make a directory named xinitrc.d
under /etc/X11/xinit/ and put /etc/X11/xinit/xinitrc under
/etc/X11/xinit/xinitrc.d/ or just modify the above code in 
/etc/X11/Sessions/Gnome as below will check and execute ~/.xinitrc.

# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for i in /etc/X11/xinit/xinitrc.d/* ; do
        if [ -x "$i" ]; then
            . "$i"
        fi
    done
# check ~/.xinitrc
elif [ -f $HOME/.xinitrc ]; then
    exec /bin/sh "$HOME/.xinitrc"
fi

------- Comment #1 From Brad Laue (RETIRED) 2003-08-13 06:38:17 0000 -------
On another note, the Gnome script in /etc/X11/Sessions doesn't properly set up
its environment before starting the desktop. This became apparent to me when
launching a KDE program from within GNOME, and noticing that none of the
kde-env environment variables were present in my GNOME session.

------- Comment #2 From Alastair Tse (RETIRED) 2003-09-17 10:15:31 0000 -------
i'm tempted to mark this invalid/wontfix because :

1. If you choose a Gnome session in GDM, then you should be using ~/.gnomerc instead of ~/.xinitrc

2. If you don't want to launch gnome-session, then you should choose "xsession" as your session in GDM and use ~/.xsession instead.

3. I've always thought that ~/.xinitrc was only for when X is started from the console using "startx".

Brad,

I don't understand why KDE environment variables should be in the Gnome init script. Shouldn't you be putting those varibles in your .bash_profile or such? Or am I missing the point?

------- Comment #3 From Alexander Papaspyrou 2004-10-11 04:17:00 0000 -------
Yes, you are. One of the greater nuisances caused by this code is that people
have to maintain two system-wide Xmodmap (and possibly other config) files:

"/etc/X11/Sessions/Gnome" assumes "/etc/X11/Xmodmap" for system-wide
configuration, where "/etc/X11/xinit/xinitrc" searches for
"/etc/X11/xinit/.Xmodmap".

At least we should setup a symlink from one file to the other to ensure only
one configuration file; OTOH it would be a much cleaner solution to unify
xinit-related stuff (such as xmodmap, xrdb and the like) in *one* place rather
than enforcing painful config clutter (as, in fact, being the current
situation).

So there three options:
1. Symlink /etc/X11/Xmodmap to /etc/X11/xinit/.Xmodmap. This seems to be the
easiest one, but it's neither portable nor safe to future changes. Furthermore,
vanilla X11 installations don't have this file; we then have to create it
during emerge or live with a dead symlink until the user creates the link
target.

2. Change "/etc/X11/Sessions/Gnome" (and wherever else necessary) to look in
"/etc/X11/xinit" directly instead of "/etc/X11/xinit/xinitrc.d". This is nice
and clean, but we lose the possibilities of the additional level of
indirection. OTOH I'm not sure if it is used at all.

3. Create "/etc/X11/xinit/xinitrc.d/", symlink
"/etc/X11/xinit/xinitrc.d/default" to "/etc/X11/xinit/xinitrc" and remove
xinit-related stuff from "/etc/X11/Sessions/Gnome" (and wherever else
necessary). This seems to be the cleanest solution, as it respects the
"traditional way" to setup system-wide xinit-related stuff via
"/etc/X11/xinit/xinitrc" and separates X-related configuration from DM-related
configuration.

IMHO, we should choose between 2. and 3., depending on whether the additional
level of "indirection" through "xinitrc.d" is needed or not.

Opinions, anyone?

------- Comment #4 From Alexander Papaspyrou 2004-10-11 04:21:19 0000 -------
Oops, I made a slight mistake in my previous comment. It should read:

[...]
2. Change "/etc/X11/Sessions/Gnome" (and wherever else necessary) to look in "/etc/X11/xinit" directly instead of "/etc/X11/xinit/xinitrc.d" _and remove xinit-related stuff from "/etc/X11/Sessions/Gnome" (and wherever else necessary)_. This is nice and clean, as it separates xinit-stuff from DM-stuff; we still give up the possibilities of the additional level of indirection. OTOH I'm not sure if it is used at all.

3. Create "/etc/X11/xinit/xinitrc.d/", symlink "/etc/X11/xinit/xinitrc.d/default" to "/etc/X11/xinit/xinitrc" and remove xinit-related stuff from "/etc/X11/Sessions/Gnome" (and wherever else necessary). This seems to be the cleanest solution, as it respects the "traditional way" to setup system-wide xinit-related stuff via "/etc/X11/xinit/xinitrc" and separates X-related configuration from DM-related configuration.

Sorry for the mistake.

------- Comment #5 From Leonardo Boshell (RETIRED) 2005-05-28 04:07:16 0000 -------
So basically this comes down to a conflict caused by the following situation:

/etc/X11/Sessions/Gnome has these lines:
#----
sysresources=/etc/X11/Xresources
sysmodmap=/etc/X11/Xmodmap
sysxkbmap=/etc/X11/Xkbmap
#----

while /etc/X11/xinit/xinitrc has:
#----
xinitdir=/usr/X11R6/lib/X11/xinit
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap
#----

x11 guys: Do you have any suggestions? Should we modify our Gnome session script?

Also worth checking out bug #89624 while we're at it.

------- Comment #6 From Joshua Baergen (RETIRED) 2005-05-31 20:05:00 0000 -------
I like #3 personally.  It would appear that this would align well with what
some
other distributions (IE, Fedora and thus I'm sure many others) are doing.

------- Comment #7 From Mike Gardiner (RETIRED) 2005-09-08 09:19:27 0000 -------
I like 3 as well, Donnie?

------- Comment #8 From Donnie Berkholz 2005-09-08 10:24:22 0000 -------
Created an attachment (id=67948) [edit]
xinitrc-common

I think 3 is along the right track, and now that upstream is (almost) modular,
I think we could get some code together (perhaps from redhat) and send a patch
up.

Also in modular, Josh, could you change xinitdir=/usr/X11R6/lib/X11/xinit to
xinitdir=/etc/X11 and see what happens? That will at least fix up comment #5.

For reference, I've attached the main part of fedora's xinitrc-common file,
which is "common code shared between the Xsession and xinitrc scripts which has
been factored out to avoid duplication."

------- Comment #9 From Donnie Berkholz 2005-09-08 10:34:40 0000 -------
I just uploaded
http://dev.gentoo.org/~spyderous/xorg-x11/redhat/xinitrc-4.0.19-1/, which is the
latest development Fedora release, for anyone who's interested in perusing it.

------- Comment #10 From Joshua Baergen (RETIRED) 2005-09-08 16:23:19 0000 -------
(In reply to comment #8)
> Also in modular, Josh, could you change xinitdir=/usr/X11R6/lib/X11/xinit to
> xinitdir=/etc/X11 and see what happens? That will at least fix up comment #5.

This has been committed to modular.

------- Comment #11 From Gilles Dartiguelongue 2006-06-13 19:17:45 0000 -------
you I love old bugs :)

So what is the status of this ?

I see that the "/etc/X11/xinit/xinitrc.d/" directory exists but there is just a
script for dbus in it.

------- Comment #12 From Xake 2007-07-28 14:08:34 0000 -------
Closing time?;)

------- Comment #13 From Rémi Cardona 2007-07-28 15:39:55 0000 -------
Yeah :)

To all, feel free to reopen if it's still an issue.

First Last Prev Next    No search results available      Search page      Enter new bug