{"id":1019,"date":"2011-03-17T18:00:31","date_gmt":"2011-03-17T22:00:31","guid":{"rendered":"http:\/\/www.braindeadprojects.com\/blog\/?p=1019"},"modified":"2011-03-25T17:27:17","modified_gmt":"2011-03-25T21:27:17","slug":"blast-you-pinentry","status":"publish","type":"post","link":"http:\/\/www.braindeadprojects.com\/blog\/what\/blast-you-pinentry\/","title":{"rendered":"Blast you, PinEntry!!!"},"content":{"rendered":"<p>Following a recent update to my <a title=\"Gentoo Linux\" href=\"http:\/\/gentoo.org\/\" target=\"_blank\">Gentoo<\/a> installation at work, I found myself pestered by <a title=\"Pin Entry\" href=\"http:\/\/www.gnupg.org\/\" target=\"_blank\">PinEntry<\/a> acting as my new <a title=\"Wikipedia - ssh-agent\" href=\"http:\/\/en.wikipedia.org\/wiki\/Ssh-agent\" target=\"_blank\">SSH Authentication Agent<\/a>. Formerly, I used the normal ssh-agent, as it&#8217;s console only and doesn&#8217;t steal focus on the terminal window I&#8217;m currently working in.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_1023\" aria-describedby=\"caption-attachment-1023\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/pinentry.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1023\" title=\"PinEntry\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/pinentry-300x237.png\" alt=\"\" width=\"300\" height=\"237\" srcset=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/pinentry-300x237.png 300w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/pinentry.png 526w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1023\" class=\"wp-caption-text\">Popups Must Die<\/figcaption><\/figure>\n<p>A quick look at the process-list shows why:<\/p>\n<blockquote><p>gillespiem@kovacs2 ~ $ ps axu | grep gpg-agent<br \/>\n30847 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ss\u00a0\u00a0\u00a0\u00a0 0:00 gpg-agent &#8211;daemon &#8211;enable-ssh-support &#8211;write-env-file \/home\/gillespiem\/.cache\/gpg-agent-info<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>The GPG-Agent is being run with the <strong><em>&#8211;enable-ssh-support <\/em><\/strong>flag. Here&#8217;s how you can turn it off if you&#8217;re using <a title=\"XFCE4\" href=\"http:\/\/www.xfce.org\/\" target=\"_blank\">XFCE4<\/a>:<\/p>\n<p>The script \/etc\/xdg\/xfce4\/xinitrc handles chosing the correct authentication agent at line 129:<\/p>\n<blockquote><p>129 # launch gpg-agent or ssh-agent if enabled.<br \/>\n<strong>130 ssh_agent_enabled=`xfconf-query -c xfce4-session -p \/startup\/ssh-agent\/enabled 2&gt; \/dev\/null`<\/strong><br \/>\n131 if test &#8220;$ssh_agent_enabled&#8221; != &#8220;false&#8221;; then<br \/>\n132\u00a0\u00a0\u00a0\u00a0 # if the user has pam_ssh installed, it will start ssh-agent for us, but<br \/>\n133\u00a0\u00a0\u00a0\u00a0 # of course won&#8217;t start gpg-agent.\u00a0 so, if ssh-agent is already running,<br \/>\n134\u00a0\u00a0\u00a0\u00a0 # but we want gpg-agent (and that&#8217;s not running yet) start gpg-agent<br \/>\n135\u00a0\u00a0\u00a0\u00a0 # without ssh support<br \/>\n136<br \/>\n<strong>137\u00a0\u00a0\u00a0\u00a0 ssh_agent_type=`xfconf-query -c xfce4-session -p \/startup\/ssh-agent\/type 2&gt; \/dev\/null`<\/strong><br \/>\n138\u00a0\u00a0\u00a0\u00a0 if test -z &#8220;$ssh_agent_type&#8221;; then<br \/>\n139\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if which gpg-agent &gt;\/dev\/null 2&gt;&amp;1; then<br \/>\n140\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssh_agent_type=gpg-agent<br \/>\n141\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else<br \/>\n142\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssh_agent_type=ssh-agent<br \/>\n143\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 fi<br \/>\n144\u00a0\u00a0\u00a0\u00a0 fi<\/p><\/blockquote>\n<p>To pass the first test (line 130), set ssh-agent to be enabled by running this (it only needs to be run once):<\/p>\n<p><em><strong>xfconf-query -n -t bool -c xfce4-session\u00a0 -p \/startup\/ssh-agent\/enabled -s true<br \/>\n<\/strong><\/em><\/p>\n<p>To pass the second test (line 137), set \/startup\/ssh-agent\/type to &#8230; well, pretty much anything will do, as it only tests that it&#8217;s a non-zero length string &#8211; I&#8217;m setting it to &#8220;ssh-agent&#8221;:<\/p>\n<p><em><strong>xfconf-query -n -t string -c xfce4-session\u00a0 -p \/startup\/ssh-agent\/type -s ssh-agent<\/strong><\/em><\/p>\n<p>If you&#8217;re currently in XFCE4, kill gpg-agent and restart XFCE. You&#8217;ll find when you return, ssh-agent will act as your SSH Authentication Agent, and gpg-agent will handle <a title=\"Mozilla Thunderbird Plugin\" href=\"http:\/\/enigmail.mozdev.org\/home\/index.php.html\" target=\"_blank\">GPG specific transactions.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following a recent update to my Gentoo installation at work, I found myself pestered by PinEntry acting as my new SSH Authentication Agent. Formerly, I used the normal ssh-agent, as it&#8217;s console only and doesn&#8217;t steal focus on the terminal window I&#8217;m currently working in. &nbsp; A quick look at the process-list shows why: gillespiem@kovacs2 &hellip; <a href=\"http:\/\/www.braindeadprojects.com\/blog\/what\/blast-you-pinentry\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Blast you, PinEntry!!!<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1019","post","type-post","status-publish","format-standard","hentry","category-what"],"_links":{"self":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1019"}],"collection":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/comments?post=1019"}],"version-history":[{"count":15,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1019\/revisions"}],"predecessor-version":[{"id":1054,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1019\/revisions\/1054"}],"wp:attachment":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/media?parent=1019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/categories?post=1019"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/tags?post=1019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}