This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with XFree86-bin-4.2.0-2


Actually it is a very minor sort of problem, but a bug nonetheless.

The csh startup script /etc/profile.d/00xfree.csh is usually sourced
before the shell has a complete path.  This is the case for the stock
Cygwin tcsh install.  However, the "path adding" script does not use full
pathnames for system executables.  The sh version /etc/profile.d/00xfree.sh
does use full pathnames (I guess most testing defaulted to bash).

Taking a min-mods approach /etc/profile.d/00xfree.csh should be altered to
look this way:

----------
# the script name starts with 00 to ensure that it is executed before any
# other scripts because one of them may need to know where X is to run
# properly.

set X11PATH="/usr/X11R6/bin"

if ( $?PATH ) then
  eval "/bin/echo ${PATH} | /bin/grep -q ${X11PATH}"
  if ( $status ) then
    setenv PATH "${PATH}:${X11PATH}"
  endif
else
  setenv PATH ":${X11PATH}"
endif
----------

This incorporates two changes.  The first is to use full pathnames just as
/etc/profile.d/00xfree.sh does.  (Note that this is not really needed for
echo as the shell builtin works fine but it's good practice to have both
shell scripts function as identically as possible.)  The second is to use
$status as $? only exists in tcsh, and in theory this script should be
csh-compatible.

Without this change, the script fails to operate correctly under tcsh.
Many people use tcsh instead of bash so it is probably a worthwhile fix.

-Andy

PS.  Sorry to have written so many words about such a simple thing =)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]