Friday, September 20, 2013

The best podcast app for Android: AntennaPod


It's about time! I've been looking for a decent Android podcast app for a while. The only ones I've seen up to this point are either:
  • Free but really lousy
  • Decent but cost $7
But my search is finally over.

Say hello to AntennaPod. It has all you'd need and want in a podcast app, plus it has a nice, clean interface, no ads, and it's free. There really isn't much more to say. Check it out, and if you like it, send the developer a buck or two.

Here's what the interface looks like so you can see for yourself:

Enjoy!

Saturday, September 7, 2013

Try out Xubuntu/Xfce from a normal Ubuntu installation


I've blogged before about Xubuntu/Xfce, but what if you've already got regular Ubuntu installed and want to try out Xubuntu without reinstalling? Thankfully, it's actually pretty easy, and you can have it up and running in a matter of minutes:

  1. Install Xfce and the settings to make it look like Xubuntu (if you prefer it to look more like vanilla Xfce instead of Xubuntu, leave out xubuntu-default-settings):
    sudo apt-get install indicator-application-gtk2 indicator-sound-gtk2 xfce4 xfce4-datetime-plugin xfce4-indicator-plugin xfce4-terminal xubuntu-default-settings

  2. Log out

  3. Click the icon to the right of your username and select Xubuntu Session (you can also choose Xfce session if you want vanilla Xfce)

  4. Type your password and log in
That's it! Now, you can customize Xfce to your liking. These are all optional of course, but they're some of the customizations I prefer:

  1. Disable dock auto-hiding
    1. Click on the Xfce icon (it looks like a mouse head) in the upper-left side of the screen

    2. Go to Settings --> Settings Manager --> Panel

    3. In the dropbox a the top of the window, change to the dock panel (probably Panel 2)

    4. Uncheck Automatically show and hide the panel

  2. Remove any empty icons in the dock by right clicking on them --> Remove

  3. Hide default desktop icons
    1. Xfce menu --> Settings --> Settings Manager --> Panel --> Icons

    2. Under Default Icons, uncheck any icons you wish to hide

  4. Remove the duplicate login screen entry
    1. If you prefer the Xubuntu look and feel and want to get rid of the Xfce Session entry, run this command:
      sudo mv /usr/share/xsessions/xfce.desktop /usr/share/xsessions/xfce.desktop.bak

    2. If you prefer the vanilla Xfce look and feel and want to get rid of the Xubuntu Session entry, run this command:
      sudo mv /usr/share/xsessions/xubuntu.desktop /usr/share/xsessions/xubuntu.desktop.bak

  5. Change the default file manager and terminal
    1. Xfce menu --> Settings --> Settings Manager --> Preferred Applications --> Utilities

    2. File Manger --> Nautilus

    3. Terminal Emulator --> GNOME Terminal
If, for some reason you accidentally chose Xfce Session (or Xubuntu Session) and it messed up your layout for the other, you can run this command to completely wipe your Xubuntu/Xfce settings and restore it to the default layout:

rm -rf ~/.cache/xfce4 ~/.config/xfce4

Just remember you will lose any customization you may have made to Xubuntu/Xfce.

Enjoy!

Wednesday, September 4, 2013

MP3s ripped from CDs in Ubuntu have incorrect track length

If you rip a CD in Ubuntu 12.04+ using the default program provided for this (Rhythmbox), the track lengths will be incorrect. This is because by default, Ubuntu will rip your mp3s using VBR, but it doesn't add the VBR headers.

Rather than go into the details, here's the easiest way to fix it:
  1. Install vbrfix by running this command in a terminal:
    sudo apt-get install vbrfix

  2. Now CD to the folder where the mp3s are that you need to fix:
    cd /path/to/mp3s

  3. Run this command to add the VBR headers to the mp3s:
    find . -type f -iname '*.mp3' -exec vbrfix {} {} \;

  4. Vbrfix seems to leave behind a couple of temporary files, so clean them up:
    rm vbrfix.log vbrfix.tmp
Another option would be to change the default preset to make it CBR. You can read more about doing that here: How do you edit the “Preferred Format” settings in Rhythmbox? Something like this ought to do the trick (change the bit rate as desired):
[mp3-cbr]
name=lamemp3enc
target=bitrate
bitrate=192
cbr=true
encoding-engine-quality=high
mono=false
You can read the details of the problem at this bug report:
Rhythmbox does not add VBR headers when ripping CDs to MP3

Wednesday, August 28, 2013

No cover when uploading to Google Play Books


If you upload a book to Google Play Books in EPUB format and one of these things happens:

  • The cover isn't showing up
  • The cover looks like the above image
  • The book doesn't open/gives you a 404 error
Here are some things to try:

  1. First of all, wait! Google has to extract the cover from the file, and for some reason it can take a long time for it to show up. I would recommend waiting at least an hour, if not longer. Yes, this might seem like way too long, but I've seen it take that long.

  2. If you're absolutely sure it isn't working, you can try to fix the cover using Calibre:
    1. Download Calibre, install it, and use it to open the EPUB file
    2. If the cover doesn't show up in Calibre:
      1. Right-click → Edit metadataEdit metadata individually
      2. Click Download cover
      3. Select a cover and click OK
      4. If no cover is found, find a cover online, and then from the metadata window in Calibre, click Browse to browse to the cover and add it.
      5. Click OK
    3. If the cover does show up in Calibre, the EPUB file may be corrupt. To fix it:
      1. Right-click → Convert booksConvert individually
      2. Output format → EPUB
      3. OK
    4. Save the file
      1. Right-click → Save to disk → Save to disk
      2. Select a location to save the EPUB to
    5. Remove the file you previously uploaded to Google Play Books
    6. Upload the modified EPUB to Google Play Books. It will be located in a subfolder in the location you specified in the previous step. You just want the EPUB file; you can ignore the other files.

  3. If the cover still isn't showing up, you can try to manually repair it.
    1. Download Sigil, install it, and use it to open the EPUB file
    2. Fix the cover according to the guidelines in the following blog post:
      Best practices in ePub cover images by Keith Fahlgren
    3. Once you're done, upload the modified EPUB to Google Play Books

  4. If the book won't upload at all, the cover may not be the problem
    1. Validate the EPUB using the validator here: http://validator.idpf.org/
    2. Modify the EPUB using Sigil or another EPUB editor, and keep validating it until there are no more errors
    3. Try uploading it to Google Play Books again

Saturday, August 24, 2013

Import playlists into Google Play Music


I've already covered getting playlists out of Google Play Music, but what if you want to import your playlists into Google Play Music? The easiest way to do this would probably be to get your playlists into iTunes or Windows Media Player and use Google's Music Manager to sync your playlists.

Being a Linux user, that's not the best option for me, so I came up with another way. This one's not for the faint of heart, so be sure you've got some time on your hands and lots of patience. Here we go:

  1. Just like my method for exporting playlists from Google Play Music, importing them will require a rooted Android device. The exact method for doing this varies by device, so you'll need to Google it.

  2. This may seem obvious, but first of all you need to make sure all of your music is in Google Play Music. It can take a while, so if you haven't done this you should probably get crackin. These links should help:

  3. Remove any music stored on your Android device's internal memory or SD card. This isn't absolutely necessary, but if you don't do this, any music in the playlists you wish to import that's on your device may not get added to Google Play Music playlists in the cloud.

  4. Get the playlists to import. This step will vary widely depending on where the playlists are coming from. You'll want your data file to contain the following fields:
    1. Playlist name
    2. Artist
    3. Title

    Based on the tools I've used to import data into a Sqlite database, I'd recommend that the data is in one of these formats:
    • A text file where each row is on one line, the fields are separated by a unique character (like the pipe symbol: |), and the fields aren't quoted. For example:

      Folk|Gregory Alan Isakov|Dandelion Wine
      Folk|Gregory Alan Isakov|That Moon Song
      
    • A Microsoft Excel XML file. You don't need Excel to create this; free programs such as LibreOffice Calc work fine.

  5. Make sure all of your tracks and playlists on your Android device are synced with Google's servers. I've already documented this; see step 1 in my post on exporting playlists from Google Play Music.

  6. Optional, but strongly recommended: back up Google Play Music. My app of choice for doing this is Titanium Backup (the free version will suffice, although I think it's worth paying for).

  7. Get the Google Play Music database file (music.db). The instructions for this are also in my post on exporting playlists from Google Play Music (step 2).

  8. Open the music database file. You can use a tool such as Sqliteman, or you can use the sqlite3 command in a terminal, like so:
    sqlite3 /path/to/music.db

  9. Import your playlists into the database file. This is where it gets fun!
    1. Create temporary tables
      create table "temp" ("Playlist Name" text, "Artist" text, "Title" text);
      create table "temp2" ("Playlist Name" text, "Artist" text, "Title" text, "ClientPosition" integer primary key autoincrement);

    2. Import the data. This will vary depending how your playlists are formatted and what program you're using. If you're using Sqliteman:
      • In the menu go to Database --> Import Table Data...
      • Table to Import Into --> select temp
      • File to Import --> Search... --> browse to your playlist file
      • Select an appropriate separator under Column Separators
      • Under Preview, you should see three columns with playlist name, artist, and title
      • Click OK

      If you're using the sqlite3 command:
      • Define the separator between fields. If it's a pipe (|), you can skip this step. For example, to set the separator to a dollar sign:
        sqlite> .separator $
      • Then import the file (things will be easier if the file name doesn't have spaces):
        sqlite> .import /path/to/playlists.txt temp

    3. Before we actually import the playlist entries, this query will show you what's actually going to get imported:
      select temp."playlist name", temp.artist, temp.title from music join temp on music.artist=temp.artist and music.title=temp.title;

    4. If some of your songs don't show up in the above query, then they either aren't in Google Play Music, or the artist or title aren't spelled the same. If you want at this time, upload or rename any missing music. If you decide to fix any missing music, you'll have to start over at the step above where you make sure the music on your Android device is synced with Google's servers.

    5. Copy the data from the temp table to the temp2 table (the temp2 table is my hack to keep the playlist order):
      insert into temp2 ("playlist name", artist, title) select * from temp;

    6. Now, we're finally ready to create the playlists. If you already have playlists in Google Play Music with the same names as the ones you're importing, you can skip this step. Here's the query (the _sync_dirty part is what tells Google Play Music that the data needs to be synced to the cloud):
      insert into lists ("Name", "_sync_dirty") select distinct "Playlist Name", '1' from temp2;

    7. We've created the lists, now we need to import the data into them:
      insert into listitems ("MusicId", "ListId", "ClientPosition", "_sync_dirty") select music.id as musicid, lists.id as listid, clientposition, "1" from music join temp2 on music.artist=temp2.artist and music.title=temp2.title join lists on "playlist name"=lists.name;

    8. Clean up after ourselves:
      drop table temp;
      drop table temp2;

  10. Just to be safe, turn off internet on the Android device (whether it's wifi or data)

  11. On the Android device, kill the Google Play Music app by going to the home screen --> Menu --> Settings --> Application manager --> scroll down and click on Google Play Music --> Force stop

  12. Copy the music.db file you modified back to the device's SD card

  13. Copy the music.db file from the SD card back to /data/data/com.google.android.music/databases

  14. This part can be tricky. Copying music.db back will probably mess up the permissions, which means at this point if you were to open the Google Play Music app, it would probably crash. To fix the permissions, you need to either use the command line or use a file explorer app that's capable of modifying the permissions. For these instructions, I used File Explorer by NextApp with the Root Add-On:
    1. Long-press on one of the other files in the folder, like music.db-journal --> Permissions
    2. Make a note of the Owner and Group
    3. Now long-press on music.db --> Permissions
    4. Click on Owner --> App --> change it to the same owner as the other file you just looked at. You'll see a Google Play Music icon beside the owner, which will confirm you're picking the right one.
    5. Repeat the same thing for the group.
    6. This isn't completely necessary, but you can also uncheck all of the boxes in the Exec column, and uncheck the Global box in the Read column. In the bottom left it should say Octal: 0660.
    7. Click OK --> OK.

  15. Phew, we're almost there! Now open the Play Music app, and go to Playlists. Scroll down and you should see the playlists you imported (if you don't, make sure you're viewing All Music instead of music On Device). Open the playlists, and you should see all the songs you imported.

  16. Lastly, if everything looks good, go ahead and connect your device to the internet again, and follow the step you did above on making sure your music's synced with Google's servers.

  17. To make sure your playlists are on Google's servers, go to music.google.com and your playlists should be there. If they don't show up, don't worry. Give it some time, try syncing from the Play Music app again, and refresh the page. It can take a little bit to sync.

Monday, August 19, 2013

The best alternative to Astrid Tasks


Update: see here for a better alternative: The best task/to-do app for Android


Yahoo recently purchased the excellent Astrid Tasks app and discontinued its development. I've looked high and low, and the best alternative to Astrid Tasks appears to be (drum roll) ...

Astrid Tasks.

Yep, there really aren't any good alternatives. I've tried:

  • Any.do
  • Checkmark To Do & Task List
  • GTasks
  • Task List by taskos
  • Wunderlist
and more, and none of them have what makes Astrid so great. In particular, Astrid is great because it has a nice, clean interface but it is also very powerful under the hood. It has features like hiding tasks until a certain date, or repeating them based on when they were completed (as opposed to when they were due), which I haven't found in any other apps.

Any.do in particular seems popular, but I have no idea why. It lacks functionality that I would consider basic to a task/to-do app like snoozing for a precise amount of time or repeating tasks at a precise interval.

So my recommendation: stick with Astrid Tasks. Now that it's been shut down, it won't be receiving any more updates. But it still works great. It was already an excellent app, not really lacking anything. It will no longer sync with astrid.com, but it still syncs with Google Tasks.

The latest version of Astrid for Android is 4.6.5, which you can download from here if you've previously installed Astrid:

If you've never installed Astrid before, you can download the latest version from here, since the previous URL won't work for you:

The latest version for iOS appears to be 2.6.2.

Sunday, August 11, 2013

Dell iDRAC: The Virtual Media native library cannot be loaded


If you get the above error when trying to open the virtual media on a Dell iDRAC console session (Virtual Media --> Launch Virtual Media) and you're running 64-bit Linux, you may need to install 32-bit Java. Here's what I did on Ubuntu 12.04:

  1. First of all, I happened to run into this issue on an iDRAC that was running old firmware, so before continuing, I'd recommend updating to the latest firmware if possible and seeing if that fixes the issue.

  2. If that didn't fix it or you're unable to update to the latest iDRAC firmware, install 32-bit Java on your workstation:
    sudo apt-get install openjdk-6-jdk:i386

  3. Next, download the viewer.jnlp file from the iDRAC web interface by clicking the link to launch the virtual console/viewer. If the viewer.jnlp file you downloaded has a really long name, you might want to rename it to make the next step easier.

  4. Open the viewer.jnlp file with the 32-bit javaws (Java Web Start) binary:
    /usr/lib/jvm/java-6-openjdk-i386/jre/bin/javaws /path/to/viewer.jnlp