[Tfug] An Enlightenment E17 shocker...

Jim March 1.jim.march at gmail.com
Wed Nov 14 22:26:00 MST 2007


Forgot the script.  I'll post it below the quote...

On Nov 14, 2007 10:22 PM, Jim March <1.jim.march at gmail.com> wrote:
> I had a hardware breakdown today.  My beloved Kyocera KR1 managed to
> loosen it's power plug.  Waaaa.  This is the thing that lets me create
> a mobile wifi hotspot via a PCMCIA Verizon EVDO (glammed-out cell
> signal).
>
> So I did some digging and quickly found that my Kyocera KPC650 Verizon
> EVDO card is now much better supported in Feisty forward.  To get it
> running right I copied a script off of Ubuntuforums, marked it
> executable and manually ran it under Gnome.  Works great.  Puts a
> pretty strong cell-signal a bit too close to my balls for long-term
> comfort but it'll get me by until I hard-solder a power cord into that
> router :).
>
> I'll past the contents of the script below.
>
> Here's the kicker: I hadn't yet caused the script to auto-start.  I
> was testing it first.
>
> Spurred by Jude in the "XFCE thread" I tried E17.  I'm typing on it right now.
>
> And I'm online.  Via the Verizon EVDO connection.
>
> Which...I didn't start...
>
> Meh?  Somebody apparently wrote EVDO support straight into E17.
>
> Cooooooooool.
>
> I think I'll pay more attention to E17...somebody's at least trying...
>
> Jim

#!/bin/bash
#
# Author: Matthew Beaver (megaqwerty22 at gmail.com)
# This script is licenced under the GPL. A copy of the GPL can be
found in /usr/share/common-licenses/GPL

#You can modify these variables to fit your EVDO card
mountpoint="/dev/ttyUSB0"
phone_number="6198691229"



sudopass=`zenity  --entry --hide-text --title "Password" --text
"Please enter your sudo password here"`
	
while true; do {

#Set sudo password
sudopwdset="false"
count=0
		while [ "$sudopwdset" != "true" ] && [ $count -lt 3 ]; do
			sudo -k
			count=$(($count+1))
			if (echo $sudopass | sudo -S echo -n "" 2> /dev/null); then
				sudopwdset="true"
			fi
		done
		unset count
		if [ "$sudopwdset" = "false" ]; then
			zenity --info --text "The password you provided seems to be wrong,
so it will be re-asked in the terminal when needed."
			sudo -k
			sleep 2
		fi
#Check if process is alive

	if [ `pgrep ppp` ]; then {
		sleep 10
		
	}
	else
	{
		zenity --question --title "Lost Connectivity" --text "Reconnect EVDO?"
		answer=$?
		if [ $answer -eq 0 ]; then
			zenity --info --title "Connecting" --text "Connecting..."
			tail -f -n 0 /var/log/messages 2>&1 | zenity --text-info --title
"Connection Status" --width 600 --height 600 &
			sudo pppd $mountpoint 115200 debug noauth defaultroute usepeerdns
connect-delay 10000 user $9168444369 at vzw3g.com password vzw
show-password crtscts lock lcp-echo-failure 4 lcp-echo-interval 65535
connect "chat -v ABORT 'NO CARRIER' ABORT 'ERROR' ABORT 'NO DIALTONE'
ABORT 'BUSY' ABORT 'NO ANSWER' '' ATZ OK-AT-OK ATDT#777 CONNECT \d\c "
			sleep 50
#Add gateway
			gateway=`tail /var/log/messages | grep remote | awk '{print $9}'`
			if [ ! $gateway == "" ]; then
				zenity --info --title "Adding gateway" --text "Adding $gateway as
default gateway..." &
				sudo route add default gw $gateway
			
			else
				zenity --info --text "It doesn't look like you were assigned a
gateway yet..." &
				sleep 4

			fi

			continue		
		else
			exit
		fi
	}

	fi
}
done




More information about the tfug mailing list