![]() |
start clock app from terminal or script
How can the clock app be started from command line? "/usr/bin/worldclock" won't show up the clock gui, nor will "run-standalone.sh worldclock".
I want to put the command in an autostart-script: /etc/event.d/autostart: Code:
start on started hildon-desktop Code:
#!/bin/sh |
Re: start clock app from terminal or script
First: cooktimer is not worldclock ;)
Second: in general worldclock can be started via command line just like hou described (but you should detach with a trai'ing ampersand '&') Third: is your script executable? [chmod +x ...] Fourth: / is not a comment, exchange with # try once more |
Re: start clock app from terminal or script
Cooktimer is just something else he wants to have at startup (used as example I guess)
I am afraid Rasmarc is not lucky enough to have CSSU-testing or the worldclock replacement installed. The default worldclock is not a standalone executable, but a shared object. It cannot be launched as a standard executable. This should do the trick: Code:
dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"worldclock" |
Re: start clock app from terminal or script
As Ade said, the autostart.sh script should launch worldclock and cooktimer. And with the provided code everything works fine as long as the script ist started from a terminal (worldclock is launched and the script is detached after cooktimer is launched).
Code:
#!/bin/sh Seaching brought me to this thread: Run script on startup with access to dbus session bus... but i don't know if the problem there is similar. :o I cannot install the worldclock replacement. The application manager doesn't list it and installing by launching the .deb file is refused because of incompatibility. |
Re: start clock app from terminal or script
Is it not better to make a upstart script instead of triggering a script with upstart.
http://upstart.ubuntu.com/cookbook/ |
Re: start clock app from terminal or script
Quote:
So i would like to know either how to get access to the relevant dbus session (i guess :confused:) or how to get the clock replacement installed (in fact i'm interested in both). |
Re: start clock app from terminal or script
Tested the dbus command and it works fine when executed as root (and also as 'su user -c ...', so no idea. I did not test to execute it as service.
About worldclock installment: please read from here and download the deb, extract it and simply replace /usr/bin/worldclock. Should do the trick. --edit just checked with file in /etc/event.d and indeed it fails with "Failed to open connection to "session" message bus: (null)" But simply preceeding with run-standalone.sh works. Quote:
|
Re: start clock app from terminal or script
Solved, many thanks. Just an ampersand was missing again at the end of the line in order to get subsequent lines executed. And if there's more than one command the lines "script" and "end script" must be inserted. Finally I copied the clock replacement. :cool:
|
Re: start clock app from terminal or script
Quote:
Quote:
True. But then you do not need the 'exec' anymore. :p So in above script there should not be the need for ampersands. Except you call a full binary directly. As this line would wait for termination of that binary (). |
Re: start clock app from terminal or script
If a script is triggered no ampersand is needed in /etc/event.d/autostart:
Code:
start on started hildon-desktop Code:
#!/bin/sh Without a triggered script /etc/event.d/autostart looks like this: Code:
start on started hildon-desktop 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. |
All times are GMT. The time now is 13:02. |
vBulletin® Version 3.8.8