On 2020-04-23 07:50, Chris Rodgers wrote: > I find the ssh-pageant package helpful to enable cygwin ssh to interact > seamlessly with PuTTY's Pageant SSH agent. One small issue is that after > installing, one has to add the lines: > # ssh-pageant > eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME") > (see https://github.com/cuviper/ssh-pageant) > to .bashrc for each user. > Would it be acceptable to update the ssh-pageant package to add a file > /etc/profile.d/ssh-pageant.sh that does this automatically? > Or is there another preferred way to do this, e.g. a postinstall script? > I'd be happy to draft a script file for review.
For the general case, you may want to suggest that the maintainer include instructions about this in each upgrade notice, but nothing should be done in the package as it assumes too much about users' environments. For example: what if their default shell/s is/are not bash, or they don't already have a .bashrc, and shouldn't you do that setup in whatever their shell profile is, if they have one, and what if they don't; what if Pageant or Cygwin don't use Cygwin /tmp/ but some other TMPDIR e.g. Windows ~/AppData/Local/Temp/; what if your users run ssh from cmd without starting Cygwin; etc.? You may do what your users allow you on their systems, but you have to ensure that your Putty/Pageant and ssh setup additions work flawlessly on all of them, coordinating between what you do for Pageant and what you do for ssh. You may want to consider doing whatever is required in each user's ssh_config if possible, or /etc/ssh_config to provide users defaults, as those depend least on each user's environment. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple