|
|
How to remotely quit an application ?
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
So, here's my problem:
I'm using OmniFocus, which creates a lock file as long as the database file is open. The lock file is deleted once you quit the application.
If I'm on a different computer, and I want to access this database, I can't do so until OmniFocus running on the other computer has quit.
How can I remotely "quit" that OmniFocus instance w/o using a screen sharing app or Remote Desktop ?
I tried various versions of kill (kill -1, kill -3, kill -9), but they all basically crash OmniFocus, and don't shut it down gracefully. The lock file is never deleted, and unsaved changes are not saved (which is the worse part).
I tried AppleScript, but when I execute the script (tell application "OmniFocus" quit), it wants to quit OmniFocus on the computer I started the script from, not the remote computer.
I would really need some Unix based way of telling the app to quit in a normal and regular fashion. HOW ?
-t
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
In addition, is there a way to quit an application automatically when Fast User Switching is used to switch to a different user ? I only remember than WinSwitch was able to do that, but it's not Leopard compatible.
-t
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2001
Location: Earth
Status:
Offline
|
|
Try kill -TERM (but it's likely not going to work better than kill -1 (HUP))
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Maybe osascript -e 'tell application "OmniFocus" to quit' will work.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
Originally Posted by Chuckit
Maybe osascript -e 'tell application "OmniFocus" to quit' will work.
But if I run that script from a Mac A, how do I tell the script to quit the app on Mac B ?
-t
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Feb 2006
Status:
Offline
|
|
Try this - the poster seems to think this would require allowing remote Apple Events, but I'm not so sure that it would. Worth a try.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Originally Posted by turtle777
But if I run that script from a Mac A, how do I tell the script to quit the app on Mac B ?
-t
I assumed you were ssh'ed in for the kill commands. That was meant as an OS X-friendly alternative to kill.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
Originally Posted by Chuckit
Maybe osascript -e 'tell application "OmniFocus" to quit' will work.
Tried that, no dice. Some weird error message.
[iMac:~] turtle777% osascript -e 'tell application "OmniFocus" to quit'
2008-04-12 12:35:18.295 osascript[26414:807] Error loading /Users/turtle777/Library/ScriptingAdditions/24U Appearance OSAX.osax/Contents/MacOS/24U Appearance OSAX: dlopen(/Users/turtle777/Library/ScriptingAdditions/24U Appearance OSAX.osax/Contents/MacOS/24U Appearance OSAX, 262): no suitable image found. Did find:
/Users/turtle777/Library/ScriptingAdditions/24U Appearance OSAX.osax/Contents/MacOS/24U Appearance OSAX: mach-o, but wrong architecture
osascript: OpenScripting.framework - scripting addition /Users/turtle777/Library/ScriptingAdditions/24U Appearance OSAX.osax declares no loadable handlers.
I think the 24U Appearance OSAX is a third party app. Let me see if I need a new version.
-t
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
Installed the latest version of the 24U Appearance OSAX, still doesn't work.
I don't understand why 24U is even being called up.
-t
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status:
Offline
|
|
Ok, got it to work.
Had to disable this darn 24U script. Don't even know why I used it in the first place.
Logged in via SSH and then used
osascript -e 'quit application "OmniFocus"'
It did the job.
Thanks, guys.
-t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|