Dec 18, 2011

How To: Fix Samsung Galaxy Nexus MTP File Transfer for Ubuntu GNU/Linux 11.10

So I've been so lucky as to have a spankin' new Samsung Galaxy Nexus phone with Android Linux "Ice Cream Sandwich" version from Verizon bestowed upon me! Yeah!

I have to tell you, I am thoroughly enjoying this phone! I'm loving it! I really like the big screen, the great on-screen keyboard, the snazzy new Ice Cream interface, and most of all the 4G Internet speed.

There was only one little surprise for me with this new phone: Having to use the Media Transfer Protocol "MTP" ( ms ft technology), and/or the Photo Transfer Protocol "PTP" to transfer files to/from the device instead of USB Block mode. Both of my previous phones, the Moto Droid and then the Droid Incredible, used USB block mode instead.

The way USB block mode works is that when you plug the device into the USB port with the cable it is simply detected as an external USB drive. This is nice because no additional applications or proprietary frameworks are needed to access the drive.

With the Samsung Galaxy Nexus however,  you have to install some additional software so you can mount the device using "MTP" Media Transfer Protocol. I think it would be nice if you had the choice of using whichever one you want.

MTP works with GNU/Linux, but it requires the installation of some extra applications to get connected to the device. One such application is called gMTP by Darran Kartaschew (aka Chewy509).


The gMTP program is a graphical utility that lets you add/delete/copy/make folders/etc. to your device via MTP. gMTP is available in the Ubuntu Software Center.

The only problem I had with gMTP, which depends upon libmtp from sourceforge.com, is that the latest libmtp hadn't been updated on my Ubuntu (11.10) yet. So, since I had the older libmtp, I was experiencing a bug where trying to copy files onto my Samsung Galaxy Nexus wasn't working properly. At least one other person was having this problem, according to this post on sourceforge.com.  To make a long story short, I posted my complaint on G+ and then magically.. +Paul Eubanks suggested that I should check into installing the newer libmtp to fix the problem. This hit the nail on the head! Thanks Paul!
 
Eventually, probably within a few weeks or months, libmtp will be updated for Ubuntu, and then you won't experience the bug I did.. But until then, here are the instructions for installing the newer libmtp, after compiling it from source.

Step 1. Install the libusb-dev dependency package so you can build libmtp
sudo apt-get install libusb-dev
Step 2. Download the latest libmtp tar.gz from here:
http://sourceforge.net/projects/libmtp/files/libmtp/

Step 3. cd into the same directory where you downloaded the new libmtp*.tar.gz and extract the tar package:
tar xvf libmtp-1.1.1.tar.gz
Step 4. cd into the libmtp directory you just extracted , then compile and install using configure/make/make install:
cd libmtp-1.1.1/
./configure --prefix=/usr
make
sudo make install
Step 5 (maybe optional). Not sure if I needed this step or not, but if everything in the last step went well, you'll now have the 69-libmtp.rules file in the current directory, and you can copy it to /etc/udev/rules.d to ensure you can access the phone through the USB.
sudo cp 69-libmtp.rules /etc/udev/rules.d
Step 6. Install the handy gMTP Graphical MTP file access utility:
sudo apt-get install gmtp
Step 7. Try to run gMTP and see if it connects to your device. If not, then refresh things by unplugging your phone, rebooting the computer, then plugging in your phone again. Then, try to launch gMTP from the Unity/Gnome menu again, see below.




Step 8. You should see something like below when you click connect. Also you should be able to copy files to and from the device with ease.



If you want to check to ensure your computer has the newer libmtp, run this command:
ls -lah /usr/lib/libmtp*
You should see something like below.. notice the libmtp.so.9.0.1 and file date there
svanwagner@ubuntu-scythe:/usr/lib$ ls -lah libmtp.* -rw-r--r-- 1 root root 725K 2011-12-18 01:12 libmtp.a -rwxr-xr-x 1 root root 921 2011-12-18 01:12 libmtp.la lrwxrwxrwx 1 root root 15 2011-12-18 01:12 libmtp.so -> libmtp.so.9.0.1 lrwxrwxrwx 1 root root 15 2011-12-18 01:12 libmtp.so.9 -> libmtp.so.9.0.1 -rw-r--r-- 1 root root 256K 2011-08-09 06:10 libmtp.so.9.0.0 -rwxr-xr-x 1 root root 611K 2011-12-18 01:12 libmtp.so.9.0.1
Here's an extra tip: The gMTP program version 1.2.0 has the root of the filesystem "/" set for the "Download" control (by default). So if you launch the program normally, when you select a file and click "Download", you'll get an error because the program will have tried to save the file to "/", which unless you run your computer as root - is not writable by regular users. To fix this problem, you should open Edit > Preferences for gMTP, then place a checkmark by "Always show Download Path", as shown in the picture below. With this setting enabled, you'll be prompted for a location to store the file when clicking "Download", and you can pick something like Desktop or your Documents folder so you can get your files.



That's it! Now you can move files on and off your Samsung Galaxy Nexus device with ease!

Update: pointed out how the libmtp update does not help the problem with connecting  the Nexus to Banshee or even Rhythmbox.

To have Banshee see your Samsung Galaxy Nexus (Android):
  • Close out of banshee completely
  • Plug in your phone and open the root folder (select open folder on plug-in prompt)
  • Create an empty file, rename it to ".is_audio_player" (no quotes)
  • Open the Banshee Music player and it will see your device
To have Rhythmbox see your Samsung Galaxy Nexus (Android):
  • Simply enable Debugging Mode on the Phone, then attach it to the computer
Credit:
http://www.omgubuntu.co.uk/2011/01/banshee-doesnt-show-android-fix/
https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/896376

Want to try a different way? See here: http://www.omgubuntu.co.uk/2011/12/how-to-easily-mount-the-galaxy-nexus-on-ubuntu-11-10-via-unity/

If you'd like to leave a comment, please do so below.


Cheers!
Shannon VanWagner
12-18-11
 




Dec 14, 2011

How To: Cisco Systems VPN with Ubuntu 11.10 / 10.10 GNU/Linux

What you'll need:
  • gateway DNS name or IP address for the VPN
  • username/password for access to the VPN server
  • group name/password for the VPN settings
  • Special Note - these instructions are for connecting to the VPN using the Cisco Systems VPN client. If you are looking for instructions related to using the open source alternative to the Cisco AnyConnect client (openconnect), have a look at my post entitled: How To Connect Ubuntu Linux to Cisco VPN with openconnect (anyconnect-capable alternative)

First, install these packages to extend the functionality of the graphical network manager in Ubuntu:
sudo apt-get install vpnc network-manager-vpnc


At this point you can try restarting your session (ctrl-alt-backspace if you have it configured via keyboard>Layout Settings>Options>Key Sequence to kill the X server), but it may take a full reboot of the computer for the settings to take effect.

Now, open the network manager, hover over VPN Connections, then click Configure VPN..., then click Add, select "Cisco Compatible VPN (vpnc)".




Enter your username, groupname, group password (set the dropdown to save the group password if it is very long ).

Ubuntu 11.10 Example:


 Ubuntu 10.10 Example:


Click Apply to save the connection settings. To connect, simply click the Network Manager icon in your panel, hover over VPN connections, click your connection, then enter your VPN password when prompted. Easy, peasy.. That's it!






Shannon VanWagner
14 December 2011

Dec 12, 2011

How to install Bugzilla with HTTPS on Ubuntu 10.04.3 LTS Server


So after a quick search, I couldn't find any one site with specific instructions on how to install Bugzilla 4.0.2 on the Ubuntu 10.04.3 LTS GNU/Linux server.

Since I spent some time and worked out the problems myself, I thought I'd post what worked for me. If you have any suggestions to make this writeup more accurate, or more secure, please leave a comment below with your wisdom. Thanks!


Things that you might need:
  • hostname for the server
  • username password for the bugzilla server
  • ip address to use for the bugzilla server (static is suggested)
  • root password for your mysql
  • password for your self-signed SSL cert
  • password for the bugs user
  • email address / name / password for the admin user
