Phoenix CE - Connection check at launch

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Phoenix CE - Connection check at launch

#1 Post 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" ?).
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

connection check

#2 Post 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!
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

changturkey
Posts: 67
Joined: Sun 30 Dec 2007, 03:10

#3 Post by changturkey »

I agree. We need more KDE puppys too.

cthisbear
Posts: 4422
Joined: Sun 29 Jan 2006, 22:07
Location: Sydney Australia

#4 Post 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

User avatar
alienjeff
Posts: 2265
Joined: Sat 08 Jul 2006, 20:19
Location: Winsted, CT - USA

#5 Post 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.
[size=84][i]hangout:[/i] ##b0rked on irc.freenode.net
[i]diversion:[/i] [url]http://alienjeff.net[/url] - visit The Fringe
[i]quote:[/i] "The foundation of authority is based upon the consent of the people." - Thomas Hooker[/size]

changturkey
Posts: 67
Joined: Sun 30 Dec 2007, 03:10

#6 Post 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".

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#7 Post 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. :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#8 Post 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).
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

eth0mode

#9 Post 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.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

Post Reply