/etc/profile has the line:
which unconditionally changes the path. This is correct behavior if bash
is spawned directly by /bin/login, but in other situations it can put
/usr/X11R6/bin into the path twice.
This happens is with an ssh login, since ssh doesn't use /bin/login unless
the UseLogin option is selected. Another way to reproduce the problem is
to use 'su - foo' to change to the user foo. The best fix, imho, is to
have /etc/profile do a check before modifying the path. Here is one of
many ways this can be done (not the shortest way, but at least its not too
echo $PATH | /bin/grep --silent /usr/X11R6/bin
if [ $? -ne 0 ]; then
will be fixed in setup-2.3.7-1; thanks!