PDA

View Full Version : how do I start x11's program?


chrislee8
Aug 13, 2004, 08:04 PM
so I installed this GIMP which run under(do I phrase it right?) X11.

so basically I have to start X11 first, then type something like /sw/bin/gimp & to start GIMP,

I want to make my own life just a little bit easier, how to I automate this process? by writing some kind of script?

Thanks

jsw
Aug 13, 2004, 08:18 PM
I installed the GIMP from here (http://gimp-app.sourceforge.net/) (Gimp.app), and it starts X11 for me. No scripts, no pain.

chrislee8
Aug 13, 2004, 08:19 PM
I have 10.2 Jaguar, GIMP.app doesn't support Jaguar!!!

thanks tho, plus, I guess I could do a little scripting to do that, I don't mind learnning a little bit on the scripting.

:)

jsw
Aug 13, 2004, 08:22 PM
I have 10.2 Jaguar, GIMP.app doesn't support Jaguar!!!

thanks tho, plus, I guess I could do a little scripting to do that, I don't mind learnning a little bit on the scripting.

:)Sorry! Guess I should have known that from other posts. Simple AppleScript ought to do it....

chrislee8
Aug 13, 2004, 08:26 PM
applescript, huh?

I am on it. thanks

jsw
Aug 13, 2004, 08:28 PM
Simple...

Open AppleScript editor, type in:

tell application "X11" to activate
delay 5
tell application "Gimp" to activate


That delay of 5 seconds might not be necessary. Plus, the Gimp app might be called something else for you. Anyway, save it as an application, then you can double click on it and off you go!

I'm pretty sure this'll work under Jaguar. It works under Panther. Let me know!

chrislee8
Aug 13, 2004, 09:14 PM
man, u should have told me in the first place!!

nah, just kidding, u've been great!, here was what i digged out:

tell application "X11"
activate
end tell

set results to do shell script "/sw/bin/gimp &"

I did save it as Application. and I put it in my dock, hahaha

now i need to give it a custom icon. hehe

thanks man

jsw
Aug 13, 2004, 09:17 PM
man, u should have told me in the first place!!

nah, just kidding, u've been great!, here was what i digged out:

tell application "X11"
activate
end tell

set results to do shell script "/sw/bin/gimp &"

I did save it as Application. and I put it in my dock, hahaha

now i need to give it a custom icon. hehe

thanks man
Hey, sorry! I posted back within six minutes ;) - just had to make sure it worked. Sorry to make you look up the "do shell script" part. Just curious: is the "set results to" part required?

chrislee8
Aug 13, 2004, 09:19 PM
to my 6 minutes lookup knowledge, yes, set result seem to be required, because applescript won't do 'do shell script' itself

if u want to do 'do shell script' alone, u need project builder, which I will do next because I want a custom icon.

jsw
Aug 13, 2004, 09:22 PM
to my 6 minutes lookup knowledge, yes, set result seem to be required, because applescript won't do 'do shell script' itself

if u want to do 'do shell script' alone, u need project builder, which I will do next because I want a custom icon.
Ah. 'do shell script "...whatever.."' works in Panther, just in Script Editor. No need for the first part. Nice improvement. Regardless, I'm glad you got it to work!