Colin Harrington

Tag: Linux

Running MPIDE (ChipKIT’s Arduino IDE remake) on 64bit Ubuntu

by on Aug.14, 2011, under General

I recently got a ChipKIT Uno32 for a LED project that I’m working on.  The ChipKit is basically compatible with most Arduino code, but has a 32 bit chip with a clock rate that is 5x the speed of my Arduino Uno, as well as much more Flash & SRAM space.  I am really excited about it because we ran into performance issues with a slower 8-bit processor, and we are hoping that 32bit + 8x clock speed will put us back into the workable range.

Chipkit Uno32 board

The Arduino IDE (hosted on google code) doesn’t work with ChipKit so They remade the the IDE and called it MPIDE (Multi-Platform IDE) and its hosted on Github. The released binaries are found here.

MPIDE BlinkThey have a decent wiki page on how to run MPIDE which helped.

The article cited issues with 64 bit systems:

64bit Systems

The binary packages for MPIDE are all built for 32bit Linux distributions, if you are running 64bit you need to have some additional libraries installed. You’ll need to have 32bit versions of and to be able to program the chipKIT, these need to be in /usr/lib32. You may well need to sym-link these latest versions manually, installing these libs is a fairly advanced operation and will vary significantly between distributions.

So this is what I had to do to get it running on 64 bit Ubuntu (Maverick/10.10):

1) Download the Linux Version and unpack it somwehere.

2) Getting librxtx-java and other jni items loadable via the LD_LIBRARY_PATH or CLASSPATH, which I wrote a post about.

3) The next issue that I ran into was a permissions issue

Cannot run program “/home/username/mpide-0022-chipkit-linux32-20110619/hardware/pic32/compiler/pic32-tools/bin/pic32-g++”: error=13, Permission denied

I initially solved it by chmodding everything in that directory, but that resulted in:

pic32-g++: error trying to exec ‘cc1plus': execvp: No such file or directory

So I followed the advice in this forum post and executed chmod +x  -R ./hardware/pic32/compiler/ and that seemed to do it for me.  I think I was able to compile/verify the blink example at this point.

4) Add 32bit versions of libelf and libreadline6 to /usr/lib32:

The first error I ran into was:

/home/username/mpide-0022-chipkit-linux32-20110619/hardware/pic32/compiler/pic32-tools/bin/../pic32mx/bin/gcc/pic32mx/4.5.1/cc1plus: error while loading shared libraries: cannot open shared object file: No such file or directory

I solved this by downloading the i386 deb from here, opening it with archive manager and copying /usr/lib/ to /usr/lib32/ after this I creating the versioned symbolic link via ln -s

Tried it again and was onto my next error:

/home/username/mpide-0022-chipkit-linux32-20110619/hardware/tools/avrdude: error while loading shared libraries: cannot open shared object file: No such file or directory

Repeat the same process for libreadline6 (which contains another required lib too) And I was able to upload the and run the blink example.

Now on to making the TLC Library work..

7 Comments :, , , , more...

Synergy key-mappings between Linux and OSX

by on Mar.22, 2011, under General, Linux

I’ve been a fan of Synergy for years. If you aren’t familiar with Synergy, It basically allows me to control multiple computers using only one mouse and keyboard on the host machine.

Synergy2 comes with a GUI on Windows, but for Linux or Apple/Mac OSX there isn’t a GUI packaged with synergy itself. I’ve since found the Quick Synergy GUI to work fairly well between Windows and Linux since the key mappings are very similar.

Installing it on Linux was a breeze: sudo apt-get install quicksynergy


When I went to use OSX from a Linux Host, I found that Quick Synergy wasn’t able to configure the key mapping options that are needed to achieve keyboard zen. “No Problem”, I thought, “I’ll just edit the settings file that QuickSynergy Uses” – but it turns out that the changes are overwritten and my GUI dreams died with that issue.

I ended up finding the right key modifiers from Linux to OSX and reverted back to launching Synergy manually from the command line. synergys -f --config /path/to/synergy-config.conf

