System76 Ubuntu NetBook and Tethering on Verizon Droid (Android)

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 ~/bi

Now that you’re in ~/bin, go ahead and make an executable script which we’ll just edit in gedit.

touch && chmod +x && gedit easytether.s

Now, in gedit, enter the following code:

# Script to connect to and setup easytether
easytether connect &
sudo dhclient easytether0
Hit CTRL+S to save and ALT+F4 to close gedit.
The above code is exactly like the steps provided by the EasyTether setup instructions, other than the ‘#!/bin/bash’ at the top of the file which specifies that it is a bash script and the ‘&’ which allows the connect option to run in the background.  The only problem with the script is that you’ll most likely have to enter your password every time sudo is called.  Let’s fix that.

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 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/

Note: replace ‘jim’ with your username/login.

After closing gedit, be sure to unset the VISUAL environment variable.

unset VISUAL

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**

Location of Main Menu editor

Location of Main Menu editor

Within the main menu editor, click ‘Applications -> Internet’ on the left tree view.

**Internet New Item Image**

Location of "Internet" menu and where to click on the Main Menu dialog

Click on Applications -> Internet, followed by New Item

Then, click ‘New Item’ on the right.

In the ‘Create Launcher’ dialog, enter the following values:

Type: Application

Name: easytether

Command: sudo ~/bin/

Comment: Connect to Android via EasyTether

**Icon**: /usr/share/icons/hicolor/scalable/apps/

** New Item Values**

EasyTether launcher properties

Launcher properties

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! **

EasyTether setup is complete
EasyTether setup is complete

Related Articles