Bug 100794

Summary: Support symlinks in the /etc/X11/xinit/xinitrc.d/ directory
Product: [Fedora] Fedora Reporter: Dax Kelson <dkelson>
Component: xinitrcAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED WONTFIX QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-12 07:54:41 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:

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"