• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: X11 and do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X11 and do shell script


  • Subject: Re: X11 and do shell script
  • From: Laine Lee <email@hidden>
  • Date: Sat, 27 Nov 2004 01:55:48 -0600

Title: Re: X11 and do shell script
Consider this. If you save it as an app bundle, you can even add an icon.

property tmpfile : "/tmp/execme"
set theShellScript to "export DISPLAY=:0;source /sw/bin/init.sh; /sw/bin/gimp-2.0 &"
tell application "X11" to activate
repeat
    tell application "Finder"
        set processlist to get name of every process
        if processlist contains {"x11"} then
            set _active to true
            exit repeat
        else
            set _active to false
            delay 3
        end if
    end tell
end
repeat
do shell script
"echo " & quoted form of theShellScript & " > " & tmpfile
do shell script "chmod +x " & tmpfile
if _active then
    try
        do shell script tmpfile & space & "> /dev/null 2>&1  &"
    on error therr
        display dialog therr
    end try
end
if


From: Bernardo Hoehl

do shell script "/Applications/OpenOffice.org1.0.3/program/soffice"

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Network / AS query
  • Next by Date: Re: open file on another machine
  • Previous by thread: Re: X11 and do shell script
  • Next by thread: itunes 4.7
  • Index(es):
    • Date
    • Thread