Another place to hold autostart script is in /etc/xdg/autostart. You can follow 
the format of existing autostart files to create a new one.
As for 1st way I mentioned, usually you need add a sleep before your daemon, 
such as
(sleep 30; daemon) &
I have use this way to trigger automatic testing.
________________________________
From: Bob Lin [mailto:smile2...@gmail.com]
Sent: 2009年10月27日 14:49
To: Wang, Jing J
Cc: dev@moblin.org
Subject: Re: [Moblin Dev] How to launch daemon automaticly?

Thanks for your suggestions.
The key point is the timing to launch the daemon.
I tried 1st way and found the my script in /etc/X11/xinit/xinitrc.d/ crashed. 
But it can work if I manually launch it after X is up.
It seems the script in /xinitrc.d/ is launched before X is totally up.
I don't want the daemon to talk with X, is there a easier way?
2009/10/27 Wang, Jing J <jing.j.w...@intel.com<mailto:jing.j.w...@intel.com>>
It is not easy if your daemon will talk with X. Not clear about your usage 
model, two workarounds for your reference. Pleas note, both potentially has 
security issue.
1. Update user to "root" in /etc/sysconfig/uxlaunch. It makes X startup with 
root. Put your daemon script in /etc/X11/xinit/xinitrc.d/.
2. sudo to launch your daemon after modify default user as NOPASSWD in 
/etc/sudoer



-----Original Message-----
From: dev-boun...@moblin.org<mailto:dev-boun...@moblin.org> 
[mailto:dev-boun...@moblin.org<mailto:dev-boun...@moblin.org>] On Behalf Of Bob 
Lin
Sent: 2009年10月27日 11:58
To: dev@moblin.org<mailto:dev@moblin.org>
Subject: [Moblin Dev] How to launch daemon automaticly?

Hi All

I'd like to launch a daemon program as root after X window is up. What
should i do?
Besides, there must be a way to login as root in runlevel 5, what should i
do ?

Thansk,
Bob
_______________________________________________
Moblin dev Mailing List
dev@moblin.org<mailto:dev@moblin.org>
To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on 
http://moblin.org<http://moblin.org/> once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

_______________________________________________
Moblin dev Mailing List
dev@moblin.org

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to