LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-27-2006, 09:19 AM   #1
HiIamBill
LQ Newbie
 
Registered: Jul 2006
Distribution: Kubuntu, Slackware, DSL
Posts: 24

Rep: Reputation: 15
Using a X11 script to connect to the network.


Hello. I've been trying to cutdown my boot time with Linux and so far I've done so, significantly. Unfortunately, probably about 60% of boot time is connecting to my network. I was wondering rather than that happening on boot, if I could make it happen after my X Window Manager loads. That way I can open any noninternet apps I want while it connects to the network and cut the boot time down, a lot. Is this possible?

Thank.
 
Old 07-27-2006, 10:10 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I think it's possible. You would have to stop /etc/rc.d/rc.inet1(the script that starts your network) from running at boot and write a little script to start it when your window manager starts. rc.inet1 is run from /etc/rc.d/rc.M during boot. Look at lines 56 through 61 of rc.M in the current version of slackware; that's what runs rc.inet1. If you comment those lines out, the network won't start at boot.
Starting it with your window manager is more problematic since rc.inet1 can only be run by root and window manager startup scripts generally do not run with root privileges. Having things startup with your window manager(wm) also depends on which one you are using. The whole thing may result in your wm not coming up until the network comes up which would get you nowhere. Post back with some more details about which wm you are using.
 
Old 07-27-2006, 12:22 PM   #3
HiIamBill
LQ Newbie
 
Registered: Jul 2006
Distribution: Kubuntu, Slackware, DSL
Posts: 24

Original Poster
Rep: Reputation: 15
The newest version of KDE.

I see what you're saying about the problems. What about kwifimanager? Can that be set to connect to the network as soon as it opens? I know I can have that start up with the windows manager.
 
Old 07-27-2006, 05:13 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I don't think that's the right approach. I've fooled around a little bit and I think this will work. First comment out those lines in /etc/rc.d/rc.M (lines 56 through 61) by putting a "#" in front of each line. Reboot and confirm that the network was not brought up. This will confirm that did the first step right. Now you can manually bring up your network by opening a console, su to root and run:

# /etc/rc.d/rc.inet1 start

Do this and confirm that your network comes up OK.

Now we want to get that command to run automatically every time you login to your gui. The best approach I can think of is to edit /etc/rc.d/rc.4 to automatically run that command. rc.4 is run everytime you go into graphical mode(run level 4). Make the following edit - right after you see the words:

# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."

,that's at lines 12 and 13, you should stick the following command so it winds up looking like this:

Code:
# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."

/etc/rc.d/rc.inet1 start &
Please note the final "&" at the end; it's extremely important. That backgrounds the task of bringing up the network and goes on to run the rest of the script which will bring up your graphical login screen while the network is being brought up in the background. Without that ampersand, the script will stop until the network is brought up which gets you nowhere.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. defa0009 Linux - General 15 02-18-2022 08:09 AM
Can't connect to X11 window server kofibull Linux - Newbie 10 06-16-2006 11:47 PM
X11 problem unable to connect anirudh Linux - Software 1 03-07-2005 03:29 PM
difficulty using ssh to connect to X11 remotely shortname Linux - Networking 6 03-05-2005 12:53 PM
Can't connect to X11 window server suresheva31 Linux - General 0 10-19-2004 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration