One of the first things I wanted to do when I got my netbook was to setup tethering. However, I don’t want to pay $30 more a month just to view the same pages I’d otherwise be viewing on my phone (i.e. Facebook, Twitter, Google News/Gmail). The answer to this is an application called EasyTether. It’s currently only $10 on the Android Market. Click here to download EasyTether.
The setup guide in EasyTether will walk you through getting the application configured on your phone and connecting that to your computer. However, some people may have Linux-based NetBooks and not have the technical knowledge to write a simple script to startup ‘easytether’ in a console. I’d like to provide those steps. Please read on if you’re interested!
Note: You *MUST* have your sudo password to proceed.
Write your connection script!
I like to keep executable binaries and scripts in my home directory under a ‘./bin’ folder. If you don’t have a bin folder, please create one.
mkdir ~/bin && cd ~/bin
Now that you’re in ~/bin, go ahead and make an executable script which we’ll just edit in gedit.
touch easytether.sh && chmod +x easytether.sh && gedit easytether.sh
Now, in gedit, enter the following code:
#!/bin/bash # Script to connect to and setup easytether easytether connect & sudo dhclient easytether0
SUDOn’t keep asking me for my password for this script!
The sudo command pulls options from a file called /etc/sudoers. There is a command you can run called visudo which opens /etc/sudoers to edit in vi. If you’re not comfortable with vi, you can edit using gedit:
export VISUAL=gedit && sudo -E visudo
Scroll to the bottom of the sudoers file and create a line to specify that you want your user to require no password for the easytether.sh script. If your sudoers file already has a line specified for your user account, you can add the script’s full path to any existing ‘NOPASSWD:’ entry by adding a comma after the existing entry, followed by your script’s path.
jim ALL=(ALL) NOPASSWD: /home/jim/bin/easytether.sh
Note: replace ‘jim’ with your username/login.
After closing gedit, be sure to unset the VISUAL environment variable.
Create a one-click launcher!
What would an awesome one-click script be in a netbook if you always have to open a terminal and browse to the script to launch it, then leave the terminal window open while it runs? Not too awesome. Here’s how you can create the launcher and add it to your favorites.
First, click the Ubuntu menu (Applications) and browse to System -> Main Menu.
**Main Menu Image**
Within the main menu editor, click ‘Applications -> Internet’ on the left tree view.
**Internet New Item Image**
Then, click ‘New Item’ on the right.
In the ‘Create Launcher’ dialog, enter the following values:
Type: Application Name: easytether Command: sudo ~/bin/easytether.sh Comment: Connect to Android via EasyTether **Icon**: /usr/share/icons/hicolor/scalable/apps/notification-gsm-high.svg
** New Item Values**
Close the Main Menu editor, browse to Applications -> Internet, find the ‘easytether’ launcher and add it to your favorites!! Now you are finished and you can quickly and easily connect to easytether.
** Completed Image! **