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 Mission

Sorry, my server is down atm!Last edited by ecomoney on Mon 11 Feb 2008, 10:40; edited 1 time in total

I did some connection testing code for freshclam in pcPuppyOS, to make sure it waited until there was a connection to try updating (otherwise it would pop up an error message every two hours). This is what I did to make it wait:

But don't forget that people might want to run the browser to read an HTML file on their drive, in which case they don't care if there's a network connection yet. I think cb88 has the right idea here._________________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

can't you start a program from a browser? how about editing the connection error page to have relevant intructions or have it start up the net wizard if possible

Think about the security implications of that, javascript executing local code.

quirksmode wrote:

JavaScript cannot read files from or write them to the file system on the computer. This would be a clear security hazard

http://www.quirksmode.org/js/intro.html
The only way I can think of to do it that way would involve starting a web server to show the help page then you could use serverside scripting to do anything you like. This is a lot of overhead and opens an http port, so now you need a firewall. This reminds me that the local cups interface is automatically accessible over the network, users are currently not given any warning of this. I presume that the cups security model is reasonably well thought out.

You could include the check in the browser start script
show a dialogue box offering to start the net wizard and include a checkbox that says don't show this warning again._________________Will
contribute: community website, screenshots, puplets, wiki, rss

The one you used wouldn't run Seamonkey at all unless there was a connection.

Quote:

You could include the check in the browser start script
show a dialogue box offering to start the net wizard and include a checkbox that says don't show this warning again.

That would be even better.

Quote:

I think the main problem is that one have to explicitly call the network wizard. The network setup could be done automatically in many cases - surely not in all cases.

For most people, just having the boot process run dhcpcd eth0 (but with the extra options I never use) would get most people online. It would need to be run in parallel though, or it could really slow down the boot.

An issue with doing that is whether the user wants the machine to auto connect without permission. It wouldn't bother me much, but I know several people who wouldn't like that at all._________________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

First off, wouldn't it make more sense to export this code to a seperate script, so it could be called from any app startup script. That way it can easily be used for email and IM etc too.
Secondly, couldn't we be more verbose? Try and tell the user why their internet isn't up, not just that it's missing. We could check that there is an interface up, that it has an ip address, that there is a nameserver set, that the name server is accessable etc. That way we aren't dependent on google being up.
If no connection is found then offer to run the wizard, or display a list of results for the above tests, and offer generic solutions (check cables, run wizard, scream, the usual. )
I'm using my phone in a lecture ATM, but I'll have a play and maybe suggest some code this afternoon., when I get home.

This gets around the ping problem most of the time by using faster methods to determine if it is possible there is a connection first. It also checks that wireless devices are set up, so we have the option give a bit more advice on this slightly trickier area.

Youve seen my bash coding, so I hope you understand why I need a written "pseudocode" explaination of what seems to be the start of a very promising internet connection wizard

I have no idea of programming constructs in Bash, but I do know code needs to have "layers" and specific code for doing one thing kept in one place. This makes it easier for maintenence and legiability.

How would this routine be made into a subroutine/function/library (insert own preferred terminalogy here), say called ActivateConnection(), which returned a series of integer outcomes/return values/. That way the script for launching each application that requires the internet would read something like...

Select Case ActivateConnection()
Case ConnectionActivated
exec Seamonkey # or any other app needing the web
Case ConnectionNotRequired
exec Seamonkey # but not apps that have no function if offline (like Transmission)
Case ConnectionUnavailable
exit
End Case

This way the code for manageing the connection only needs to be programmed once, you never know what new and innovative ways people would have of connecting to the web in the future, this would mean that only one piece of code would be needed to be changed and kept updated.

One "achillies heel" I notice about the intended 2.14 base is that the internet connection is very difficult to find. There is an icon on the dektop (connect) that launches the connection wizard, but this would be obscured by the open seamonkey window. The user would most probably then click on the start menu, go on "internet connection" and try to run one of the wizards in their for modem dialup or one of the other methids. The main (and recommended) method that people use to connect to the web if via an ethernet cable, secondly via usb and then thirdly via wireless. Perhaps pictures of these types of plugs (usb, ethernet and an arial) would be handy to make a very uninitiated user able to understand which type of connection they have._________________Puppy Linux's Mission

Line 39 tests if anything has been added to the list UP (note: I left in a debugging fudge, it should be 1, not 91. Now fixed in previous post) If it has then it tries to ping google.If this works then the script returns 0 (all ok. If not it offers to run the wizard.
If nothing has been added to the list then the script once again offers to run the script.
In both cases, when the script is offered a 'No' will return 1 (fail), or, for a 'yes', it will return the value returned by the connection script.

The end result is that if the Internet is found then 0 is returned. If the script can't find the inet, and nothing is done, then it returns 1. If the wizard is run, and succeeds then, with some luck (I haven't found time to test) a 0 is returned. If setup fails / is canceled then, once again, with luck, something other than 0 is returned.
The practicle upshot of this is that the existing 'exec sea monkey' could simply be replaced by '<script name> && exec seamonkey'
To allow offline mode all is needed is to call the script before calling seamonkey. This will cause the checks, and the offer of the setup dialog, then run seamonkey anyway.

The problem with having one single entity to run anything is that we need some way to know whether to run it in offline mode or not. I personally think it would be easier to leave than up to the individual launcher.
A basic template would be something like this (pseudo code)

Code:

#Setup lines here as usual

#Followed by this:
if <script from this thread>; then
#Returned 0, suggesting a connection
exec <application>
else
if [ ask if they want to run in offline mode ]; then
#They said yes
exec <application>
else
#They said no
exit
fi
fi

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum