Ubuntu + iPod Touch/iPhone

Updated Information at End of Article

After spending a great deal of time researching Ubuntu and iPod Touch/iPhone sync issues, I’ve finally found a solution that isn’t a dreadful experience.

There is currently a project in the alpha/beta stages that, when completed, will provide sync support for the iPod Touch and iPhones that are using Firmware 3.

If you’re not using Firmware 3 on your iPod Touch or iPhone, then I’m not sure how much this guide will apply to you. You can try looking here for more information.

If you are using Firmware 3 (my iPod Touch is running OS 3.1.2), then I’d suggest you following the guide provided byย A. Tres Finocchiaro (aka FatButtLarry) over on his blog.

Following his guide, which is comprised of two lines of terminal commands to copy-n-paste, I was able to have my iPod Touch sync’ing in no time!

While the transfer speed seems to be a bit slow, it is indeed working well! Cover art is transfered flawlessly, everything seems to be in order!

Remember that this project isn’t complete and you are likely to encounter bugs. My experience thus far has been positive, your mileage may vary. Good luck. ๐Ÿ˜‰

Update (2010-02-24):
If you are using or plan to upgrade to Ubuntu 10.04, you will not need to manually install any of the software mentioned above. Ubuntu 10.04 brings support for the iPhone and iPod Touch by default. You should not have any problems with your device and Rhythmbox!

Solution To WordPress getimagesize() Error

If you’ve for whatever reason noticed that your WordPress website is generating errors similar to the following then I may have a solution for you.

Warning: getimagesize(/home/.some-dir/example.com/folder/httpd.www/wp-content/uploads/some-image.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/.some-dir/example.com/folder/httpd.www/wp-content/blah/blah/blah.php on line 123

I noticed that some pages that generated image information were printing errors out on my pages with private server file structures included. Generally you don’t want to see this printed out to the public. ๐Ÿ˜‰

I’m not guaranteeing a fix for you, but rather what worked for me.

If you are getting an error link the one that I’ve listed above, more specifically the “failed to open stream: No such file or directory,” then you may be about to fix it in only a few minor steps.

Things you will need:

  • FTP (I use FileZilla)
  • phpMyAdmin
  • Ability to add a new plugin to your site
  • Patience


Single quotes must be the normal ascii quotes. Chances are, if you copy and paste from my blog, they will be the wrong type so double check that as it could give you problems. ๐Ÿ˜‰

  1. First and foremost, make sure to backup your entire database to a safe place. I’m not liable in the case that you don’t backup your database and this procedure borks your blog (or any other case for that matter). ๐Ÿ˜‰
  2. Create a new file named “abstest.php” and upload it to your blog’s root directory after entering the following code into it:
    <?php define('ABSPATH', dirname(__FILE__).'/'); echo ABSPATH; ?>
  3. Open a new browser tab and navigate to “http://www.your-website.com/abstest.php“. You should find a short page with the printout of your servers absolute path.
  4. Check that the path provided by this test file matches the base path printed out by the getimagesize() error exactly. In my case, my server had changed slightly so the differences were similar to the following:
  5. If you find a mismatch, then you’ve found your problem and the rest is simple. If not, then my tips will most likely not solve your particular WordPress error(s).
  6. If you’ve found a mismatch, then continue: Open a new browser tab and navigate to your phpMyAdmin interface. Select your WordPress database, then click Search. I searched all tables for a match of the path that was different, in my case it was “.some-dir/“.
  7. If there are matches found then you need to click the SQL tab at the top (preferably in a new tab) and paste the following (making sure to edit it to match the table and fields you need) and run it to find and replace that changed part of the path.
    update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, โ€˜find this stringโ€™, โ€˜replace found string with this stringโ€™);
    For more information on SQL find and replace, either search Google or read this.
  8. After replacing all of the affected tables and strings, your images should be properly address. You’re not done yet though.
  9. Open WordPress Plugins and add/install a plugin named “Regenerate Thumbnails“. After installing it, make sure to activate it. ๐Ÿ˜‰
  10. In your Admin panel, find the Tools menu and expand it. You should see a menu item labeled “Regen. Thumbnails”…click it. This will open a page with a start button. Clicking this button will begin the process of correcting your thumbnail dimensions as well as other metadata. It will take some time depending on the number of thumbnails you have accumulated.
  11. After the progress bar reaches 100% it will notify you that it is complete. You’re all done! You may need to clear your cache to refresh any pages that still generate the previous error message.

