<p>I see. Well... I hadn't had any problems with it.</p>

<p>I tried your script and with slight changes it works well under a regular user. Full setup:</p>

<pre><code>sudo -i
cat > /usr/bin/geany-stdin << "EOF"
#!/usr/bin/env bash

TMPFILE=$(mktemp -p ~)
trap 'rm -f "$TMPFILE"' exit
cat - > "$TMPFILE"
geany $@ "$TMPFILE"
EOF
chmod +x /usr/bin/geany-stdin
exit

ls -l | geany-stdin
</code></pre>

<p>gksudo is another matter but I can work around it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/780#issuecomment-160250999">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ4m3qPJYB3U6RacuFOHQUrLAub8Rks5pKTZHgaJpZM4GqokY.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/780#issuecomment-160250999"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>