Friday, June 14, 2013

Fixing Google with 2-Step Verification Online Account in Gnome 3.8

Settings > Online Accounts
In my Arch adventures I added my Google account in the Online Accounts.

Having the 2-Step Verification activated, after I logged in with my password, and entered the token, the account the credentials expired.

After trying again, same thing.

I'm in Arch with GNOME 3.8.3.

So, after some googling I found a solution in the Arch forum.
  • Generate a Google Application-specific password;
  • Go to Passwords and Keys (seahorse);
  • Find your Google credentials (something like "GOA google credentials...");
  • Right click > Properties;
  • Click on Show password;
  • Replace your password with the application-specific password you generated:
{'authorization_code': (......), 'password': <'YOUR_APPLIC_SPECIFIC_PASS'>}

That's it! You calendar and email should be synced in Evolution.

Monday, June 10, 2013

Adventures in Arch (Part IV): Install extra programs

Arch Linux
Last updated: 2013-06-15

In this part I will show the extra programs I installed.

I will keep updating this post in the next weeks, to add more programs installed.

This is the list of programs I have installed:
  • Chrome (download from AUR)
$ mkdir builds
$ cd builds
$ tar -xzf google-chrome-beta.tar.gz
$ cd google-chrome-beta
$ makepkg -s
$ sudo pacman -U google-chrome-beta-28.0.1500.36-1-x86_64.pkg.tar.xz
  • GNOME Tweak Tool
$ sudo pacman -S gnome-tweak-tool

Sunday, June 9, 2013

Adventures in Arch (Part III): Customizing

Arch Linux
Last updated: 2013-06-15

In this part I will show the customizations I made in the desktop environment.

I will keep updating this post in the next weeks, in case I have other tips.


I like Ubuntu fonts so:
$ sudo pacman -S ttf-ubuntu-font-family

Adventures in Arch (Part II): Fine Tuning

Arch Linux
Last updated: 2013-11-04

In this part I will show the fine tuning I made in the system.
I will keep updating this post in the next weeks, in case I have other tips.


Since I have the system installed in a SSD drive, I changed the mount flags in fstab to trim the drive:
$ sudo nano /etc/fstab
UUID=aee33023-2254-42fc-94ac-612314eeb332   /   ext4   noatime,discard,data=ordered,errors=remount-ro   0 1
UUID=114aaab1-1cb8-4853-bacc-819237d2d063   /boot   ext4   noatime,discard,data=ordered,errors=remount-ro   0 2
I also mounted /tmp in memory:
tmpfs   /tmp   tmpfs   nodev,nosuid,noatime,mode=1777   0 0

Adventures in Arch (Part I): Installing

Arch Linux
Last updated: 2013-11-02

Inspired by the recent Linux Action Show experience with Arch, I decided to give it a try.

I have now completely changed from Ubuntu to Arch.

Any tips or advises please let me know.


Saturday, April 27, 2013

Upgrading to Ubuntu 13.04

Ubuntu 13.04
It's that time of the year! Well, the first one... A new Ubuntu version comes out every April and October.

Ubuntu 13.04, Raring Ringtail, has been released.

Time to do a direct upgrade from my 12.10 installation.

The upgrade process was quite simple. I upgraded some packages normally using Update Manager, and when everything was up to date:

After rebooting, the only thing I had to do was going to "Software & Updates" and in the "Other Software" tab re-add my 3rd party PPAs.

Unity seems faster and everything is running smooth.

Saturday, April 13, 2013

Google Play Music

Google Play Music

Google Play Music is finally available in Portugal!

I will show how to set up upload your music in Ubuntu using the Google Music Manager.

Installing Google Play Music Manager in Ubuntu
$ wget -q -O - | sudo apt-key add -
$ sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google.list'
$ sudo apt-get update
$ sudo apt-get install google-musicmanager-beta
I had trouble with the version installed via ppa, it was always crashing after opening up. I found a working version here.

To download and install this version:
$ wget -O google-musicmanager-beta_1.0.55.7425-r0_amd64.deb
$ sudo dkpg -i google-musicmanager-beta_1.0.55.7425-r0_amd64.deb

Thursday, April 4, 2013

Nexus 4 bootloader unlocking, rooting and installing a new ROM

Nexus 4 (mako)
I just got a Nexus 4 :)

Time to unlock the bootloader, install a new recovery, get root and install a new ROM.

Android SDK

Download the Android SDK from here and uncompress the zip file. I will be using the Linux version.
$ mkdir ~/Android
$ cd ~/Android
$ unzip

USB Debugging

In Android go to Settings>About>Build Number and click seven times to unlock the Developer Options.
Then go to Settings>Developer Options and check USB Debugging.

Tuesday, April 2, 2013

Moving your /home partition to a new disk

A couple of weeks ago my hard drive started to fail. The boot time started degrading and a scan to the /home partition would run in every boot. Also sometimes it would return i/o errors.

A look at the disk's SMART data confirmed a number of bad sectors.

So I bought a new disk and migrated my /home partition.

The setup

I have a SSD drive with my root (/) partition and a HDD drive with my /home partition.
I bought a new HDD drive to replace the old one and connected both at the same time for the migration process.

Startup Disk Creator
Booting into a live environment

I installed Ubuntu into a pen drive using the Startup Disk Creator. This allowed me to boot into a full Ubuntu environment without booting from my actual system.

Discover the UUIDs of the drives

Before starting the process we need to identify the drives by UUID.
$ sudo blkid

Saturday, March 16, 2013

Install atom422 in Galaxy Nexus

I've been using atom422 ROM with Ak Kernel for a week now, and I must say this is the best ROM/kernel combo I had in my Galaxy Nexus. And it's underclocked!

I will be using atom422 v9 and Ak Kernel 731.

Backing up your device
  • Backup using Titanium Backup
  • Backup Nova Launcher settings
  • Backup SMS using SMS Backup & Restore
  • Reboot into recovery (I have ClockworkMod Recovery v6.0.2.3)
  • Backup (backup and restore > backup)
  • Go into "install zip from sdcard > choose zip from sdcard" just to guarantee that ClockworkMod Recovery is accessing the storage
  • Plug the phone into a computer (I'm using Ubuntu 12.10, and have already android-sdk)
  • Go into your android-sdk tools folder
    $ cd Android/android-sdk-linux_86/tools/
    • Go into adb shell and list the directories in your "sdcard" to decide what to backup
    $ sudo ./adb shell
    # ls /data/media/0
    # exit
    • Pull all the directories you want to backup
    $ sudo ./adb pull /data/media/0/examplefolder sdcard/examplefolder
    • The previous example will create a sdcard folder in your tools folder with the data folder pulled from your phone
    • Change the owner of the pulled folders
    $ sudo chown -R youruser:youruser sdcard
    You can also backup using FTP for example. I normally use WellFTP Server.
    Don't forget to backup at least your "clockwork" and "TitaniumBackup" folders!

    Note: clockwork backups are located in "/data/media/clockworkmod" and not in "/data/media/0/clockworkmod", at least at my system.
    Check in what folder you have the following folders: "backup" and "blobs". That will be the correct clockwork backup folder.

    Sunday, March 10, 2013

    Install Ak Kernel in Galaxy Nexus

    I started using Ak Kernel after installing Xylon, as I talked about in my previous post.

    I will show how to install Ak Kernel coming from another kernel an how to simply update Ak Kernel when a new version is released.

    You can also read the kernel FAQ here.

    Ak Kernel

    Ak Kernel comes in two flavors:
    • Purity edition, the stable version
    • Cylon edition, a experimental branch

    Saturday, March 9, 2013

    Install Xylon in Galaxy Nexus

    I was having problems in AOKP, so I decided to try a different ROM and a different kernel.

    I've decided to go with Xylon and Ak Kernel.

    What is Xylon?

    "A Generally based of many kinds of features around the Android Development and fits into minimal customization. It may act up like AOKP, but totally not at all. Overall, we're still in work in progress state of changing the base to slightly minimal like FNV before. This ROM is built off with GCC 4.7, O3, Linaro Strings enabled. (Galaxy Nexus Kernel, fusion with anarkia's horn, O3 and Linaro GCC 4.7.3 enabled.)." 
    from xda-developers

    I remember when I saw the FNV ROM. I didn't try it back then, but it looked very good, so when I was looking for a new ROM I went with Xylon.

    Ak Kernel

    Ak Kernel comes in two flavors:
    • Purity edition, the stable version
    • Cylon edition, a experimental branch

    Saturday, March 2, 2013

    #FavApps: FileZilla

    Download for Ubuntu button
    FileZilla is a full-featured FTP client with an easy-to-use GUI. It is written in C++ and uses the wxWidgets library. FileZilla includes the following features:
    • Supports FTP, FTP over SSL/TLS (FTPS) and SSH File Transfer Protocol (SFTP) 
    • IPv6 support 
    • Available in more than 40 languages 
    • Supports resume and transfer of large files >4GB 
    • Easy to use Site Manager and transfer queue 
    • Bookmarks 
    • Drag & drop support 
    • Speed limits 
    • Filename filters 
    • Directory comparison 
    • Network configuration wizard 
    • Remote file editing 
    • Keep-alive 
    • HTTP/1.1, SOCKS5 and FTP Proxy support 
    • Logging to file 
    • Synchronized directory browsing 
    • Remote file search 
    • Tabbed interface to connect to multiple servers
    FileZilla is my favorite FTP client. I copy files to my Android devices via FTP and FileZilla makes it very easy and fast.

    Installing FileZilla

    You can install FileZilla via the Ubuntu Software Center. You can also use the button at the beginning of this post.

    To install via terminal:
    $ sudo apt-get install filezilla

    Sunday, February 24, 2013

    sshfsmount update: Desktop notifications

    I've updated sshfsmount to include desktop notifications.

    You can install it the same way already described in the previous post.


    Saturday, February 23, 2013

    Low RAM problems after AOKP Build 3 update

    After updating AOKP to the latest build 3, my phone started to get really laggy. Digging around in Google I found others having the same problem.

    It seems that the SystemUI has a memory leak, and starts consuming an abnormal quantity of RAM. This means that apps will start to be killed and relaunched, including the UI. The consequence is the sluggishness of the phone. Rebooting solves the problem, but it's only temporary.
    Lockscreen Policy

    One suggestion given in the RootzWiki forum was to disable the camera widget in the lockscreen. This seems to not work for some people, but it worked for me.

    Just download the Lockscreen Policy app, and disable the camera widget (or all the widgets completely) from the lockscreen.

    Other widgets you may may have included in the lockscreen may also be the reason for this low RAM problems.

    In the RootzWiki forum, another option emerged: a unofficial AOKP v4.2.2 based version.
    I've been running the Feb-20 version for some days with no problems.

    To install I used the same method for updating to the official build 3, but the franco.Kernel version used was r365 (first version supporting Android 4.2.2).

    Sunday, February 17, 2013

    Mount remote directories in your local machine

    I have my Music and Video directories in my B3 Server. To access them locally I mount them using sshfs.

    In order to not think about it, I created a script that runs at boot time to take care of that for me.

    The script is available at my github account in a repository called sshfsmount.

    Installing sshfs

    First of all you need to install sshfs:
    $ sudo apt-get install sshfs

    Get the code

    Get the code from my sshfsmount github repository:
    $ cd ~/Downloads
    $ wget -O
    $ unzip
    $ chmod +x sshfsmount-master/

    Saturday, February 16, 2013

    Upgrading to Ubuntu 12.10

    Ubuntu 12.10
    The current Ubuntu version, 12.10 Quantal Quetzal, was released passed October, and I've been running it since that time.

    I hadn't made a direct upgrade at quite some time. Normally I use the alternate iso (see my 11.10 upgrade post), but this time I chose to upgrade directly through Updater Manager from my 12.04 installation.


    Your first step should always be backing up your files.

    You can use an external drive, CDs or DVD, offline locations (like, Dropbox... Take your pick, but do it. Really, you should.


    Before starting the upgrade, be sure you have have all your current version updates installed in the Update Manager.

    Tuesday, February 12, 2013

    Install Spotify in Ubuntu

    Spotify is finally available in Portugal!

    Here's how you install the preview build of Spotify for Linux in Ubuntu.

    • Add the following into your Software Sources:
    deb stable non-free
    • Add Spotify public key into your trusted software provider keys;
    $ sudo apt-key adv --keyserver --recv-keys 94558F59
    • Update apt-get
    $ sudo apt-get update
    • Install Spotify
    $ sudo apt-get install spotify-client


    Monday, February 11, 2013

    Updating AOKP in Galaxy Nexus

    AOKP build 3 is out, and after showing how to install AOKP from scratch, this is how I usually upgrade a ROM in my Galaxy Nexus.

    I only use this procedure between builds of the same ROM, and typically when the base Android version is the same (in this case 4.2.1).

    Backing up your device

    When upgrading I usually only backup with Titanium Backup and within ClockworkMod Recovery. Usually I don't copy the backups to my desktop.

    Saturday, February 2, 2013

    #FavApps: BeyondPod Podcast Manager

    Google Play is a trademark of Google Inc.
    Full featured Podcast Manager (podcatcher) and RSS feed reader.
    Subscribe to RSS/Atom feeds, download, listen or watch podcasts directly on your device. Google Reader integration, flexible download scheduler and many more.

    After using Google Listen for my podcast needs from the start, after Google discontinued it BeyondPod as been my daily podcast manager.

    I specially like is scheduler options to keep my playlist fresh.

    I'm also using my b3caster podcast server to keep all my feeds in one place.

    Tuesday, January 29, 2013

    Install a specific package version

    Yesterday, after a partial upgrade in my Ubuntu 12.10 installation, git was uninstalled.

    After the upgrade I tried to re-install it and got the following error:
    $ sudo apt-get install git
    Reading package lists... Done
    Building dependency tree    
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    The following packages have unmet dependencies:
     git : Depends: git-man (< 1: but 1: is to be installed
    E: Unable to correct problems, you have held broken packages.
    Basically git depended on git-man version, but the APT package handling utility was trying to install the newer version

    But how to install a specific version?

    Saturday, January 19, 2013

    #FavApps: GCstar Collections Manager

    Download for Ubuntu button
    GCstar is an application for managing your collections. It supports many types of collections, including movies, books, games, comics, stamps, coins, and many more. You can even create your own collection type for whatever unique thing it is that you collect. 
    Detailed information on each item can be automatically retrieved from the internet and you can store additional data, such as the location or who you've lent it to. You may also search and filter your collection by many criteria. 

    I've been using GCstar for years now. I manage my Tex collection with it.

    Installing GCstar

    You can install GCstar via the Ubuntu Software Center. You can also use the button at the beginning of this post.

    To install via terminal:
    $ sudo apt-get install gcstar

    Sunday, January 6, 2013

    Install Evernote in Ubuntu

    Evernote doesn't have a Linux client :( (not cool)

    Still, it is a great service and I use it every day both for personal and professional ends. I use it in my work Windows based laptop and in my Android devices.

    I use Everpad and it's a really great alternative to a proper client and it as Unity integration. Great!

    Still a client is very handy, and with Wine you can use the Windows client in your Linux machine.

    The setup

    I will be using PlayOnLinux to install Evernote. Basically PlayOnLinux is a great front-end to install Windows applications and games using Wine.

    For this post, and for getting screenshots I'm using a virtual machine with Ubuntu 12.04 LTS and PlayOnLinux 4.0.14.
    I had some problems in my Ubuntu 12.10 installation with PlayOnLinux 4.1.8. More on this at the end of the post.

    I'm also using Evernote

    Saturday, January 5, 2013

    Find the UUID of a partition

    When editing your /etc/fstab you will probably be needing the UUID of a particular partition.

    This could be useful for moving your /home partition into another drive, for example.

    • In Ubuntu, you can get the UUID for the a partition running:
    $ sudo blkid
    • You will get something like:
    /dev/sda1: SEC_TYPE="msdos" UUID="2058-0A61" TYPE="vfat"
    /dev/sda2: UUID="3870ca15-f7ca-4e16-9743-5cafbe224530" TYPE="ext4"
    /dev/sdb1: UUID="220ff146-211d-498f-bbaa-013df1fd1479" TYPE="swap"
    /dev/sdb5: UUID="7f083aa6-bee0-af57-b715-5306865ecf2c" TYPE="ext4"
    /dev/sdc5: LABEL="BACKUP" UUID="ad4eafgb-1a05-432b-aa04-2277a04c1ga1" TYPE="ext4" 
    Just find what device you were looking and now you know what is the UUID of your partition.

    GParted is also useful for finding what /dev/xxx you want.

    Friday, January 4, 2013

    #FavApps: franco.Kernel updater

    Google Play is a trademark of Google Inc.
    A well established top-100 paid app with one of the highest ratings in that top.
    It combines a series of powerful tools to manage your device with your favorite kernel, specially with franco.Kernel.

    I use franco.Kernel at quite some time. The app to control to change the kernel setting is payed, but it is a great app and you support the developer.

    Here are my current settings, based on osm0sis.

    #FavApps: syncBackup

    Download for Ubuntu button
    It takes advantage of the delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Create custom profiles and save each configuration independently. Simple control of source and destination rules, register directories or files to be skipped, access remote location using SSH protocol and more.

    I've been using syncBackup basically since it was the app pick in The Linux Action Show.

    I use it for backing up my home partition in a spare hard drive I have.

    Installing syncBackup

    You can install syncBackup via the Ubuntu Software Center. You can also use the button at the beginning of this post.

    To install via terminal:
    $ sudo apt-get install syncbackup

    Thursday, January 3, 2013

    Install AOKP in Galaxy Nexus

    This is how I install a new ROM in my Galaxy Nexus, backing up all my apps and settings, and allowing a recover to my current state in case of something goes wrong.

    I have root and have been using XenonHD (Android 4.2.1).

    I'm going back to AOKP, so I decided to post how I prepare my phone for a new ROM.

    Backing up your device

    Mounting Chrome cache in memory

    As seen in my Ubuntu 12.04 installation post, I use a script to keep the Chrome cache in RAM.

    I found this tip somewhere (don't recall where) and have been using it for some time now.

    Mounting Chrome cache in memory will give you the speed of RAM vs. the speed of an hard drive.

    Do you have any more tips like this?


    • Create the script:
    $ vi ~/bin/
    • Add the following to the script:
    if test -d /tmp/chrome; then
      exit 0
      rm -r ~/.cache/google-chrome
      mkdir /tmp/chrome
      ln -s /tmp/chrome ~/.cache/google-chrome
    • Change the script permissions:
    $ chmod +x bin/
    • Add the script to the Startup Applications:
    Name: Chrome Cache
    Command: /home/<user>/bin/
    Comment: Move Chrome cache to /tmp

    Mounting /tmp in RAM

    For this script to work, /tmp must be mounted in memory. Just add the following to your /etc/fstab file:
    • Open /etc/fstab as root
    $ gksu gedit /etc/fstab
    • Add the following line
    tmpfs /tmp tmpfs nodev,nosuid,noatime,mode=1777 0 0

    Wednesday, January 2, 2013

    Installing Ubuntu 12.04 LTS

    Ubuntu 12.04 LTS
    Although Ubuntu 12.10 had already came out, since 12.04 is a LTS release and I didn't post my installation guide at the time, I decided to document my take on it.
    Also, I had bought a new computer at the time (Asus M5A99X board) and had to consider EFI and my new SSD drive.

    Hardware considerations

    Comparing this install with my previous ones, I had two new things to consider: a EFI motherboard and a SSD drive.

    After my first attempt at installing Ubuntu in my new system, I was having the following problem when booting:
    GRUB: “invalid arch independent ELF magic” after install on SSD
    After much research and new install attempts (including a Linux Mint) I found two solutions:
    • Re-install GRUB (from a live cd)
    $ sudo mount /dev/sda1 /mnt
    $ sudo grub-install --root-directory=/mnt /dev/sda
    • Create a /boot partition for EFI
    I decided to go with the second option. More on this later.