Ubuntu 12.04: A review, a guide, and bug fixes

I took the plunge only two days after release to upgrade to Ubuntu 12.04. In a bit, I will give my review of how this version fairs. I also have a guide (compiled from many other guides) on what to do when you are first coming to Ubuntu after the upgrade. Finally, I provide a helpful guide on fixing a rather strange issue (which was caused by following one guide without research). I think installing Oracle Java 7 on Ubuntu 12.04 will be a problem for a lot of people, so I hope I can help someone fix these problems that gave me quite the headache.

Ubuntu 12.04: A 48-Hour Review

I am a Linux user. I use Windows almost exclusively for gaming, but I surf, type this blog, and write on Ubuntu Linux. I’ve tried a lot of flavors, but for various reasons, I have always returned to Ubuntu. I liked the ease of use, the customization, and a lot of things that Ubuntu has done.

For those uninitiated with Ubuntu, every six months a new version is released. I am one to be reluctant to upgrade for a lot of reasons. Notably, when you click “Upgrade” in Ubuntu, in my and many other people’s experiences, the upgrade is very dirty and usually results in a lot of errors. This means that every upgrade of Ubuntu requires me to wipe my hard drive completely, which obviously is quite frustrating. Another point of reluctance is the fact that Linux is a community project, so sometimes bugs aren’t caught until some time later.

I want to take a moment to break up this interview with a brief explanation of Ubuntu’s release schedule. First, every version has an alliterative name with an animal. This version is called Precise Pangolin. Before that we had Oneric Ocelot, Natty Narwhal, and Maverick Meerkat. Next, each version is named AA.B were AA = the year of release and the B = the month. So, for Ubuntu 12.04, it was released in April 2012. This naming helps to place a date on the version. Finally, most versions of Ubuntu are supported (updates, fixes, etc.) for about 18 months. With a few versions, dubbed Long-Term Support or LTS release, actually have support for about 3 years, which usually is a year longer than the next LTS. So far, there have been 4 LTS versions – 6.06, 8.04, 10.04, and now, 12.04. These versions usually get a lot of the Ubuntu fanbase because they are built up over a long period of time.

Now, from Ubuntu 10.10 to 11.04 there was a critical, stark change: the Desktop display was changed from Gnome to Unity. Unity is interesting. I am not 100% certain of all the technical details behind it, but most notable is the panel of items that appears on your screen. See an example here.

For someone coming from Windows, this is a stark change, but it does allow a lot more screen real estate since that panel can go disappear if you don’t scroll over it. Getting into my experiences, I came from 11.04. I have been using Dropbox as my exclusive “important files” drive. This made upgrading as much as moving stuff to a different folder, letting it sync, then wiping my computer. One of the first things I noticed was that Dropbox is now in the Software Center, a graphical cache of software, typically approved or at least considered safe. Before, I had to run a series of special applets and run a lot of commands to get Dropbox to work the way it does on Windows. With 12.04, I just downloaded the app to get it working perfectly.

With Unity, Lens were added that allow for extra functionality. I haven’t yet started adding these lens, but I know some work really well at adding functionality to your desktop without much effort. The next thing I noticed was how little I had to do to set up Ubuntu to work like I need. I downloaded Chrome since Google has taken up support of Flash for Linux. I added a few extensions to that, and I installed Java after some issues, and that was really it.

I think Ubuntu 12.04 is a really good way to get people who like the “it just works” of OSX. If you don’t want to download the 600MB file, burn it to a disc, and run it as a LiveCD, try running it online. It’s very similar to how you will experience Ubuntu when you actually try it.

I’ll add a week update once I have been on this version for a while. So far, everything runs a lot smoother than Ubuntu 11.04 did. I am really satisfied with what I have so far.

I used a series of guides to set up Ubuntu which I linked to in the next section, and I will explain how I set up my computer to work for surfing, writing, etc. in as concise a manner as possible. I also include my first bug fix.

By the time I was close to publishing this review, I realized I never used Lens. I plan to do an update post where I walk through my Unity Lens experience.

What to do after installing Ubuntu 12.04

Before I ever do anything serious on a new install, I search for a few guides on how to set up Ubuntu. I usually grab two or three guides since no two guides will be perfectly the same, and if I run into issues, I am usually saved by a subsequent guide. Here are the three I used:

http://www.ubuntuvibes.com/2012/04/things-to-do-after-installing-ubuntu.html
http://www.omgubuntu.co.uk/2012/04/10-things-to-do-after-installing-ubuntu-12-04/
http://www.unixmen.com/201204-top-things-to-do-after-installing-ubuntu-2/

If you have any trouble running anything after, I recommend http://askubuntu.com/ then http://ubuntuforums.org/. Being so community driven, Ubuntu has probably every issue you will come across well documented online.

There’s not much else I can offer in this section, but those guides will give you a great start to having a bug-free open source OS.

How to Install Oracle Java 7 in Ubuntu 12.04

There I was, following my guides to the T to make sure I was on par with everyone. I followed the guide to install Java 7, and it failed. Horribly. I tried to get around that, but nothing worked. I started to ignore it, but then I got the following errors repeatedly


sha256sum mismatch jdk-7u3-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up openjdk-7-jre (7~u3-2.1.1~pre1-1ubuntu2) ...
Setting up icedtea-netx-common (1.2-2ubuntu1) ...
Setting up icedtea-netx (1.2-2ubuntu1) ...
update-alternatives: using /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
Setting up icedtea-7-plugin (1.2-2ubuntu1) ...
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

