Bug 100794 - Support symlinks in the /etc/X11/xinit/xinitrc.d/ directory
Support symlinks in the /etc/X11/xinit/xinitrc.d/ directory
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: xinitrc (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-25 11:52 EDT by Dax Kelson
Modified: 2015-01-07 19:05 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-12 03:54:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dax Kelson 2003-07-25 11:52:46 EDT
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 01:23:30 EDT
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 03:54:41 EDT
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.