! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce and support for keychain
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce-utils
Component:
General

Comments

Description fordfrog 2010-07-17 17:19:07 CEST
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.
Comment 1 fordfrog 2010-07-17 17:39:12 CEST
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
Comment 2 Yves-Alexis Perez editbugs 2010-07-19 06:43:03 CEST
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.
Comment 3 fordfrog 2010-07-19 12:32:42 CEST
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
Comment 4 Nick Schermer editbugs 2014-12-03 09:19:44 CET
Close bug reports of archived products.

Bug #6558

Reported by:
fordfrog
Reported on: 2010-07-17
Last modified on: 2014-12-03

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Attachments

Additional information