Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    Hi all;

    How can I start my application automatically on MeeGo device boot

    thank alot

  2. #2
    Nokia Developer Moderator achipa's Avatar
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327
    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.

  3. #3
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    Quote Originally Posted by achipa View Post
    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.
    thank a lot achipa for your replay, but I am a new for MeeGo and Linux. is there any help about init.d script.

    Thanks a lot, and I am sorry if my question is noob.

  4. #4
    Nokia Developer Moderator achipa's Avatar
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327
    Here's an example: http://pastebin.com/sYrq4ss6

  5. #5
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    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.

  6. #6
    Nokia Developer Moderator gnuton's Avatar
    Join Date
    Mar 2009
    Posts
    1,024
    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".

  7. #7
    Nokia Developer Moderator achipa's Avatar
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327
    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.

  8. #8
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    Quote Originally Posted by gnuton View Post
    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".
    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

  9. #9
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    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

  10. #10
    Registered User mabdelaal's Avatar
    Join Date
    Jan 2010
    Posts
    32
    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.

Similar Threads

  1. How to start Application on boot up of your mobile device?
    By girishsahare in forum Symbian C++
    Replies: 2
    Last Post: 2008-04-25, 15:13
  2. Auto Start app at device boot Up
    By Tasneem Rangwala in forum Symbian C++
    Replies: 9
    Last Post: 2007-10-12, 16:09
  3. Issue with auto start app at device boot up for Symbian 9.1 OS
    By Shweta Jain in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 1
    Last Post: 2007-06-02, 13:56
  4. Auto Start app at device boot Up
    By Tasneem Rangwala in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 0
    Last Post: 2007-05-25, 11:48
  5. Replies: 1
    Last Post: 2007-05-17, 17:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved