Clicking on the Net button instructs the Net client to toggle (open or close) the network link. One possible way to have Net open a dial-in link (e.g., ppp or term) is to use the program Dialer, which is included in the tkgoodstuff distribution, to dial your modem and set up the link. The client periodically checks whether the link is up or down, and displays a "lit" up-arrow and/or "Net up", or an "unlit" down-arrow and/or "Net down" accordingly. The client checks the line status more frequently for a while after it executes a command to open or close the link.
The Net client also can periodically issue a "ping" command which may be useful for keeping active a link that the remote host would disconnect if idle for too long.
I assume this is suitable for SLIP and term use as well.
Client NetTo set the variable XXXX to the value YYYY, in your ~/.tkgoodstuffrc, include the line:
set XXXX YYYYHere are the variables relating to Net and their default values (notes: (i) $XXX means: the value of our variable XXX; (ii) "$env(XXXX)" means: the value of the environment variable XXXX):
Variable | Function | Possible Values | Default |
---|---|---|---|
Net_nolabel | Omit the button label? | 1/0 | 0 |
Net_on | The command to open the link | any unix command | ppp-on |
Net_off | The command to close the link | any unix command | ppp-off |
Net_check_interval | Time between normal checks | number of seconds | 20 |
Net_check_offset | Time between program execution and first normal check | number of seconds | 1 |
Net_getstatuscommand | What command tells us if link is open? | any unix command | "/sbin/ifconfig | grep ppp0" |
Net_getaddresscommand | What command produces our ip address? | any unix command | {ifconfig | grep inet.\*P-t-P | sed s/inet.*r:// | sed s/P-t-P.\*//} |
Net_waitcheck_interval | Time between checks during post-toggle vigilance | number of seconds | 2 |
Net_wait_period | Time for post-toggle vigilance | number of seconds | 120 |
Net_auto_ping | Periodically ping? | 1/0 | 1 |
Net_ping_interval | Time between pings | number of seconds | 120 |
Net_ping_command | What command | {any unix command} | {ping -c 1 $ipaddr >& /dev/null} |
netup_image | Icon indicating link is up | any image filename | $images/Up |
netdn_image | Icon indicating link is down | any image filename | $images/Down |
netwt_image | Icon indicating we are waiting for a change | any image filename | $images/Right |