Its easy to setup aliases or other shortcuts but here is the magic sauce complete with key modifiers:

1 Comment :, , , more...

Gnome CPU Frequency Scaling Monitor Authorization Policy

by on Mar.27, 2010, under General

After setting up a laptop with Ubuntu, one of the things that I typically like to do is add a the CPU Frequency Scaling Monitor applet (cpufreq-applet) to my main Gnome panel.

I typically work running large web applications (Grails…) that typically use a lot of CPU power when running tests, launching the apps or refactorings within an IDE.  I like the ability to quickly adjust the CPU ‘govenor’ which governs how the CPU is utilized from a power/performance perspective (see CPU Frequency Scaling in Linux for more).

Ubuntu 9.10 (Karmic Koala) uses Gnome 2.28.1 which requires authorization to change the CPU Frequency (which makes sense).  Earlier versions did not require this authorization since it is new in Gnome 2.28.

With policykit-1 (also new in Ubuntu 9.10) you can grant yourself authorization for the cpufreq-applet based on a user or group by creating a policy file (at /var/lib/polkit-1/localauthority/50-local.d/org.gnome.cpufreqselector.pkla for example) that looks something like this:

Thanks to this post/discussion for pointing this out :-)  be sure you change YourUser to your username or group that you wish to have authorized.

I don’t know of a policy GUI that works with policykit-1 yet, so let me know if you find something.

I also replaced the icons in the /usr/share/pixmaps/cpufreq-applet/ with something I found on

1 Comment :, , more...

Hulu Desktop for Linux! 32 & 64bit versions for Ubuntu & Fedora

by on Oct.08, 2009, under General, Linux, Streaming, Ubuntu, Video

Hulu Desktop (currently Beta) is now available on Linux!  A friend tipped me off to an article on TechCrunch about it. 

Wohoo Hulu Desktop on Linux

Downloading it and setting it up was pretty easy.  I went to Hulu Desktop and selected download for linux.  From there It gave me choices for Fedora and Ubuntu (both 32 & 64bit versions!)  Since I run Ubuntu I downloaded and installed the deb – easy enough.

When you first launch it it asks you to accept the EULA.


The first time I launched Hulu Desktop I got an error, that "Hulu Desktop could not locate the Flash plugin.  If you do not have it installed, please modify ~/.huludesktop with the correct location of" (remember the beta sticker?)

Hulu Desktop error : Flash Plugin

I had to edit the ~/.huludesktop file to use the wrapped version of the Flash plugin /var/lib/flashplugin-installer/ and it worked like a charm!


Playback worked great, probably better than the in-browser experience.  The interface is slick, better than the web-interface and more along the lines of Boxee.  Fullscreen worked well for me.

Hulu Desktop -> Heroes menu

Props to Hulu for providing a Linux version.  The Linux desktop is a first class citizen.  Skype has a Beta version that rocks on Linux.  Google Chrome, Firefox, etc. Who is next? Adobe?  CS5?  I’d pay for Adobe CS5 on Linux.

So far its been pretty good stuff for Beta Software!  I’ll definitely be using Hulu more now. 

Here is a shot of the opening screen:

Opening Image

And another of the Menu (while watching media):

Popular menu

12 Comments :, , , more...

Customizing rEFIt (an EFI Bootloader – Intel Macs) Slick!

by on May.05, 2009, under General, Linux, Logo, Ubuntu

I recently installed Ubuntu 9.04(Jaunty Jackalope) on a 17" Macbook pro and as a part of that process, I had to install a bootloader called rEFIt.  You could think of EFI is just a next-gen BIOS.

Even though the bootloader looks decent, I don’t like the look of silver/grey color, so I decided to customize it.  The process to customize rEFIt was relatively straight forward and the result is beautiful.

This is what I came up with:


This is what it looks like with a Windows Partition:

boot screen with 3 icons

I love the simplicity of it!!

Here is a closeup of the icons / OS Choices:


I don’t really know where the icons came from, but they look tasty :-)  On Linux there is a decent package for working with mac icons (.icns) or sudo apt-get install icnsutils  which will get you some useful tools (png2icns and icns2png)

