Script failing to start application with 'open'
I'm trying to get an application to start once SD! has finished a backup, and having some problems getting it working.
I've set a shell script to be run once the backup completes, and it executes open -b org.me.myappid to try to start the application. This works fine if I execute the shell myself. However when SD! runs the script, it looks like open can't find the application. I get the following in the log: open[2502] Couldn't launch application: (null) As far as I understood it, open calls launch services to start applications, so I don't see why it would be able to find the application in an interactive shell, and not in the shell SD! starts. Any ideas? |
Not sure why that would fail, tegg -- we run the script authenticated, though, and perhaps "root" can't do that.
Try launching with the path instead. |
I think I worked at what is wrong here.
I was trying to avoid passing a full path to open, and we have a couple of users here and I was trying to create something flexible. Looks like the launch servcies databases are per-user, (or at least root has a different one), so open couldn't find the application as the LS DB never gets updated for root. I fixed this by changing the open... line to sudo -u $USER open..., and it looks like its working now Pete |
Ah, good idea -- that'll certainly work! :-)
|
All times are GMT -4. The time now is 04:49 AM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.