First, install Ubuntu 10.04.3 LTS Server version. There is nothing special about this step besides I recommend you use a strong password for the user you create and perhaps you can select 'Install security updates automatically' at the manage upgrades prompt. Also, don't select 'LAMP server' during the software installation step as we'll put in just the specific packages we need in the steps below. Although, if you want to remotely manage your server using ssh, do choose OpenSSH server to install (I'll put in some instructions for disabling root login to ssh later**). Once your Ubuntu Server is installed and ruuning, login and switch to root. From here on out, you'll perform the installation steps as root. To become root:
sudo -s
Run updates for the box. This will get you setup for the next step of installing packages.
apt-get update && apt-get upgrade -y
Note: this step may require a reboot to fully complete the update if the kernel was updated. Tip: At this point, if you're setting up your server in a virtual machine this is a good place to make a baseline snapshot so you can revert to it later if things go all wrong. I used Oracle's Virtualbox, the Open Source version. I installed Virtualbox with the terminal command: sudo apt-get install virtualbox-ose If you have a specific (static) IP address for the bugzilla server, set it up on the box with this:
vi /etc/network/interfaces
Then comment out this line by putting # in front like this:
#iface eth0 inet dhcp
Then add these lines (apply specific values for your environment):
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
Then reset the networking on your server with the command
/etc/init.d/networking restart
Now we'll install the baseline packages for the bugzilla webserver using apt-get:
apt-get install libnet-ssleay-perl apache2 libapache2-mod-perl2 libapache2-mod-auth-mysql mysql-server mailutils gcc mysql-server libappconfig-perl libdate-calc-perl libtemplate-perl libmime-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-send-perl libemail-mime-perl libemail-mime-modifier-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl -y
Note: Set the password for your mysql-server root user during the setup of mysql during installation. Also, by installing the packages above, you will also get the ssl-cert package, which will automatically generate a self-signed cert for your https server. At this point you should be able to open http on your website. e.g., http://192.168.1.100 (per the example configuration above) should show a page that says "It works!". Very simple eh? Now we need to enable ssl in Apache2 by running this simple command:
a2enmod ssl
Now, since we'll be using HTTPS for the site, we need to link the default-ssl website profile in the /etc/apache2/sites-available to the /etc/apache2/sites-available using the a2ensite command:
a2ensite default-ssl
This is basically the same as running the command: ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/default-ssl Now restart the apache2 to refresh the running apache2 server configuration:
service apache2 restart
At this point you should be able to open http on your website. e.g., https://192.168.1.100 (per the example configuration above) should show a page that says "It works!". Note: By default the "snake-oil" self-signed cert is being used from the ssl-cert package for your https capability. If you don't have a remote machine to test access with, use this command from the server itself to test connectivity.
telnet localhost 443
Note:You should see something like below (notice it says connected to localhost):
Trying ::1...
Trying 127.0.0.1
Connected to localhost
Escape character is '^]'.
So now that we have Apache up and running, let's configure our http page to automatically redirect the user to https (this uses mod_rewrite), and then enable CGI for the bugzilla. Enable mod_rewrite - so we can redirect http to https
a2enmod rewrite
Now modify the http configuration file at /etc/apache2/sites-enabled/000-default for redirect to https. Simply add the redirect to HTTPS lines noted in /var/www section as shown below:
vi /etc/apache2/sites-enabled/000-default
<Directory /var/www>
 #Enable redirect to HTTPS - added 3 lines below
 RewriteEngine On
 RewriteCond %{HTTPS} off
 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

 Options Indexes FollowSymLinks MultiViews
 AllowOverride None
 Order allow,deny
 allow from none
</Directory>
Now, since we are modifying the apache2 configuration, let's modify /etc/apache2/sites-enabled/000-default-ssl to enable CGI script capability for the bugzilla website. See below.
vi /etc/apache2/sites-enabled/000-default-ssl
<Directory /var/www>
 Options +ExecCGI Indexes FollowSymLinks MultiViews
 AddHandler cgi-script cgi pl
 AllowOverride Limit
 DirectoryIndex index.cgi
 Order allow,deny
 allow from all
</Directory>
Then restart apache2 with
service apache2 restart
Now let's harden mysql and do some other database admin stuff. Run the command
mysql_secure_installation
Be sure to remove the guest user, disable remote access, and remove the test database. Then, create the database for bugzilla:
mysql -u root -p
Note: Your mysql root password will be required at this point.
mysql>CREATE DATABASE bugs;
GRANT ALL ON bugs.*
TO bugs@localhost IDENTIFIED BY 'bugs';

mysql>quit
Now let's make some needed additional configuration points for mysql:
vi /etc/my.cnf and add:
[mysqld]
# Allow packets up to 4MB
max_allowed_packet=4M
# Allow small words in full-text indexes
ft_min_word_len=2
Ok, restart mysql to load the my.cnf changes:
service mysql restart
Now download/install bugzilla. Download the bugzilla package:
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.0.2.tar.gz
Extract it:
tar xvf bugzilla-4.0.2.tar.gz
Move it (and hidden files) to the /var/www directory:
mv bugzilla-4.0.2/* bugzilla-4.0.2/.??* /var/www
Set ownership of /var/www to the www-data (apache2) user/group
chown -R root:www-data /var/www
chown -R root:www-data /var/www/.??*
cd /var/www 
Now enable perl modules for bugzilla
perl -MCPAN -e install
Or you can use this (much longer) method:
/usr/bin/perl install-module.pl --all
Check to ensure modules are enabled for bugzilla - some will show as not loaded.
./checksetup.pl --check-modules
Now run the setup for bugzilla, for the first time, to create the localconf file in the /var/www directory
.checksetup.pl
Now make some changes to /var/www/localconfig for bugzilla: Enter a password for $db_pass in /var/www/localconfig Ensure $db_driver in /var/www/localconfig shows mysql Ensure $webservergroup shows www-data (this is the Ubuntu group for apache2) Now Configure mysql for bugzilla use: Login to mysql with your root password - mysql -u root -p Set the permissions for the bugs user
mysql> GRANT SELECT, INSERT,
       UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
       CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*
       TO bugs@localhost IDENTIFIED BY '$db_pass';
mysql> FLUSH PRIVILEGES;
Set the password for the bugs user:
mysql> SET PASSWORD FOR 'bugs'@'localhost' = PASSWORD(' some password');
mysql> FLUSH PRIVILEGES;
mysql>quit
At this point you should move or delete the index.html in the /var/www so that bugzilla doesn't complain about it. I chose to move it.
mv /var/www/index.html ~
Now run the setup for bugzilla for the second time and it should add a bunch of tables and prompt you for the admin-email/password/name.
.checksetup.pl
Now bugzilla should be up and running. Test it out in your web browser. If you need to reset your admin password for bugzilla, do so with:
./checksetup.pl --reset-password=user@domain
If you need to create an admin user for bugzilla, do so with:
./checksetup.pl --reset-password=user@domain
Finally, to setup email for your bugzilla, run this command:
dpkg-reconfigure exim4-config
Select OK to continue, then follow the prompts and make the selections for the way you would like to have your bugzilla server email you. **To disable root login for your bugzilla OpenSSH server (so you have to login as a regular user, then sudo -s for root), simply set 'PermitRootLogin no' in /etc/ssh/sshd_config and then restart the ssh server with service ssh restart. That's it! Hope this helps someone. Shannon VanWagner 12 December 2011
You can test email functionality from the server with:
echo "This is a test" | mail -s "Test email" working-email-addr@your-valid-domain.com
If email is not working, try this diagnostic test:
exim -bt working-email-addr@your-valid-domain.com
If the above step produces an error, e.g. /var/log/exim4/mainlog shows "Unroutable address", and your bugzilla server is inside a domain with local DNS, check to ensure your MX records are configured correctly on your DNS server.



Dec 3, 2011

How To Create Music CDs From MP3 in Ubuntu 11.10

In this post I'm going to show you how simple it is to create music CDs From your MP3 music in Ubuntu 11.10. I decided to write this post in response to some information posted by Sarkis Dallakian, Ph.D pertaining to cd burning programs on the wintarded operating system. You can see the original post here: http://tinyurl.com/7p27gxn

What I used in this demonstration:
  • Ubuntu 11.10 GNU/Linux on my computer
  • Some sample tracks of legally obtained MP3 music
  • 1 Blank CD-R disc of the 700MB, 80 min (imation 1x-52x is what I have)
  • MP3 support in Ubuntu - Terminal command: sudo apt-get install ubuntu-restricted-extras

First, insert a blank CDR into the drive. If you get the application launch prompt as shown below, simply click Cancel to close it. See below. Note: We could click through and add the Brasero application as a default to the drop-down shown here but that's another topic.



Next, click the Ubuntu Launcher icon in the Unity menu... or hit the wintard button (that's the one with the wintard logo on it), then type in brasero and click on the Brasero disk burning utility icon to launch it. See below.


Next, Click the "Audio project" button to begin a new music CD compilation. See below.

Next, simply click the "+" button, and add your music files to the compilation (hold the ctrl button to select multiple non-contiguous files, or hold shift to select a range of files). With the music files selected, click the Add button to add them to your compilation. Make sure the drop-down control near the bottom of the dialog shows the blank CD you inserted(as opposed to an image file name), and use the progress bar that appears there to monitor when the space for the CD is used up (will be between 10-20 music tracks depending on their length ). See below.



When you are finished adding music tracks to the compilation, Enter a descriptive name for the CD in the field provided(optional), then click the Burn button. Wait about 5 or ten minutes as the program "normalizes" the tracks and then burns them onto the CD disc.



That's it! Wasn't that easy! Now you can take the CD out to your car (or other standard CD player) and enjoy your music.


GNU/Linux - Freedom with a Universe of Free Software that comes with it. Get yours! See www.distrowatch.com or www.ubuntu.com for more information.


Humans Enabled - That's what Technology is for!


Shannon VanWagner
12-03-2011

Oct 17, 2011

Ubuntu GNU/Linux Used by Technologists on Home Makeover Extreme Edition

Ubuntu GNU/Linux in the Background at 22:09 on Home Makeover
So my biggest daughter comes to me and says, "Daddy, they're using Ubuntu (GNU/Linux) on (ABC's) Extreme Home Makeover Edition". 


So then we go onto hulu.com and she points me to the time section where Brent Bushnell the Son of Atari founder Nolan Bushnell is talking about a robot they're making for the show and sure enough - there in the background is a large computer monitor with the unmistakable colors of Ubuntu GNU/Linux as the desktop background.

So apparently they are using Ubuntu GNU/Linux to make the software controls for their Robot on the show. Sweet!


GNU/Linux is the Universal Operating System, even for awesome projects featured on Home Makeover Extreme Edition.


Yep.
Shannon VanWagner

Aug 19, 2011

Tether Android to Ubuntu / Fedora Linux

(Update 11-15-11 - CLICK HERE for the automatic setup script - Now Just 296KB! sha1sum: f3b79c2e191baf8060367681bae27ac75fab9886 ). Based on reader comments, I've added the functionality for the script to use either yum or apt-get (Fedora or Ubuntu). Includes updated Azilink by Charlie Snider - for Android 2.3.x. READ the install instructions here (e.g., PLUG YOUR DROID INTO THE USB FIRST!)) Let me know how it works for you in the comments.)



So if you're like me you recently picked up the fabulous Verizon Droid Linux-based phone, and now you're one happy camper.

I've been cruising along with my Droid (Android Linux based device) for a month now, and I'm happy as a clam. I have to tell you... The Verizon Droid is quite a fine Linux-based device indeed.

So now that I've used the Droid for awhile, I set out in search of a piece of functionality that I hadn't yet replaced from my Blackberry days. That is: The capability to tether my Droid as an Internet modem to my Ubuntu GNU/Linux 9.10 machine using the USB cable.

On the Blackberry, this was as simple as, a.) provisioning the data service through Verizon(yes, this does cost extra), and then b.) setting up the "Berry4All/BBTether" script (by the extravagant Mr. Thibaut Colar) on my Ubuntu Linux box.

In my search for a solution, the first place I checked for a tethering application was in the Android Market. And while there are many other applications, the only app I was able to find for tethering, required for my phone to be "rooted". And so instead of jumping right into that, I went looking for an easier solution, and voila! - I found it.

What I found are some easy tethering instructions by the masterful Shwan.c (link at ubuntuforums.org) using James Perry's azilink (modified for Android 2.3.x by Charley Snider) from Google Project Hosting, GNU+Linux, and the FOSS program openvpn. So now there was only one problem: I'm using the Verizon Droid, not the HTC Magic. The good news is that the process is generally the same, except for a difference in hardware id information for the udev rules settings in Ubuntu.

So after some minor changes, I've now successfully tethered my Verizon Droid via USB as a modem for my Ubuntu GNU/Linux 9.10 machine(Works with 10.04 too - only difference is that you may have to uncheck "Work Offline" in Firefox after connecting (Thanks to Gene for mentioning this)). Update:06-04-10 - I've tested these instructions and they work successfully with both the Motorola Droid and the HTC Incredible Android phones.

So here are the easy steps to get you up and running with using your Droid as a USB tethered modem (and a big Thanks to Shwan.c for posting the original idea):

1.) Download the current Android SDK (for Linux (i386)) from: http://developer.android.com/sdk/index.html

Update(thanks for comments!): 12-13-10 adb does not come with the new SDK by default so you have to add it via the Android SDK and AVD Manager.
2.) Extract the SDK, run the "Android SDK and AVD Manager", then to get the adb tool, install "Android SDK Platform-tools, revision 1":

tar xvf android-sdk_r07-linux_x86.tgz
cd android-sdk-linux_86
tools/android


In the Android SDK and AVD Manager, expand "Available Packages", put a checkmark by "Android SDK Platform-tools, revision 1", click "Install Selected" and follow the prompts to complete the download/installation of adb into your SDK folder (screenshot below).


3.) Change Directory into the "platform-tools" directory, then copy the "adb" application to your Ubuntu /usr/bin directory (sudo privs needed)
#From the extracted "android-sdk-linux_86" directory:
cd platform-tools
sudo cp adb /usr/bin/adb

4.) Create/edit/save a rules file for udev to allow your machine to see your device
sudo vi /etc/udev/rules.d/91-android.rules

Put the text below into the file(using "i" to enter "insert" mode and hitting the escape key to return to "select" mode before saving.. C'mon, what fun would Linux be without using vi? If you really don't like vi, you can substitute with something like gedit, or nano, or kate, or etc.), replace USERNAME with your Linux username, then type ZZ to save the file from vi.

SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"
If you have an HTC Android phone - use this rule instead of the one above:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"
If you have the Samsung Galaxy Android phone, use this rule instead of the one above:
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"  
If you have the Sony Ericsson X11 Android phone, use this rule instead of the one above (Thanks to Steven from the comments):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"If you have the LG Optimus V(Virgin Mobile) Android phone, use this rule instead of the one above: 
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" 


5.) Set the appropriate permissions to the rules file you just created.
sudo chmod a+r /etc/udev/rules.d/91-android.rules


6.) Restart udev to load the new rule.
sudo restart udev


7.) Enable "USB debugging" on your Verizon Droid via Settings | Applications | Development


8.) Connect your Droid to the computer with the USB cable and then use the following adb command to check for your device.
adb devices


example:
$ adb devices
List of devices attached
040364FA0901E011


9.) Install openvpn on your computer so you can connect to your device with it.
sudo apt-get install openvpn
sudo /etc/init.d/networking restart
sudo /etc/init.d/network-manager restart



*For Fedora and Yum, replace the commands above with this:
sudo yum install openvpn
sudo /etc/init.d/networking restart



Note for those without Internet: If you need to install the openvpn package (and dependencies) separately, these packages are what you will need: (liblzo2-2 libpkcs11-helper1 openssl-blacklist openvpn-blacklist openvpn). It's best to use the package manager to install openvpn because it will automatically install the dependencies, but if you can't get your Ubuntu machine onto to the Internet, then you can download the above packages (in .deb format) to a separate medium (i.e., USB drive, CDR, etc.)separately and then install them in the order listed to achieve the same result as installing from the package manager.


10.) Install openvpn on your Verizon Droid. Note: the line "adb install" actually installs the azilink application on your Droid device. After azilink is installed, an icon that looks like a flying insect will appear on your Droid in th applications area.
cd /home/Downloads/
mkdir azilink
cd azilink
#Manually download the Azilink-debug.apk - fixed by Charley Snider for Android 2.3.x from

#http://code.google.com/p/azilink/issues/detail?id=43#c15
adb install -r Azilink-debug.apk
wget http://azilink.googlecode.com/files/azilink.ovpn


11.) Create a replacement resolv.conf file to be copied over to your /etc directory at run-time:
vi resolv.conf


#Type in the text below(hit "i" for insert first, then ESC after the insert, before saving) and then hit ZZ to save
domain lan
search lan
nameserver 192.168.56.1


12.) Now create a very small script to start the modem
vi start_modem


#Type in the text below, then hit ZZ to save
adb forward tcp:41927 tcp:41927
sudo cp resolv.conf /etc/
sudo openvpn --config azilink.ovpn


13.) Set your new script to be executable.
chmod 755 start_modem


14.) On your Verizon Droid, launch the azilink app and place a checkmark by "Service active" so it can receive the connection from your Ubuntu machine.


15.) With your wireless connection in Ubuntu "unchecked"(via right-click of the Network manager applet), launch the the connection script you just made in the Terminal:
/home/Downloads/azilink/start_modem


You should now be able to surf the Internet, using your Verizon Droid as a tethered modem. When you're finished - hit ctrl+c at the Terminal from which you started the connection script. Then uncheck "Service active" in Azilink on your Droid.


Here's a Speedtest (courtesy of speakeasy.net/speedtest) of the connection from Seattle, WA:
Download Speed: 1448 kbps (181 KB/sec transfer rate)
Upload Speed: 281 kbps (35.1 KB/sec transfer rate)


If you have any questions, feel free to leave a comment.

Aug 14, 2011

Google+ Here's my invitation to you (about 150 of you actually)

For those who haven't signed up to Google+, I extend my invitation (about 150 of them actually).

http://goo.gl/X5zCf

With Google+ you get:

Circles - control who has access to what, where messages get sent, etc

Hangouts - Video Cam chat with several people at once (also share youtube videos in the main area)

Games - Addicting, fun, Destined to waste your time.. Awesome!

Sparks - follow/share/collaborate about your interests

And, the reason I like it best:

Data Liberation - Download all your input to Google+ at any time (in zipped format) (yes, unlike fb)

Plus - so much more...

Cheers!

Shannon VanWagner

Aug 11, 2011

"Immutable" ( chattr setting ) - When You Can't Change a File in GNU/Linux



So today I learned about a little thing in the GNU/Linux filesystem called "chattr" and making files "immutable". Basically you can have a plain text file that you think you have full permissions over and then not be able to modify it, rename it, delete it, etc. This nifty (and possibly maddening) trick can be setup with the "chattr" command. See my examples below...

Create a simple text file
shannon@ubuntu-star:~$ echo Linux Rocks > testfile

Check the permissions of the file you just created:
shannon@ubuntu-star:~$ ls -l testfile 
-rw-r--r-- 1 shannon users 12 2011-08-10 23:47 testfile

Note that in the above state, I can write to the file, `mv` the file to a different name, `rm` it, etc. Now, for the magic (Or "basic commands" for a "novice" type stuff, according to http://tldp.org/LDP/abs/html/basic.html )

Use chattr to set the "immutable" attribute to the file.
shannon@ubuntu-star:~$ sudo chattr +i testfile 

Notice how nothing special shows in `ls` for the file:
shannon@ubuntu-star:~$ ls -l testfile 
-rw-r--r-- 1 shannon users 12 2011-08-10 23:47 testfile

And yet, magic ensues.. I can't edit the file, mv the file, rm the file, etc (even as root):
shannon@ubuntu-star:~$ echo Say it Again >> testfile 
bash: testfile: Permission denied
shannon@ubuntu-star:~$ sudo echo Say it Again >> testfile 
bash: testfile: Permission denied
shannon@ubuntu-star:~$ mv testfile testfile2
mv: cannot move `testfile' to `testfile2': Operation not permitted
shannon@ubuntu-star:~$ sudo mv testfile testfile2
mv: cannot move `testfile' to `testfile2': Operation not permitted
shannon@ubuntu-star:~$ sudo rm testfile 
rm: cannot remove `testfile': Operation not permitted

Amazing!

So now to stop the madness:
shannon@ubuntu-star:~$ sudo chattr -i testfile
shannon@ubuntu-star:~$ mv testfile testfile2
shannon@ubuntu-star:~$ ls -l testfile2
-rw-r--r-- 1 shannon users 12 2011-08-10 23:47 testfile2

So if you ever find yourself not being able to edit a file, and if you already know the partition you're working on is not set to read-only, and if you already know that you have full permissions to change a file - maybe "immutable" is your problem...

Setting the immutable property is only one of the options for the chattr command, run `man chattr` to read about other things you can do.

So I learn something new with GNU/Linux every day. Is this awesome or what?

PS: If you've ever wondered what chmod 753 means, here's the answer:
7 -  "owner" gets to read/write/execute
5 -  "group" gets to read/execute
3 -  "others" gets to write/execute

Cheers!
Shannon VanWagner

Jul 17, 2011

Help When Your Microphone is Not Working in Ubuntu

I have an Ubuntu GNU/Linux user friend that was trying to get her microphone working for Google Voice and Video Chat and she couldn't figure it out. So I recorded a short video that talks about changing settings in Ubuntu "Sound Preference" to get your microphone working.



With a little bit of faith and tinkering, you should be able to get your microphone working perfectly. Most of the time we have problems with these types of things because we are used to what the controls look like. In this video I show you where to change the settings for the microphone and get it working in Ubuntu GNU/Linux 11.04 Natty/Narwal. Hopefully this helps someone.



Cheers!
Shannon VanWagner
07-17-2011

Jun 29, 2011

How to install Evernote in Wine on Ubuntu 11.04 GNU/Linux

Evernote has the "Platinum" rating at http://appdb.winehq.org , which means this windows program runs awesome sauce on GNU/Linux. Wine is an awesome program that lets you run windows programs in GNU/Linux - there's also a commercially supported version called crossover by codeweavers, check it out here.

In this tutorial we'll be installing Evernote 4.4.1.4892 in wine1.3 from winehq.org on Ubuntu 11.04 GNU/Linux. See the install steps below the video.



Here are the steps (Easy Pleasy):

1.) Go to http://evernote.com and download the Evernote for windows version
2.) Install wine1.3 in Ubuntu 11.04 with these commands (thanks to Scott Ritchie for the ppa):
sudo add-apt-repository ppa:ubuntu-wine/ppa
3.) Update your Ubuntu with the new ppa repository data and install wine1.3
sudo apt-get update && sudo apt-get install wine1.3
4.) Right click on the Evernote installer that you downloaded in step 1, then left click "Open with Wine Program Loader".
5.) Follow the on-screen instructions to install the Evernote program.

That's it! Double click the desktop icon for Evernote, login with your Evernote account and away you go!

Leave a constructive comment if you like.

Cheers!
Shannon VanWagner
06/29/11

Jun 28, 2011

Install GIMP 2.7.x on Ubuntu 11.04 using PPA

GIMP is an awesome Free Open Source Software photo editing program which is arguably comparible Adobe's Photoshop.

GIMP does not come preinstalled by default on Ubuntu 11.04 GNU/Linux anymore but you can easily add GIMP 2.6 by installing it from the Ubuntu Software Center.

Despite the program's greatness, the "text tool to be clumsy and restrictive as compared to Photoshop" according to Tony Bradley on his "Ubuntu Linux, Day 27: Working With GIMP" blog post (see pics below for examples).  But this is something that's getting revamped in the newer "beta/development" version of GIMP (version 2.7.x) and the future 'stable' release GIMP 2.8.x.

But until the new release is available, you can easily install the newer 2.7.x version of GIMP (with the great new features) thanks to the 'matthaeus123' PPA for Ubuntu.

(New text tool in Gimp. (top - Gimp 2.6, bottom Gimp 2.7.x))





Here's how to upgrade GIMP using the 'matthaeus123' PPA for Ubuntu:
Note: This assumes you already have GIMP installed

#Add the 'matthaeus123' PPA for Ubuntu to your software sources (using the Terminal):
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn

#Run this command to update GIMP to the newer version.
sudo apt-get update && sudo apt-get dist-upgrade gimp -y

#While you're at it, you might as well install the gimp-plugin-registry as well
sudo apt-get install gimp-plugin-registry -y


That's it! Enjoy! Feel free to leave a comment about your experience if you like.

Shannon VanWagner
06/28/2011

Jun 22, 2011

How to Add Music to a Video with OpenShot(FOSS)


This post is a response to Tony Bradley's article entitled: "Ubuntu Linux, Day 20: Editing and Making Movies" where Tony mentions: "I still couldn't find an easy way to mute the sound from the original video clip so the song could play as a solo soundtrack for the video montage."

I've created a quick video to show how to mute the sound for the video and have the music play instead for the entire compilation.

I've also included the written instructions for this task below.

From OpenShot:
1.)Click the plus (+) and add your video
2.) Click to select the video in OpenShot, then right-click, then click Add to Timeline(+), then click Add
3.) The video now shows in the Track 2 position on the lower portion of the OpenShot interface, click the small speaker-volume icon on the clip to disable the sound for that track
4.) Add your audio track and import it, then drag it to Track 1 on the bottom of the OpenShot interface

Enjoy!
Shannon VanWagner

Jun 20, 2011

How to search for content in LibreOffice.org (+ OpenOffice.org) Docs using Loook

Today's post is a response to Tony Bradley's post on pcworld.com entitled: "Ubuntu Linux, Day 19: Using 'man' and 'grep'". In his post, Tony describes his woes when trying to use 'grep' to search for content in LibreOffice documents.

First of all, in my experience, grep does a lot better job at finding things in files that are "plain text" rather than looking for stuff in "binary" files. LibreOffice documents, while saved in open and ISO standard formats, are stored in binary as opposed to plain text files.

So, to address Tony's problem, I've been looking around trying to find a way to search for content in ODF files and not having much luck. Surprisingly, there doesn't seem to be this type of functionality built into Ubuntu GNU/Linux by default (at least not that I have ever noticed).

However, there's a posting out there on ooofourm.org that mentions the problem, how additional development is needed for this specific feature to be added, and some suggestions for what to use until the functionality is built into Ubuntu GNU/Linux. The recommended tool that I've had success with is named "Loook", by Daniel Naber at danielnaber.de/loook.

Loook is a lightweight, python-gui-based, FOSS program that enables you to search for content in your LibreOffice (and/or OpenOffice) files, and it works great!

Using Loook in Ubuntu 11.04 takes just a bit of setup. Here's my writeup on how to do it:

1.) Ubuntu GNU/Linux 11.04 has Python 2.7.1+, and so you need the version of Loook for Python 2.x(not 3.1), which is currently 0.6.5.
So download Loook the version of Loook for Python 2.x from:
http://www.danielnaber.de/loook/

2.) Extract the loook.zip file.

3.) Loook needs python-tk to run, which is not installed on Ubuntu 11.04 by default. But don't worry, installing this package is easy. Just enable the 'universe' repositories from the Ubuntu Software Center, then either install "python-tk" from the gui or install it by using the Terminal command:
sudo apt-get install python-tk

4.) To run: Double click the loook.py file that was extracted in step 2 above, then select "Run". You'll be presented with a dialog where you can enter "Search Terms", the "Search path", and the "Viewer" (insert /usr/bin/libreoffice here). Click search and Loook will find the documents containing the text you inserted. You can then double click on any result in the "Matches:" section and that will launch the document for you to peruse.

Power User Tip:
If you want to go a step further, you can create a "launcher" shortcut for the Loook.py program. Simply move the Loook.py file to somewhere where it can stay put (e.g., your Documents or home directory), then right click the Desktop, select "Create Launcher", leave "Type" as Application, enter the name "Loook", then enter the absolute path to the loook.py file (e.g., /home/dude/Documents/loook.py - in my case). With the Launcher, you can also add it to your panel or Unity bar with drag and drop. Note: you may want to set a better looking icon for your launcher before adding it to your panel. This can be done by opening your newly created Loook launcher *.desktop file in gedit (e.g., alt+f2 for Run, then type or paste "gedit ~/Desktop/Loook.desktop", no quotes), then change the name of the icon to use to something like "eog" (it's an icon for the "eye of gnome" program - looks like a search icon). Save the change and you should see the nice eog icon for the launcher.

Example Loook.desktop contents:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=eog
Name[en_US]=Loook
Exec=/home/dude/Documents/loook.py
Name=Loook
Icon=eog


So, while the functionality to search for content in LibreOffice/OpenOffice documents does not appear to be built into Ubuntu by default, it is a very easy thing to do with awesome Free Open Source Software programmers like Daniel Naber and his great project Loook.

Feel free to leave a comment if you have one.

Cheers!

Shannon VanWagner

Jun 18, 2011

Sample Script to Report /home Directory Usage

So, awhile back, I created this simple script to monitor usage of the /home directory on a GNU/Linux server. I've been working on it a bit more lately and I figured it's time to share it. The script is configurable to check for "certain" files in a user's directory (i.e., .iso, .mp3, .etc), has a minimum reporting threshold setting, and outputs to a file.

Keep an eye out for crazy numbers because I'm seeing differences in the way the find and du commands report, depending on their versions. So if you see some weird reporting situation, let me know so I can address the problem.

Using user quotas on server would probably be just as effective but what can I say, I like a challenge.

Note: before you light your torches, I don't claim to be a bash scripting expert (not yet anyways). So if anyone has any "constructive" criticism, please feel free to leave a comment.

The script is GPL (of course), so please feel free to use any part of it (or the whole thing) as you wish.

Here's a link to download the file:
UserUsageReport.tar.gz
sha1sum: eba4b49a75602240659ac45a5f4eef3e14d7f402

Enjoy.

Shannon VanWagner

Jun 11, 2011

Setting to Automatically Extend Your Screen onto External Monitor in Ubuntu Linux w/Nvidia graphics

Setting to Automatically "Extend" Your Screen onto External Monitor in Ubuntu Linux w/Nvidia graphics

Just a quick write up with a fix for those who are having problems saving their "extended" monitor configurations when using their notebooks with and without the docking station.

For a long time I would use the nvidia-settings utility to manually set up my external monitor after docking. This required several clicks of the mouse. Now I've found a way to make a minor edit to my /etc/X11/xorg.conf file that will keep the "extended" setting when docked and revert to the single screen without issue when not.

Here are the 2 steps to to configure Ubuntu GNU/Linux to allow you to a.) automatically "Extend"your display onto the external monitor, set the external monitor as "primary"(configurable), set the external monitor to be to the right of the built-in one(configurable), and autoselect the best resolution for the monitors as necessary. Note: these steps only need to be performed once:

1.) Backup your current xorg.conf, then modify the current xorg.conf (note: gedit is a graphical text editor, starting it with gksu is like starting it as admin, this is required because it lives in system space (not user space))

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.beforenvidiaclonesetting
gksu gedit /etc/X11/xorg.conf

2.) Now, find the section entitled 'Section "Device"' and insert the following lines (Make sure to add the text below between 'Section "Device"' and "EndSection", see example below), save the file, then close gedit.

#Enables the "extended desktop" setting
Option "TwinView" "1"
#Set which screen gets to be primary with TwinViewXineramaInfoOrder
Option "TwinViewXineramaInfoOrder" "DFP-0"
#Set the position of each monitor
Option "TwinViewOrientation" "CRT-0 RightOf DFP-0"
#Autoselect the best resolution for the monitors
Option "MetaModes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"

Here's is an example of what the specific section of the xorg.conf should look like:

Section "Device"
     Identifier "Default Device"
     Driver "nvidia"
     Option "NoLogo" "True"
     Option "TwinView" "1"
     Option "TwinViewXineramaInfoOrder" "DFP-0"
     Option "TwinViewOrientation" "CRT-0 RightOf DFP-0"
     Option "MetaModes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"
EndSection

That's it! Logout and back in with your external monitor attached and it should work as an "exteneded" external monitor (with normal resolution settings and primary being the attached monitor).

Should you need to roll back from the settings, simply run this terminal command, then logout/login:
sudo cp /etc/X11/xorg.conf.beforenvidiaclonesetting /etc/X11/xorg.conf