Reply
Thread Tools
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#1
Hi Folks!

I guess I need a leading hand...

I would like to create a daemon for my small application and I wonder what could be the easiest and best way to create one that is runable at Maemo 5 and MeeGo.

I've found a example for Qt: http://doc.qt.nokia.com/solutions/4/qtservice

It seems very complicated to me and there is A LOT overhead for several other platforms like Windows. I wouldn't need all this confusing stuff. So, does anybody know a minimalistic version?

Here is a small, german example that "should" do the job: Link
Is this a good idea or is something important missing?

With booth, the minimalistic and the very complicated examples using QtService, I have the problem that I don't know how to start and register the daemon and how to package something like that.

What have I to mind targeting the debian based system Maemo and in contrast the fedora based system MeeGo?

And where should I place my executable in the best case?
/etc/init.d ?
/etc/event.d ?
/etc/rc2.d ?

I would like to run the service as user and to open a small database file as such. Have I to mind how my daemon is terminated to close the SqLite file correctly before the shutdown? Or will the Qt database driver do that itself correctly as soon as my daemon receives a kill signal?

I have only some experience to create a system service at windows xp using Microsofts .NET framework. (4 years ago) And what I have seen so far is quite different.

Matters were complicated further by the fact that the N900 is my first Linux device. So please have some sympathy and point me the best way to start. I'm currently feeling very confused.
__________________
I was a Qt Ambassador!

Please DONATE if you like my work!
It's the best way to motivate me to create more stuff for your Device.

Last edited by helex; 2011-05-11 at 18:22.
 
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#2
Maybe someone has a better example that covers more on your questions, but you can have a look at the SMSCON and its daemon.

For what's worth it works nicely in Maemo.

Get the sources from here
The script smscon_boot is placed in /etc/event.d/ and the executable in /opt/smscon/

Last edited by Saturn; 2011-05-11 at 19:43.
 

The Following User Says Thank You to Saturn For This Useful Post:
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#3
Thanks so far for your reply, Saturn. I have only looked a short time into the source. I got a new Lenovo IdeaPad today to try some MeeGo images. So I had not much time continuing my small project. But I guess this helps me a bit.

Is the source from you? So am I able to ask you if I have additional questions?
__________________
I was a Qt Ambassador!

Please DONATE if you like my work!
It's the best way to motivate me to create more stuff for your Device.
 
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#4
Originally Posted by helex View Post
Thanks so far for your reply, Saturn. I have only looked a short time into the source. I got a new Lenovo IdeaPad today to try some MeeGo images. So I had not much time continuing my small project. But I guess this helps me a bit.

Is the source from you? So am I able to ask you if I have additional questions?
New game!! nice..

digitalvoid is the developer of SMSCON and I do the Editor and test UI.

Ask and if I don't manage we can ask him
 

The Following User Says Thank You to Saturn For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:42.