Oracle Java in Ubuntu

So you know that OpenJDK is preferred but want the latest Oracle version of Java and trust webupd8team to do it for you automatically? This was tested 30 Dec 2013 using Ubuntu 13.10 (Saucy Salamander) and Java 1.7.0_45-b18 but it works on many Debian derivatives. Give it a try:

# Add the repository ppa:webupd8team/java (recommended) or ppa:eugenesan/java
$ sudo add-apt-repository ppa:webupd8team/java

# Update the source list
$ sudo apt-get update

# Install Java
$ sudo apt-get install oracle-java7-installer

# Check the version
$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)


http://www.java.com/en/download/installed.jsp?detect=jre
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
Should you need to purge old versions:
 sudo apt-get purge oracle-java7-installer*
 sudo apt-get install ppa-purge
 sudo ppa-purge ppa:eugenesan/java
 sudo ppa-purge ppa:webupd8team/java
 sudo apt-get clean
 sudo apt-get update

Clean up Picasa 3.9 contacts.xml with beginner perl commands at your friendly bash $ prompt.

So your Picasa 3.9 contacts are all messed up and you cannot edit some of them because they are linked to various google accounts. Next time, try to keep it clean by having email addresses for all your contacts. (Kamal even uses fake ones to help keep things linked, I don't go that far.) Valid email addresses will help Picasa 3.9 match your contacts up better as you switch from account to account. For now, take the power back and edit freely in Picasa offline, by logging out then removing all the links using the perl lines below:

#Get into your wine contacts folder:
cd "/home/USER/.wine/drive_c/users/USER/Local Settings/Application Data/Google/Picasa2/contacts/"

#Make a backup:
cp -a contacts.xml backup-contacts

#Remove all the "subject user" lines:
perl -n -i -e 'print unless /subject user|^$/;' contacts.xml

#Remove all the profile_photo_url tags:
perl -p -i -e "s/(profile_photo_url=\"([^\"])*\" )//g" contacts.xml

#Remove all the google_plus_id tags:
perl -p -i -e "s/(google_plus_id=\"([^\"])*\" )//g" contacts.xml

#Remove all the gaia_id tags:
perl -p -i -e "s/(gaia_id=\"([^\"])*\" )//g" contacts.xml

#Look what you did and clean it up more by hand if you like:
vi contacts.xml


Improve and simplify this if you like. These perl docs are really good:
http://perldoc.perl.org/perlrequick.html
http://perldoc.perl.org/perlrun.html
Mastering Regular Expressions, 3rd Edition
Other Picasa 3.9 Notes:
Picasa 3.9 added the option to store Nametags in the Metadata that is part of each photo file. No more lost tags when you copy JPG's elsewhere. Turn it on by Tools -> Options -> Name Tags -> Store Name Tags in Photo. Fix your old files with Tools -> Experimental -> Write Faces to XMP. This will take a long time as all your JPG files will be changed. Exif Viewer