Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User blackalik's Avatar
    Join Date
    Apr 2011
    Posts
    7
    I created file DataWatch.conf in directory /etc/init/apps for the app to lauch at startup, but the application does not autostart.

    The file content is:

    description "DataWatch demon startup script"
    author "me@gmail.com"
    stop on stopping xsession
    console none
    respawn
    respawn limit 3 300
    nice 2
    normal exit 0
    exec /usr/bin/aegis-exec -s -u user /opt/DataWatch/bin/DataWatch -background

    Also tried creating a script:
    #!/bin/sh
    /opt/DataWatch/bin/DataWatch -background
    in the directory "/etc/init.d"

    This didn't work either. What could be the problem?
    The files are created during the installation.
    Please, help!

  2. #2
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    Hi,

    To start applications at upstart you need to give the aegis credentials.

    You need to update the manifest.aegis file, added by qtcreator if your are using QTSDK for development with -

    <aegis>
    <request>
    <credential name="GRP::upstart" />
    <credential name="UID::user" />
    <credential name="GID::users" />
    <for path="/opt/DataWatch/bin/DataWatch" />
    </request>
    </aegis>

    If you are using scratchbox for dev, please put this file in debian folder with the file name as <pkgname>.aegis

    Hope this helps.

  3. #3
    Registered User blackalik's Avatar
    Join Date
    Apr 2011
    Posts
    7
    Not working..

    restok.conf after install:

    Package: datawatch
    Request:
    AID::.datawatch.
    UID::user
    GID::users
    CAP::net_raw
    CAP::net_admin
    CAP::dac_read_search
    CAP::fowner
    CAP::sys_ptrace
    Recover:
    +GRP::upstart
    +CAP::dac_override
    Object: /opt/DataWatch/bin/DataWatch

    "accli -I -p <pid of your application>" out:

    Credentials:
    UID::user
    GID::users
    CAP::dac_read_search
    CAP::fowner
    CAP::net_admin
    CAP::net_raw
    CAP::sys_ptrace
    AID::.datawatch.
    datawatch::datawatch

    But application don't start on boot. What's the problem? Please help!

  4. #4
    Registered User kusumk's Avatar
    Join Date
    Sep 2011
    Posts
    449
    In your /etc/init/apps/<app>.conf script

    can you modify the last line (or the exec line to be as)

    exec /usr/bin/aegis-exec -s -u user -l "exec /opt/DataWatch/bin/DataWatch.sh"

    and add

    /opt/DataWatch/bin/DataWatch.sh
    -----------------
    #!/bin/sh
    echo "Start My App On Boot"
    exec /opt/DataWatch/bin/DataWatch
    -----------------

    Hope this helps

  5. #5
    Registered User blackalik's Avatar
    Join Date
    Apr 2011
    Posts
    7
    The problem is solved:

    MyApp.desktop:

    description "MyApp startup script"
    author "MyApp"

    stop on stopping xsession

    console output
    respawn
    respawn limit 3 300
    normal exit 0

    exec /usr/bin/aegis-exec -s -u user -l "exec /opt/MyApp/bin/startup.sh"

    startup.sh:

    #!/bin/sh
    exec /opt/MyApp/bin/MyApp -background

    manifest.aegis:

    <aegis>
    <request>
    <credential name="UID::user" />
    <credential name="GID::users" />
    <for path="/opt/MyApp/bin/MyApp"/>
    </request>
    <request>
    <credential name="UID::user" />
    <credential name="GID::users" />
    <for path="/opt/MyApp/bin/startup.sh" />
    </request>
    </aegis>


    Thanks!

Similar Threads

  1. Autorun After installation, for Nokia E61
    By ibraheemJazba in forum Symbian C++
    Replies: 20
    Last Post: 2009-06-18, 16:11
  2. Replies: 1
    Last Post: 2009-01-01, 16:34
  3. Autorun Application on Installation for Nokia N80
    By nital_shah in forum Symbian C++
    Replies: 57
    Last Post: 2008-07-08, 18:14
  4. Autorun Application on Installation for Nokia N80
    By nital_shah in forum General Development Questions
    Replies: 1
    Last Post: 2008-06-18, 07:48
  5. Autorun Application on Installation for Nokia N80
    By nital_shah in forum Symbian C++
    Replies: 2
    Last Post: 2008-06-18, 07:46

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