Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Double-click an icon to run a shell script (with X11 support)

Double-click an icon to run a shell script (with X11 support)
Thread Tools
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Nov 12, 2006, 02:53 AM
 
A colleague of mine has written a nice little shell script to do some stuff and he wanted to make it a double-clickable file so he could drop in his dock for quick access.

If you add the .command suffix to the file it will launch with Terminal.app. Bad because he wants it to launch with X11.

If you use Platypus it won't run the X11 stuff he calls in his script.

Basically in X11 he could open an xterm and execute his shell script altogether in one X11 application menu entry (and that actually works well), but he just really wants a dock icon.

Any suggestions? AppleScript? Is the X11 app scriptable?
     
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 12, 2006, 05:53 AM
 
Does launching his script with the open-x11 command help? ie Have the .command file run his script like: open-x11 the/path/to/the/script
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Nov 12, 2006, 08:03 AM
 
Yeah thanks, that works great.

In the meantime I came up with a rather simple solution that works as well. You can select the .command file to open using X11 instead of Terminal (Get Info > Open with...). Runs just fine.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:21 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2