Created attachment 3036 patch to prevent spawning new ssh-agent by keychain i noticed when trying to make netbeans work on xfce with keychain that if i run keychain (from .bashrc) after i start xfce, new ssh-agent is spawned, so instead of reusing ssh-agent spawned by xinitrc, keychain spawns new one because it does not know user has already one running. it's because .bashrc can see SSH_AGENT_PID empty. i created simple patch that fixes this by saving ssh-agent output to ~/.keychain/$HOSTNAME-sh. .bashrc still can see empty SSH_AGENT_PID, but it checks the created file and reuses the info from it.
Created attachment 3037 patch to prevent spawning new ssh-agent by keychain sorry, i noticed the patch was not correct, i posted outdated one, this one does not contain eval on the line where ssh-agent is called as eval is useless there
Isn't the real problem the fact that bash can't see your SSH_AGENT_PID? At least here it works pretty fine: corsac@hidalgo: bash corsac@hidalgo:~$ echo $SSH_AGENT_PID 10244 Anyway, ssh-agent shouldn't really be started by startxfce4, but should be started by its own scripts, for example in /etc/X11/Xsession.d stuff.
well true, the real problem is that though in xinitrc SSH_AGENT_PID and SSH_AUTH_SOCK seem to be exported (by eval `$sshagent -s`), if i run alt+f2 -> Terminal which invokes my ~/.bashrc, this terminal knows nothing about these variables (tested by adding env command into ~/.bashrc). i also tried to comment ssh-agent stuff in /etc/xdg/xfce4/xinitrc and put . ~/.bashrc in ~/.xsession but that one does not seem to be called at all which is probably because when using xdm, x server is already running by root. i guess if i would put ssh-agent/keychain in /etc/X11/Xsession.d, it would not work either as that script would be run by root and not by user. i recall i also tried to put keychain in xfce4-session-settings but that also did not cause to export SSH_AGENT_PID in Terminal. i use xdm (and slim) to start xfce so my start command is: /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
Close bug reports of archived products.