Advertisement
gedia

/etc/plasma/startup/10-agent-startup.sh

Jan 23rd, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. # Agents startup file
  2. #
  3. # This file is sourced at Plasma startup, so that
  4. # the environment variables set here are available
  5. # throughout the session.
  6. #
  7. # Uncomment the following lines to start gpg-agent
  8. # and/or ssh-agent at Plasma startup.
  9. # If you do so, do not forget to uncomment the respective
  10. # lines in PLASMADIR/shutdown/agent-shutdown.sh to
  11. # properly kill the agents when the session ends.
  12. #
  13. # If using gpg-agent for ssh instead of ssh-agent, a GUI pinentry program
  14. # must be selected either with eselect pinentry or adding an entry to
  15. # $HOME/.gnupg/gpg-agent.conf such as "pinentry-program /usr/bin/pinentry-qt4".
  16. #
  17. # pinentry-curses or pinentry-tty will not work because the agent started here
  18. # is in a different tty than where it is used, so the agent does not know where
  19. # to request the passphrase and fails.
  20.  
  21. GPG_AGENT=true
  22. #SSH_AGENT=true
  23. SSH_AGENT=gpg # use gpg-agent for ssh instead of ssh-agent
  24.  
  25. if [ "${GPG_AGENT}" = true ]; then
  26. if [ -x /usr/bin/gpgconf ]; then
  27. gpgconf --launch gpg-agent >/dev/null 2>&1
  28. if [ $? = 2 ]; then
  29. eval "$(/usr/bin/gpg-agent --enable-ssh-support --daemon)"
  30. fi
  31. fi
  32. fi
  33.  
  34. if [ "${SSH_AGENT}" = true ]; then
  35. if [ -x /usr/bin/ssh-agent ]; then
  36. eval "$(/usr/bin/ssh-agent -s)"
  37. fi
  38. elif [ "${SSH_AGENT}" = gpg ] && [ "${GPG_AGENT}" = true ]; then
  39. if [ -e /run/user/$(id -ru)/gnupg/S.gpg-agent.ssh ]; then
  40. export SSH_AUTH_SOCK=/run/user/$(id -ru)/gnupg/S.gpg-agent.ssh
  41. elif [ -e "${HOME}/.gnupg/S.gpg-agent.ssh" ]; then
  42. export SSH_AUTH_SOCK=${HOME}/.gnupg/S.gpg-agent.ssh
  43. fi
  44. fi
  45.  
  46. # Uncomment the following lines to start rxvt-unicode which has the ability to
  47. # run multiple terminals in one single process, thus starting up faster and
  48. # saving resources.
  49. # The --opendisplay ensures that the daemon quits when the X server terminates,
  50. # therefore we don't need matching lines in agent-shutdown.sh.
  51.  
  52. #if [ -x /usr/bin/urxvtd ]; then
  53. # /usr/bin/urxvtd --opendisplay --fork --quiet
  54. #fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement