View previous topic :: View next topic |
Author |
Message |
inx n00b
Joined: 07 Aug 2004 Posts: 3
|
Posted: Sat Aug 07, 2004 3:24 pm Post subject: Runlevel After Login |
|
|
Is there a way to push some services into some sort of
background runlevel which starts services in background
after the login screen (console/xdm) appears? |
|
Back to top |
|
|
Voltago Advocate
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Sat Aug 07, 2004 4:59 pm Post subject: |
|
|
You could alter the depend function in the service's init script to contain
|
|
Back to top |
|
|
guitou Guru
Joined: 02 Oct 2003 Posts: 534 Location: France
|
Posted: Sat Aug 07, 2004 5:11 pm Post subject: |
|
|
Just have a look at /etc/rc.conf : the end concerns automatic startup of X.
For general services, you should use Code: | rc-update add <service-name> <runlevel> | ...with runlevel like default or boot. And for user dependent programs to be run, you will probably have to make changes in ~/.bashrc.
Have fun !.. |
|
Back to top |
|
|
syadnom Guru
Joined: 09 May 2002 Posts: 531
|
Posted: Sun Sep 05, 2004 6:40 am Post subject: ok |
|
|
you CANNOT use need xdm, as it will halt(actually loop) your system as XDM wont start until the gettys are up or unit init completes
BUT
what you can do, is create another runlevel
mkdir /etc/runlevels/postinit
remove anything you dont want to startup during init from default
rc-update delete foo default
copy EVERYTHING in /etc/runlevels/default into the new runlevel
cp /etc/runlevels/default/* /etc/runlevels/postinit/ -R
modify /etc/inittab and change runlevel 4 from 'default' to postinit
(this is cool, cause default is runlevel 3,4,and 5, with 4 and 5 not being used.
then, in your xdm, config, OR kde autoload whatever, just put a line in that says :
init 4
--
some reasons=
you must have everything that is in default in postinit (aka runlevel 4) BECAUSE when you switch from runlevel 3 (default) to runlevel 4 (postinit) anything that is NOT in postinit but IS in default will stop as if you had run '/etc/init.d/foo stop'
also, keep in mind that if an init script has a 'need foo' dep then it will be started reguardless of it being in that runlevel, so you could end up starting a lot of stuff during init anyway.
--
hope this helped.
--
by the way, i do get to a login prompt quite a bit faster, but getting to a usable desktop is not very much faster, and may not be worth the hack. BUT, keep in mind that if you comment out your 'init 4' command, you will go back to a normal system without any fance hacks.
--
and more....
if you want to add an init, you can
rc-update add foo postinit, as it is a real runlevel and gentoo's init will use it as such. also, having this extra runlevel will not effect your system in any other way, even if you decide not to use it, init wont call it unless you tell it to, so it is safe to leave it in /etc/runlevels reguardless. |
|
Back to top |
|
|
inx n00b
Joined: 07 Aug 2004 Posts: 3
|
Posted: Thu Sep 16, 2004 11:25 pm Post subject: |
|
|
Thanks for the reply. I have done quite as
you have suggested and I am pretty satisfied with it. |
|
Back to top |
|
|
syadnom Guru
Joined: 09 May 2002 Posts: 531
|
Posted: Fri Sep 17, 2004 3:40 am Post subject: glad |
|
|
glad i helped |
|
Back to top |
|
|
|