Normally daemon has a initialization script in /etc/init.d/ directory.
It can be run manually if needed - for example
Code:
sudo /etc/init.d/pulseaudio start
If daemon has to be initialized in startup, then a link to this script is put into startup initialisation directory - they are /etc/rc0.d/ ... /etc/rc6.d/ (number is for runlevel: 0-shutdown, 1-single-user mode, 2-normal operation, 3...5-not used in Ubuntu, 6-reboot).
Operation is determined by a name of the link - first letter determines the action (S-start, K-kill), following number (01-99) determines the sequence of these scripts in this directory.
For example btnx has startup file '/etc/rc2.d/S49btnx', which is linked to '/etc/init.d/btnx'
If some program has to be run in userspace with rights of a current user, then it can be doen by adding the command or script in session startup.
Bookmarks