Hi all;
How can I start my application automatically on MeeGo device boot
thank alot
Hi all;
How can I start my application automatically on MeeGo device boot
thank alot
You should put a standard init.d script in /etc/init/apps/ and that will be started by the system at boot. Unfortunately the SDK itself does not provide any special support for this, so you will have to take care about the proper packaging, etc.
Here's an example: http://pastebin.com/sYrq4ss6
Thanks alot achipa for your help
I try it, but it dose not work with me, I try the following files:
1- /etc/init/apps/meegostartonboot.conf
----------------
description "MeeGo Start On Boot"
author "AbdelAal"
normal exit 0
exec /usr/bin/aegis-exec -s -u user -l "exec /opt/MeeGoStartOnBoot/bin/meegostartonboot.sh"
--------------------
2- /opt/MeeGoStartOnBoot/bin/meegostartonboot.sh
-----------------
#!/bin/sh
echo "Start My App On Boot"
exec /opt/MeeGoStartOnBoot/bin/MeeGoStartOnBoot
-----------------
3- I called this script "/etc/init/xsession/app-precheck.sh" and there no errors printed
4- I called this script "start app/meegostartonboot" but it dose not work also
=====================
The application I tryed is gui widget application. Is the application must be console application or not?
I hope any one can help me. I am new for MeeGo and Linux and this feature is necessary in my application.
Hi,
Startup script in /etc/init/apps are started after official stuff is done so it allows you to run even X11 applications.
To test if your script works you can use: start apps/myapp (without .conf file).
Looking at your config file I noticed you don't have a stop rule. Please note it's not optional!
The one which fits your needs I think is this: "stop on stopping xsession".
Note that your application will be started *after* all the system services have finished booting, so expect at least a good minute of delay until everything settles down and the user/custom scripts get started.
Thanks alot gnuton and achipa for your help
I modifid the .conf file to be as the following:
-----------------
description "MeeGo Start On Boot"
author "AbdelAal"
stop on stopping xsession
normal exit 0
exec /usr/bin/aegis-exec -s -u user -l "exec /opt/MeeGoStartOnBoot/bin/meegostartonboot.sh"
-----------------
Then i call the script "start apps/meegostartonboot" then this message is printed on console "apps/meegostartonboot start/running, process 2236" but no thing happend, i searched on opened processes but the application is not opened. (Note that my device is N950)
What else i must do ??
Thanks
Finally it is working
I change the .conf file to call the application directly as the following:
-----------------
description "MeeGo Start On Boot"
author "AbdelAal"
stop on stopping xsession
normal exit 0
exec /usr/bin/aegis-exec -s -u user -l "exec /opt/MeeGoStartOnBoot/bin/MeeGoStartOnBoot"
-----------------
Also, I change the application to be Console application not GUI
Thanks alot achipa and gnuton for your help
Unfortunately there is another problem happened
when I start the application with "start app/meegostartonboot" or when the phone is restarted, the owner of the application process is "nobody". And because that I faild to connect my application with another application throw QLocalSocket. I received the signal "error" with error type "QAbstractSocket::SocketAccessError" which mean, as in Help, The socket operation failed because the application lacked the required privileges.
Any help plz, Thanks.