[FreeNX-kNX] Re: Fedora 14 black screen
Fritz Elfert
fritz at fritz-elfert.de
Thu Apr 28 22:01:23 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 28.04.2011 16:30, Mario Ceresa wrote:
> Hey Chris,
>
> I solved the problem!
[...]
> exec /usr/bin/ssh-agent $SHELL
>
> Commenting it out did the magic. Any idea why it interferes with NX?
> It works with local or ssh login.
Because your way of using ssh-agent from a .profile (or .bashrc or any
*sourced* script) is completely wrong. It *replaces* the currently
running shell by a second shell which is started from ssh-agent. The
currently running shell is always terminated, because you use exec. So
it just *looks* like it works if you login directly. However even with a
direct login, any settings made before that line (in the invoking shell;
e.g. an alias definition) are lost. The correct way (for a bourne-like
shell) is something like this:
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi
More examples here:
http://mah.everybody.org/docs/ssh#run-ssh-agent
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFNueOyboM4mAMyprARAhW9AJ91v02OSrFsWf++zhPIfYIziUOi3gCfcEQ8
lzsRA+T1G0iXS06upDeW5PY=
=Ant+
-----END PGP SIGNATURE-----
More information about the FreeNX-kNX
mailing list