Bug 100794 - Support symlinks in the /etc/X11/xinit/xinitrc.d/ directory
Summary: Support symlinks in the /etc/X11/xinit/xinitrc.d/ directory
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: xinitrc
Version: 1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-25 15:52 UTC by Dax Kelson
Modified: 2015-01-08 00:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-12 07:54:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dax Kelson 2003-07-25 15:52:46 UTC
Description of problem:

It's very cool that you can stick an executable shell script in the
/etc/X11/xinit/xinitrc.d/ directory and it will launched vi xinitrc or Xession
when the user logins in from runlevel 3 using startx or runlevel 5 via gdm.

However, there are all kinds of X executables all over the filesystem, it would
very nice if I could just create a symbolic link to them instead of having to
create a shell script that launches them.

The two scripts:

/etc/X11/xinit/xinitrc
/etc/X11/xdm/Xession 

Have this code:

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

How about using this code instead, I've tested and verified it works.

# run all system xinitrc shell scripts.
for i in /etc/X11/xinit/xinitrc.d/* ; do
    if [ -x "$i" -a ! -L "$i" ]; then
       . "$i"
    elif [ -L "$i" ]; then
      $i >/dev/null 2>&1 &
    fi
done


Now I can do stuff like:

# cd /etc/X11/xinit/xinitrc.d/
# ln -s /usr/X11R6/bin/xeyes

And I don't have to create a shell script.

Comment 1 Dax Kelson 2003-09-26 05:23:30 UTC
Mike, what do you think?

This will make the xinitrc.d directory behavior consistent with other ".d"
directories.

This should be a 5 minute job.

Comment 2 Mike A. Harris 2004-10-12 07:54:41 UTC
The problem with this, is if the symlink becomes a dead symlink after
an OS upgrade, or software gets uninstalled that the link pointed
to.

Before any app gets executed, a script should test if it actually
exists and is executable IMHO.  I'm a bit conservative in this
area, because anything that causes the X server or desktop to
fail to start, will ultimately end up in Red Hat bugzilla as an
obscure X.Org bug.

I'd prefer to only add new functionality to the X startup scripts
that provide significant benefit, and do not add additional risk
of problem scenarios occuring.  I think it is best for now to
avoid making this change to the xinitrc package.

Setting status to "WONTFIX"



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