I've been working on the issue with connecting a PC to the internet on the commandline for quite some time, and now I've got a working prototype: CLInet.

What it does:
It is a dialog-based tool chain (total size of all files is approx 30 KB) that allows you to set up a connection with a cable connection, wireless LAN connection, and dial-up with a modem. The tools create an executable script running the dial-up tools with generated configs so you can even start a dial-up without the need for CLInet itself. Later versions are supposed to be able to edit the config files of the router scripts (and wxdial).
Since I have only very limited possibilities here when it comes to testing everything, any help would be VERY appreciated, especially with the modem part.

Please remember that this thing is VERY brittle right now and still is cramped with bugs. I'll try to fix'em as good as I can, but bash scripting is totally new for me (I usually program GUIs in tcl/tk), so I'd welcome any helping hand.

Update:
I forgot to mention what I've tested so far *note to myself: don't throw stuff out to the crowd at 1:30 in the morning *
The system proved to work with:
- LAN connection
- WLAN and WEP encryption
- WLAN and WPA encryption
- WLAN and WPA2 encryption

It should work with:
WLAN and no encryption (I managed to get a connection to a public AP but I didn't have the necessary login data at hand to actually dial into the net)

It probably works with (but hasn't been tested yet):
- Modem connection

I'd appreciate any feedback about wether the connection types mentioned above do work with others or not, so I can fix these things first (if necessary) before going for the editor part.

That said ... fire it up!

UPDATES!!!
v 0.2: I moved the generated scripts and temporary config files to a temp folder in the user's home directory to avoid conflicts (and security issues) in a multi-user environment. Also fixed a few bugs with the connect2modem script so you can actually abort the whole process if necessary.

v 0.3: now runs under the GUI as well. Thanks for the idea with XDialog, aragon.

v 0.4: Fixed some bugs that came up with Puppy 4.31. Also changes the layout of the dialogs a bit so they are more compatible with both dialog and xdialog

v 0.5: Edited the start script according to aragon's proposal (I seriously totally forgot about that one xD). But I used -z $DISPLAY instead for checking out if X is running or not. Also re-enabled Xdialog for all scripts again after fixing some layout problems and fixed a serious flaw in the design; I added t message box that warns the user if there's no access point available (the former versions tried to run the script anyway).

v 0.6: CLInet now always opens in dialog mode only (on X, it opens in rxvt) because XDialog tended to catch error messages and put them into the temporary variables, screwing up the entire process.
Added the promised edit functions for router connections. You may set the connection to ad-hoc (directly between two computers) or Standard (connection over a router), as well as the driver mode for normal and hidden router SSIDs.

v 0.7: Added cross-reference links to the pppoe wizardtools. CLInet may now be used to configure DLS connections over modems as well. Also changed the layout from the main dialog box to make it fit the new features properly.

v.0.8: Added a rescan function for the case that there were no access points in range. Also replaced the echo message with a dialog messagebox to tell if the system successfully established a connection or not.

Nice idea! Since it's written using dialog, it will be trivial to make it also work with Xdialog. I'll try to make a chance to have a look at it -my first work ever with bash-scripting was to do some mods to a PPP modem setup tool, so I may have some old code which fits in there, if needed.

Sure! Go ahead!
I hope I added enough comments to the scripts so you don't get lost. Most of the stuff I used is heavily modified code from Puppy's modemwizard and the wireless LAN wizard. If you're familiar with that code, you'll feel like home.

i've now had time to test a little. Testbed: Dell Lattitude E6400, Puppy 4.31 (pfix=ram).

i've had some problems, so i couldn't test, if the connection would be set with success.

- /usr/sbin/clinet
as the combi of dialog/xdialog only makes sense if dialog is used on cli (no x) and xdialog within x - my opinion - this one is suboptimal, as it uses rxvt to launch, what would not work in cli.

@aragon:
For some reason, CLInet tends to crash on Puppy 4.31 at the moment (I wrote the tool on NOP 4.13). But I think I found the problem:
When breaking up the scan results from iwlist, CLInet now screws up because the option I used to determine the end of a cell (EXTRAS) now is on a different position, namely before the IE: list, therefore, the tool cuts the most important variable (namely the hardware encryption) away before it had been able to read it out.
The easiest - and ugliest - bugfix I came up with not was setting the ENDSEQ variable to a fixed value (I only have a few APs here, not enough to determine if value I chose value is accurate enough. I chose 24). The result is anything but pretty, but it does the job. I'm gonna do some tests and see what I can use to properly include all the EXTRAS and IE: values again instead of doing a shot in the blue.

UPDATE:
Looks like there are quite a few things I need to alter to get CLInet up and running under 4.31 now.
I altered the script for the router connection and added a filter for iw list to remove all unknown IEs from the output, and put a static value for the DIFFERECE variable needed to separate the cells from each other. I also changed the names for the generated dial-up scripts, they now use the name of the selected router for both the script and the config file. Is it possible that there is a bug with cp now? I could now copy the WPA2 template into the hidden CLInet directory (which is also created if missing now, I thought I had added that routine to the main script). Looks like cp doesn't like MAC adresses as filenames anymore.
Gonna make another patched dotpet as soon as I created the newest barebones iso here, it should take too long.

Okay, this is odd.
I'm testing CLInet on a freshly woof-generated Puppy 4.31 Live-CD, and even net-setup.sh seems to work there. It used to work on NOP 4.31 and NOP 4.13. I hope I didn't strip out too much, but I definitely know that the last things I'd ever strip out would be any drivers. Is this a bug in one of the packages used by woof and puppy 4.31 or what?

In a nutshell:
CLInet is a tool for the command line to generate dial-up scripts for wireless LAN connections, starts dhcp for both LAN and wireless connections once the connections are established, configures and launches the dial-up config for modem connection, and lets you edit dial-up scripts to make them suitable for ad-hoc and invisible wireless connections. Now it also works on a GUI by using XDialog.

Consider it a combination for the pupdial and the net-setup wizard, but for both the commandline and the GUI, and it's smaller than either of the other programs.

I think I do understant almost all of that but on a very primitive level.

what I asked was more like this:

What does one do with it apart from what you just descrbed. I got that part. the tech side of it.

I mean do you chat with people. Browse internet. Set up a server? Do survelliance of neighborhood. Manage Networks at your work..

Listen to internet radio. I mean what can it do socially or entertaining or communicating with others or what? Connecting two networks or what?
doing Tunneling or what? I kind of get the tech side of it but what is it for?
Just drop it if I made a fool of myself. _________________I use Google Search on Puppy Forum
not an ideal solution though

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