Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I created the following "Run Shell Script" service in Automator under Mac OS X Lion 10.7.4:

export DISPLAY=:0
/usr/X11/bin/xterm -title "Kevin's Xterm" -sb -sl 500000 -geometry 150x25 &

and created a keyboard shortcut to it. If I invoke this service twice, once from Automator-->Run and once from my keyboard shortcut, I get two xterms which appear identical but behave differently. Specifically, the following command fails with "permission denied" in the keyboard shortcut xterm but succeeds in the Automator-->Run xterm:

bash> mkdir /usr/local/testdir

The "id" command produces identical output in both xterms.

It would seem that the Automator-->Run xterm is behaving correctly, as it agrees with the behavior of Terminal.

Is there a way to make services behave identically (and correctly) regardless of their method of invocation?

Thanks, Kevin

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.