X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fetc%2Fprofile.d%2Fenvironment.sh;h=9e4feef6a732f8c93227d01794737e7f3f3a86a6;hb=602a1874cc11a7d371890cdae4c0dc982267ea89;hp=d5c7e57f13f1fa5230270124bd1009cdf4de441a;hpb=4b3f043829a57215e1251122a8ab0019b717ca8d;p=distro-setup diff --git a/filesystem/etc/profile.d/environment.sh b/filesystem/etc/profile.d/environment.sh index d5c7e57..9e4feef 100644 --- a/filesystem/etc/profile.d/environment.sh +++ b/filesystem/etc/profile.d/environment.sh @@ -10,7 +10,8 @@ if [ -f $HOME/path-add-function ]; then path-add --end /snap/bin - for p in $HOME/.gem/ruby/*/bin; do + # ~/.local is newer, eg ruby 3.0+ + for p in $HOME/.gem/ruby/*/bin $HOME/.local/share/gem/ruby/*/bin; do path-add --ifexists --end $p done @@ -115,6 +116,18 @@ for _file in $(pgrep -a '^ssh-agent$' | sed -r 's/.*-a *([^ ]+).*/\1/'); do fi done +# in t11, user ssh-agent once again stopped working, it isn't started anymore +# by i3. So, enough is enough, I just made a service that will try to +# start it all the time for the user. If the var isn't set by the above, +# just set them to the values I know are in the service. +if ! test "$SSH_AUTH_SOCK"; then + if [ "$EUID" == 0 ]; then + export SSH_AUTH_SOCK=/run/openssh_agent + else + export SSH_AUTH_SOCK=/run/user/1000/openssh_agent + fi +fi + # background: # ubuntu has 002 for non-system users, debian has 022. 002 makes groups