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 > Mac OS X > running programs in X11

running programs in X11
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2003
Status: Offline
Reply With Quote
Oct 5, 2003, 09:08 PM
 
I saw the recent post where suthercd said to use "/sw/bin/xmms &" to run xmms within X11... the way i do it is "cd /sw/bin; ./gaim" (to run gaim in this case of course). just wondering if there is a way to write a script or something to start x11 and run that command right from the dock (like URL's or something) i dont know apple script at all, just thought i would see if anyone here knew... thanks
     
Dedicated MacNNer
Join Date: May 2003
Location: Santa Barbara
Status: Offline
Reply With Quote
Oct 6, 2003, 10:14 AM
 
Try in the terminal: open-x11 /sw/bin/gaim

You can make a shell script:

Code:
#!/bin/sh open-x11 /sw/bin/gaim
Then "chmod +x thescript" and add the ".command" extension and put it in the dock.
     
Dedicated MacNNer
Join Date: Sep 2003
Location: Louisiana, US
Status: Offline
Reply With Quote
Oct 20, 2003, 11:45 AM
 
I did like it says above, but I cannot add the icon to the dock. It will sit on the right side of the dock seperator, but not the left. and when I click it, SimpleText pops up, not the program I am trying to start (gimp). If I run the script from a terminal, the gimp starts up no prob. what am I doing wrong?
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Oct 21, 2003, 08:37 AM
 
If I understand what you are doing, your icon represents the executable shell script. The icon does not represent a clickable application. It is a text file that runs when executed via the Terminal of X11 xterm window. Those apps provide an interactive link to the Unix commands. If you want an icon that you can click on to execute the commands, you will need to use someething like applescript to create an application. You can learn how to write a simple applescript that will call the shell command.

Craig
     
Mac Enthusiast
Join Date: Aug 2001
Status: Offline
Reply With Quote
Oct 21, 2003, 08:55 AM
 
Here's some info at apple dev center that demonstrates creating a cocoa application to wrap around unix commands. Probably overkill for this application.
     
   
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:32 PM.
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