Page 1 of 1

Phoenix CE - Connection check at launch

Posted: Thu 24 Jan 2008, 02:23
by ecomoney
Something I remember about internet explorer on windows (all those years ago) is that if an active internet connection was not found then a dialog box would come up and ask you if you wanted to configure your internet connection, or continue to work offline. When watching new users try puppy for the first timeI notice that as soon as puppy boots, they try going on the net using seamonkey, and the local launch page shows. They click on one of the links and the browser displays "page cannot be displayed" as they have not run the internet connection wizard as yet.

I believe it would make puppy a lot more friendly if a check for internet connectivity be made before starting the browser (and other applications that require an internet connection) and if one is not present, offer the user a choice to work offline or run the internet connection wizard. There are already several scripts called "defaultbrowser" and such which could be modified to run this?

How would this effect performance (perhaps with a test like "ping www.google.co.uk" ?).

connection check

Posted: Mon 11 Feb 2008, 14:46
by ecomoney
I have heard that puppy is one of the few linuxes that does not autoconnect via ethernet at startup. Even windows does this.

Recently, this was reported in a very fair review of puppy

http://happylinuxthoughts.blogspot.com/ ... eview.html

Puppy is so "nearly there" I could scream sometimes. This is one of the no-brainers that would really help the "linux newbs" when they first try puppy. I know a lot of people like puppy becuase it doesnt do things automatically that may compromise security when run as a live-cd, this way people have their cake and eat it!

Posted: Mon 11 Feb 2008, 15:17
by changturkey
I agree. We need more KDE puppys too.

Posted: Mon 11 Feb 2008, 21:22
by cthisbear
" I have heard that puppy is one of the few linuxes that does not autoconnect via ethernet at startup. Even windows does this. "

Hacao's first effort connected....but he never replied as to whether the firewall mounts as well.

PC Puppyos also connects...but has to install the firewall?
Send them both a PM.

Best I can do.....Chris

http://www.pcpuppyos.com/

Email: friedsonjm@yahoo.com

http://puppylinux.org/wikka/Hacao

Posted: Mon 11 Feb 2008, 21:27
by alienjeff
@changturkey:
Please read post subject line and subject description. KDE is off-topic.

@ecomoney/assembled multitude:

Three schools of thought:

1) leave "Connect" system as-is, or

2) automatically check for Internet connection, if none exist, offer option to configure, or

3) mimic M$ and wait for user to attempt to access Internet before any options are called and offered.

My vote is for #2 immediately after desktop is running.

Posted: Mon 11 Feb 2008, 22:11
by changturkey
Sorry, but since we were on the topic of making puppy more newbie friendly, I wanted to add the KDE bit in there. I agree, we need option #2, it surprised me that Puppy does not auto-connect at the start, and that it is "backgrounded".

Posted: Tue 12 Feb 2008, 05:23
by Lobster
:) Puppy has not auto connected to the Internet because this slows boot time. The boot time obsession is a developer issue that other distros have long left behind.

The firewall should be turned on by default (all it does is disable ports that are not in use) as this can be turned on from the install wizard.

During the boot process ethernet connections are detected and I believe wifi hardware drivers too?

By running the wizards that control the connection
and then running 'kp running processes', you will get an idea of the programs locations . These can be added to the start up script on first run, preceded by check of a log file where settings can be stored. Where are the settings stored once firewall and connection are configured?

Sorry if all this is obvious. :)

Posted: Wed 13 Feb 2008, 04:31
by Pizzasgood
PC Puppyos also connects...but has to install the firewall?
The first version or two didn't ship with the firewall enabled. When somebody pointed it out, I tweaked things a little so the firewall would be preset.

It's pretty easy really. Just run the firewall wizard. That creates a script called /etc/rc.d/rc.firewall which sets up the firewall each boot. The only catch is you need to set things up to run that script each boot. There are several ways to do this, but the simplest is to just put the lines in /etc/rc.d/rc.local (which is what the wizard does). However, putting things in that file is a no-no when it comes to making a custom Puppy, so instead I found the lines near the end of /etc/rc.d/rc.local0 that create the rc.local file if it doesn't exist, and I set them up to also append the firewall lines when they create the file. That way it can ship with no rc.local file (which is Puppy's standard behavior) but will still add those lines when it gets created. Also, this means if the user inadvertently deletes rc.local, when it is recreated the lines will be added again (so they don't lose the firewall without knowing it). Finally, since the lines are in rc.local, they're in the same place they are in all other Puppies, so the user knows where to find them if they need to disable them.

Also, those lines only launch the script if it exists and is executable. So I could set up a toggle script that just toggles the executable bit, and put an entry in with all the other toggles I added to the menu.

As for configuring the network, I took the easy way out. I just set up my computer with the wizard to auto-dhcp on boot, then found the file it creates as a flag and added that to the build-tree. This way it functions the same as if the user had used the wizard to set it to auto-dhcp.


Basically, I tried automating things while at the same time keeping them as close to how Puppy normally does those things as I could.



Another process you can use to automate things, in 3.xx anyways, is to set up a script in /etc/init.d that uses the 'start' parameter to start and the 'stop' parameter to stop. Then Puppy runs them automatically each boot, and you don't even need to modify Puppy's init scripts. To disable them, just unset the executable bits. It runs them before X starts though, so no X apps. I got around this by adding similar code to /root/.xinitrc that would run all executables in /etc/init.x in the same manner, except after X is running this time.

I don't know if 2.14R uses that (I figured out how to fix my old save file and am back in Pizzapup again), but it wouldn't be hard to port from 3.xx at all. Just grab the lines from /etc/rc.d/rc.local0 and /etc/rc.d/rc.shutdown from 3.01 and put them in similar spots in 2.14R's scripts, and add the /etc/init.d directory (and copy in the README file that's in 3.01 for good measure).

eth0mode

Posted: Wed 13 Feb 2008, 05:38
by raffy
Nice tips there, Pizza, about configuring the firewall using /etc/rc.d/rc.local0.
As for configuring the network, I took the easy way out. I just set up my computer with the wizard to auto-dhcp on boot, then found the file it creates as a flag and added that to the build-tree.
Yes, just grab the "eth0mode" file in /etc and add it when you remaster/rebuild the sfs.