Thread: [Fremantle Maemo5] start clock app from terminal or script
View Single Post
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#10
If a script is triggered no ampersand is needed in /etc/event.d/autostart:
Code:
start on started hildon-desktop

script

sleep 30
exec su user -c "/home/user/autostart.sh"

end script
But in the triggered script:
Code:
#!/bin/sh

run-standalone.sh /usr/bin/worldclock &
sleep 1
run-standalone.sh /opt/cooktimer/cooktimer &
Otherwise subsequent lines will not be executed until the "blocking" application is closed.

Without a triggered script /etc/event.d/autostart looks like this:
Code:
start on started hildon-desktop

script

sleep 30
exec su user -c "run-standalone.sh /usr/bin/worldclock" &
sleep 1
exec su user -c "run-standalone.sh /opt/cooktimer/cooktimer" &

end script
The ampersands have to be added at the end. If put inside the quotation marks subsequent lines will not be executed even if the blocking application is closed.

If "exec..." is omitted the applications run as root even inside "script" / "end script" (at least on my N900).

Maybe there's something strange with my maemo installation. "ssh status and switcher" blocked my hildon status menu until I added an "&" to the relevant lines in the script, see this thread.
 

The Following 2 Users Say Thank You to rasmarc For This Useful Post: