Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Runlevel After Login
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
inx
n00b
n00b


Joined: 07 Aug 2004
Posts: 3

PostPosted: Sat Aug 07, 2004 3:24 pm    Post subject: Runlevel After Login Reply with quote

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
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Sat Aug 07, 2004 4:59 pm    Post subject: Reply with quote

You could alter the depend function in the service's init script to contain
Code:
need xdm
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Sat Aug 07, 2004 5:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Sun Sep 05, 2004 6:40 am    Post subject: ok Reply with quote

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
View user's profile Send private message
inx
n00b
n00b


Joined: 07 Aug 2004
Posts: 3

PostPosted: Thu Sep 16, 2004 11:25 pm    Post subject: Reply with quote

Thanks for the reply. I have done quite as
you have suggested and I am pretty satisfied with it.
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Fri Sep 17, 2004 3:40 am    Post subject: glad Reply with quote

glad i helped :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum