[kde-freebsd] patch needed for Xsession
M. Warner Losh
imp at ixsystems.com
Wed Oct 27 22:30:03 CEST 2010
Greetings,
I just spent a few days fighting ssh-agent. This normally trivial
affair has taken far too long. After much head scratching, I've tracked
the problem down.
FreeBSD's /bin/sh behaves differently than other systems. The commands:
sh -c export -p
and
sh -c "export -p"
are treated differently. The trouble is that this dark corner of shell
syntax is actually used in Xsession that's shipped with KDE4:
*/csh|*/tcsh)
# [t]cshrc is always sourced automatically.
# Note that sourcing csh.login after .cshrc is non-standard.
xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
$SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f
~/.login) source ~/.login; /bin/sh
-c export -p >! $xsess_tmp"
. $xsess_tmp
rm -f $xsess_tmp
;;
The obvious fix of single quoting the export -p command above appears to
work for me. While I'm working with jilles@ to see if this difference
is normal variation in the implementation of a POSIX shell, or a bug, we
need a patch to the appropriate port so that we work correctly for users
whose login shell is csh or tcsh. The effect of this bug is that no
variables set in .login are visible to kde, which makes it impossible to
do the normal thing of setting up the ssh-agent there (in some cases).
I'm not entirely sure what the right port is, since I'm using PC-BSD 8.1
(Hubble Edition), so I thought I'd raise this issue here so that people
can work on the issue, give me pointers, etc. I've cc'd Kris Moore who
is the pc-bsd lead so he knows about the issue.
Comments?
Warner
More information about the kde-freebsd
mailing list