[kde-freebsd] Re: patch needed for Xsession
M. Warner Losh
imp at ixsystems.com
Thu Oct 28 00:18:50 CEST 2010
On 10/28/2010 12:59, Kris Moore wrote:
> On Wed, Oct 27, 2010 at 02:30:03PM -0600, M. Warner Losh wrote:
>> 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
> I've gone ahead and fixed the Xsession we ship in PC-BSD, however
> this won't correct it for FreeBSD KDE users. This file is generated
> when the user runs "genkdmconf", and I confimed that it still produces the
> broken Xsession. We'll need to get it fixed there for everybody :)
When do we run it? At build time? Or is it something that I'm supposed
to run as an ordinary user?
Warner
More information about the kde-freebsd
mailing list