I did have to make a few modifications to the Tux icon [os_linux.icns] to give him a ‘glow’ so that he doesn’t fade into the black on black:

Tux Crystal Modified by Colin

This windows Icon [os_win.icns] is the stock version I think (send me a link to the author if you know):


I did add a slight ‘glow’ to the apple icon [os_mac.icns] (send me a link to the author if you know):

I tried a number of custom ‘selected’ themes but gradients didn’t look right, so I went with the simple plan.  The selection bitmap can be found here:



the process is simple once rEFIt is installed:  modify the refit.conf with the icons in place, and you are done!

Here is what I came up with for my refit.conf (comments removed):

timeout 5
banner hostname.bmp
selection_big   selection-big-ring.bmp
hideui tools shell funcs hdbadges label

The original comments in the refit.conf file are helpful!  Its straight forward if you can read :-)

  • timeout = the number of seconds before it automatically chooses for you
  • banner = the bitmap of the upper part of the screen (top left pixel = background color)
  • selection_big = the grey ‘ring’ that indicated the selection
  • hideui = Hide elements of rEFIt so we can get a clean interface
  • legacyfirst = Legacy OS first (Linux)

Use at your own risk!!

If I had the time, it would be fun to build/enhance rEFIt to have an all-black fill instead of the grey/silver.

I’ve had a good experience with Ubuntu 9.04 on a 17" Macbook Pro, and I’ll Blog about it – and see what I can do to help update the documentation – look for an upcoming post.


55 Comments :, , , more...

Easy Ubuntu Upgrade :: Hardy Heron Hits Home! Hurray!!

by on Jul.02, 2008, under Linux, Ubuntu

Good work!! -> Credit to experience in upgrading Ubuntu Gutsy Gibbon to Hardy Heron was a fairly smooth one.  It was a straight forward process, The System Updater told me that there was a distribution upgrade.  I followed the assigned steps and shortly had upgraded my whole system.  The status bar was horribly in-accurate, changing from 4 minutes all the way to 54 minutes and back again in the matter of 30 seconds, but it was nothing that I haven’t seen on other operating systems. 

The Installer maintained all of my current customizations (since they are in my home directory ~/ ).  I was surprised to see that even my Compiz settings were all exactly how I had left them.  I was happy that the Installer asked me what to do with merge conflicts in my /etc files, (samba.conf, php.ini, apache2.conf, etc.).  There were only a few things that I had to tidy up

  • Configuring the Launch Size of my Terminal window (Ubuntu Forums)
  • blacklisting the pcspkr kernel module (by adding the line "blacklist pcspkr" to /etc/modprobe.d/blacklist – see ubuntuforums for more discussion)

I can now reliably use the standby functionality.  I have a dual Monitor setup and it works well. 

Is Ubuntu ready for mom?  no, but its definitely on the right course!  In my opinion, ubuntu is ready for the little brother, and the wife of a geek.  It doesn’t test the Mom test, nor the Grandma test yet. 

*Update* After a few months of using Hardy Heron, I have realized that Linux is my primary OS.  I’ve taken the jump – its working out great. I still have some things that I would like to see ironed out a bit more, but its worth much more than I paid for it!!

It had been a while since I re-imaged. I finally got a chance to buy a larger hard drive for my laptop.  I was suprised on how easy it was to get NTFS rw support with linux using NTFS-3G.  I decided a while ago to give Windows and Linux each their own partitions along with a shared Data Drive now in NTFS.

So the Partition Table looks like this: 

$ sudo fdisk -l /dev/sda

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2d24c9d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        6266    50331613+   7  HPFS/NTFS
/dev/sda2            6267       15150    71360730    7  HPFS/NTFS
/dev/sda3           15151       23942    70621740   83  Linux
/dev/sda4           23943       24321     3044317+   5  Extended
/dev/sda5           23943       24321     3044286   82  Linux swap / Solaris 

 Here is a good article about setting up NTFS Support in Ubuntu.  Linux is getting better every Day.

3 Comments :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!