With Ubuntu 12.04 less than a week old, I was becoming annoyed with this until I searched one line “sha256sum mismatch jdk-7u30-linux-x64.tar.gz.” Now, I am no computer science major, but I have dabbled with checksum in Android when doing a custom ROM. I had seen variations of sha256sum, so I put two and two together, searched that line, and I found the perfect fix.

First, I ran these commands that I found here:

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

I checked Java via

java -version

It checked out perfectly with:

java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

I headed to the Java verifier which worked out perfectly. Then, I uninstalled an item that caused my Package Operation Failure. No error message like before. I reinstalled it and no message! Success! Finally, I ran these commands, which I got from here, to make quintuply sure:


sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

These commands cleaned up a few broken packages, and all is well now. I’ll be sure to post some more bug fixes as I find them, but this one was giving me and others a big headache.

How to Set Up Universal ADB on Ubuntu 12.04

If you have an Android phone that is capable of it, and you are using Linux, you probably either already do or want to flash new ROMs to your phone. Most phones make this pretty easy to on the actual phone. However, if you want to use your computer, here’s the method I used to set that up. As it says, I can access ADB from any folder and just by typing ADB before my command. The core set-up comes from Team Noctural

First, you need to have Java installed, which my previous bug update helps. Next, download the Linux SDK. Extract this file to your /home/ folder and rename it as Android. Now, we need to get into to your tools folder in this Android directory in the Terminal. Do that by doing this by opening a terminal, and typing:

cd /home/USER NAME/Android/tools/

If that worked, good. If not, double check the spelling and capitalization.

Okay, if you noticed, when we downloaded this SDK, it was with the 32-bit extension. Run this on 64-bit to be able to use this without issue. It takes a while to download.

sudo apt-get install ia32-libs

All good? Okay, we will be editing some text files for the sake of redirecting the locations of things:

sudo gedit ~/.bashrc

Once that opens, add this to the very end of it:

# Android tools
export PATH=${PATH}:~/android/tools
export PATH=${PATH}:~/android/platform-tools

Save and close the file. Next, we will edit the .profile:

sudo gedit ~/.profile

Add add these two lines to the very end as is:


[...]
PATH="$HOME/android/tools:$HOME/android/platform-tools:$PATH"
export PATH="$HOME/android/tools:$HOME/android/platform-tools:$PATH"

Save and close that file, and now plug in your device with a USB cable. Type this:

lsusb

Here is my output:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04f2:b1d8 Chicony Electronics Co., Ltd
Bus 001 Device 065: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]

My device is a Samsung Galaxy Nexus. So, I need to keep that bolded part for the next bit. Next, we will create and customize a udev file. Type this:

sudo gedit /etc/udev/rules.d/99-android.rules

A file opens, and copy this into it, paying attention to change your value for my bolded value.


#Acer
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666
#ASUS
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666
#Dell
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666
#Foxconn
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666
#Garmin-Asus
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666
#Google
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666
#HTC
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666
#Huawei
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666
#K-Touch
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666
#KT Tech
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666
#Kyocera
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666
#Lenevo
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666
#LG
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666
#Motorola
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666
#NEC
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666
#Nook
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666
#Nvidia
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666
#OTGV
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666
#Pantech
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666
#Philips
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666
#PMC-Sierra
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666
#Qualcomm
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666
#SK Telesys
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
#Sharp
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666
#Sony Ericsson
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666
#Toshiba
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666
#ZTE
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666

SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8:6860", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

Save and close that file. Almost done. We now need to give this file you just created the rights to run. Type:

sudo chmod a+rx /etc/udev/rules.d/99-android.rules

sudo restart udev

sudo service udev restart

That should give you a blank terminal line with your name. Next, we will download ADB’s SDK.


cd
cd /home/USER NAME/Android/tools/
./android

You will get an Android SDK pop up. Check the box that is pre-checked and Platform tools. Click Install or Update, whatever is there. This takes a while. Let it.

Okay, ADB is now installed and works. I added this next step to save thinking and trouble. Do this:


cd
cd /home/USER NAME/Android/platform-tools/

sudo cp adb /bin
sudo cp fastboot /bin

To make sure everything worked, type this with your phone plugged in:

adb devices

And, if you did everything correctly, you get this:

List of devices attached
014682881600C014 device

Now, you can do ADB and fastboot anywhere on your computer just by adding that command. If there are any issues, comment on this, and I’ll try to help.

Be Sociable, Share!
mm
About

I am a technical and creative writer who seeks to create a space where I can share my works, publicly.

7 Comments

  1. Afifi

    i still have empty under “List of devices attached”
    is there any help ? i am using ubuntu 12.04

    thanx

    1. mm
      Eric

      While I hope you fixed this already, there’s a few solutions if you haven’t.

      Namely, make sure USB Debugging is enabled under Settings. On 4.0+ it’s under Developer’s Tools. This is usually the cause for that. If not, you MAY have to add permissions to do that, but again, this was a while ago, so if you need that help, just reply.

  2. jo

    when i type sudo cp adb /bin
    i get this
    cp: not writing through dangling symlink `/bin/adb’
    and when i
    adb devices i get this
    0149AE7C14015020 device

    1. mm
      Eric

      This is a bit of an older comment, but did you solve this issue? The newest version of Ubuntu has adb and fastboot accessed via sudo apt-get.

  3. richard

    You are the man! I just installed Ubuntu 12.04 and
    this is a hell of a “starter kit” In less than 1 hour I’ve got my system up and running and adb for my samsung reverb. A thousand THANKS!

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 3 =