Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

auto-start application

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


mike at mbdatasystems

May 15, 2008, 8:15 AM

Post #1 of 4 (3532 views)
Permalink
auto-start application

Trying to figure out a good way to auto-start an application when the Nokia
N800/N810 running (OS2008) boots up.



Is there an easy way to accomplish this?



Any suggestions would be greatly appreciated.

Thanks


newmans at sonic

May 15, 2008, 8:41 AM

Post #2 of 4 (3375 views)
Permalink
Re: auto-start application [In reply to]

Not everything applies to the tablets but close enough:

http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html


Michael D. Boulanger wrote:
> Trying to figure out a good way to auto-start an application when the Nokia
> N800/N810 running (OS2008) boots up.
>
>
>
> Is there an easy way to accomplish this?
>
>
>
> Any suggestions would be greatly appreciated.
>
> Thanks
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


mike at mbdatasystems

May 16, 2008, 7:33 AM

Post #3 of 4 (3364 views)
Permalink
RE: auto-start application [In reply to]

I went ahead and installed 'gainroot' on the Nokia, and used vi to edit the
following startup file:

/etc/osso-af-init/real-af-base-apps

At the end of the file, I added a line to run the application:

/usr/bin/application-name

This seems to work great in general, but I'm observing an odd behavior that
doesn't make much sense to me - but maybe someone else can explain and/or
offer another solution.

If I'm at the Nokia's desktop, plug the unit into the charger, and hit the
power button to turn the Nokia off, a black screen comes up with the word
'Charging' with an animated battery icon. BUT, after a few seconds, the
application I am trying to auto-start pops up onto the screen, but is
unresponsive (the touch screen does not work).

Anyone have any idea why this is happening?

Thanks!!



-----Original Message-----
From: Sarah Newman [mailto:newmans [at] sonic]
Sent: Thursday, May 15, 2008 11:41 AM
To: Michael D. Boulanger
Cc: maemo-developers [at] maemo
Subject: Re: auto-start application

Not everything applies to the tablets but close enough:

http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html


Michael D. Boulanger wrote:
> Trying to figure out a good way to auto-start an application when the
Nokia
> N800/N810 running (OS2008) boots up.
>
>
>
> Is there an easy way to accomplish this?
>
>
>
> Any suggestions would be greatly appreciated.
>
> Thanks
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


maemo at beermad

May 17, 2008, 3:16 AM

Post #4 of 4 (3339 views)
Permalink
RE: auto-start application [In reply to]

On Saturday 17 May 2008, maemo-developers-request [at] maemo wrote:

> Message: 7
> Date: Fri, 16 May 2008 10:33:52 -0400
> From: "Michael D. Boulanger" <mike [at] mbdatasystems>
> Subject: RE: auto-start application
> To: <maemo-developers [at] maemo>
> Message-ID: <000801c8b761$dd1300e0$973902a0$@com>
> Content-Type: text/plain; charset="us-ascii"
>
> I went ahead and installed 'gainroot' on the Nokia, and used vi to edit the
> following startup file:
>
> /etc/osso-af-init/real-af-base-apps
>
> At the end of the file, I added a line to run the application:
>
> /usr/bin/application-name
>
> This seems to work great in general, but I'm observing an odd behavior that
> doesn't make much sense to me - but maybe someone else can explain and/or
> offer another solution.
>
> If I'm at the Nokia's desktop, plug the unit into the charger, and hit the
> power button to turn the Nokia off, a black screen comes up with the word
> 'Charging' with an animated battery icon. BUT, after a few seconds, the
> application I am trying to auto-start pops up onto the screen, but is
> unresponsive (the touch screen does not work).
>
> Anyone have any idea why this is happening?
>

Looking at the file you've edited, it appears to be run at startup and
shutdown (which is why it's got the "case" structure dependent on $1)

So what's happening is that the script is evaluating a "stop" argument,
running what's relevant to it, then after it finishes what's within
the "case" structure (which ends with "esac") it's running your program,
because you've put it in at the end of the file.

Unless your program is backgrounding itself, nothing else is going to happen
until it stops. But because of where you've put it, it will run even on
shutdown.

Ideally you ought to have your own init script for the program, which should
be in /etc/init.d, symlinked into the various rc directories. It will need
commands to start and stop the program as appropriate (I usually find it
easier to copy an existing init file and adapt it rather than trying to write
my own from scratch.)

Don't forget that the startup script needs to background the process it starts
(otherwise it'll block the rest of the system initialisation) and it needs to
exit with a zero return code to ensure the init process continues OK.

--
Tony Green
Ipswich, Suffolk, England
http://www.beermad.org.uk
http://no2id-ip.web-brewer.co.uk

** This message is digitally signed. If your email client is unable to read
digital signatures, you may see an attachment that you cannot open. See
http://www.gnupg.org/(en)/documentation/faqs.html for more information.
You can validate my PGP key from my website: http://www.beermad.org.uk/
* No Micro$oft products were used in the generation of this communication
--
Tony Green
Ipswich, Suffolk, England
http://www.beermad.org.uk
http://no2id-ip.web-brewer.co.uk

** This message is digitally signed. If your email client is unable to read
digital signatures, you may see an attachment that you cannot open. See
http://www.gnupg.org/(en)/documentation/faqs.html for more information.
You can validate my PGP key from my website: http://www.beermad.org.uk/
* No Micro$oft products were used in the generation of this communication
--
Tony Green
Ipswich, Suffolk, England
http://www.beermad.org.uk
http://no2id-ip.web-brewer.co.uk
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.