If you had any problems with the above mentioned procedure, I would suggest restoring your database using your backup copy and either trying again, paying someone to do it for you or just forgetting about it. ๐Ÿ˜‰

If it works then great! If not then sorry you’ve wasted your time. It worked for me, so maybe it will work for you as well. ๐Ÿ˜€

UserJS: Twitter-Rounded

I’ve thrown together a quick script for Opera that you can use if you’d like to see rounded corners (aka border-radius). It seems that Twitter currently sends Opera a style sheet with empty settings for rounded corners…

…so, all I did was write a script that will insert a link to a style sheet that’s stored here at kyleabaker.com which overwrites these empty styles with the correct ones.

If you’ve never used scripts before then you should first learn how to setup UserJS. After you’ve setup Userjs, you may need to enable UserJS for secure pages (https) in Opera’s internal configuration page….”opera:config#UserPrefs|UserJavaScriptonHTTPS“. Just check/enable that option. Make sure to click save!

Lastly, save the “Twitter-Rounded” script to your UserJS folder that you setup in the steps above.

Now you have a more pleasant looking Twitter page in Opera 10.5. ๐Ÿ˜‰

WP-UserAgent and WP-TwitterBadge

I’ve just pushed a few updates to my WP-UserAgent and WP-TwitterBadge plugins. If you’re already using them then you should be able to update via your WordPress Admin area shortly.

If you’re not using them yet, feel free to browse around and check into them!

Dropbox has File Smarts

I’ve noticed after uploading several files that Dropbox is now smart and can do an md5 hash check on other files that have been uploaded to their server.

How does this help you? Well, I’ll explain soon, but if you’re downloading a file that someone else has already downloaded and synced with Dropbox then it helps you tremendously!

Basically, Dropbox checks to see if anyone has previously uploaded theย exact same file in the past. If they have then you’re in luck!

If the md5 hash matches (I’m purely guessing that they use md5 since it’s the commonly accepted standard for file checking) then they simply “copy n’ paste” what someone else has already uploaded into your personal upload space!

This means that the 347mb file that you want to sync could take 10 seconds to be synced with your account even over a dial-up connection if someone else has already taken the time to upload it for the first time!

If you’re the first person to upload your file then you will certainly have to wait the due time for a proper upload, so don’t expect it with every file.

This is an ingenious move by the Dropbox team as it saves them tons of much needed bandwidth performance and instead pushes the workload to the server side “copy n’ paste” routine…which will perform much faster than your dial-up or simple broadband connection.

Imagine the speed of uploading a 10mb file to Dropbox verses copying that same file from one folder on your hard drive to another folder on your hard drive. That is similar to the performance that you can expect.

It also obviously saves you time since you can sometimes drag n’ drop a large file…blink…then it’s done.

Don’t worry, your files are safe. Chances are slim that someone will upload a file that matches yours in filename and md5 hash code, …but it could happen.

It’s been proven that the md5 hash is insecure, but the chances of someone uploading a file that is recognized as one of yours is very very…(repeat as needed)…very slim.

Honestly, the biggest thing to worry about is the fact that if you delete a private file, someone else could happen to upload a file matching the filename and md5 hash and automatically have access to a file that you uploaded ages ago.

I’m current unaware of how long Dropbox caches the files that you store using their service, but I know that some files that I’ve uploaded in the past and deleted now have been removed from the server…so security is fairly assuring.

While it’s a little creepy and it sounds dangerous….it’s highly improbable.

On the Dropbox teams side, saving bandwidth means that you have that much extra bandwidth to upload content that you need sync’d. Bandwidth is very important these days especially considering that many of us are uploading videos (whether they be family or leisure) and music. Many of these files can range from 3mb for music up to 10gb for video (and blu-ray will bring even higher filesizes :P).

Of the sync services that I’ve used (and it’s been a lot so far), Dropbox is by far the front runner. With the features that they offer that you’re not normally aware of, they already pass up the competition hands down. That’s just my own personal opinion.

I’m currently on the free service (2gb), but I would highly suggest that you purchase their pay-for service that gives you up to 50gb of online storage if you’re one to upload a lot or need a lot on the go.

At the very least give them a try and download the Dropbox application. I’m sure anyone could take advantage of the free 2gb package that they offer online to backup important documents or whatever it may be. ๐Ÿ˜‰

Rest assured that if you’re using Dropbox then you’re also using one of the best available sync services to be established thus far! Free space never hurt anyone. ๐Ÿ˜‰