Category Archives: linux

Bluetooth 4.0 LE on Raspberry Pi with Bluez 5.x

Over the holiday I had a little time to fiddle with the Raspberry Pi I got earlier in the summer and I started wondering how hard it would be to get a Bluetooth LE adapter working. It turned out not to be as hard to get working as I thought it might be thanks to recently added support in the Bluez 5.x Bluetooth stack. What follows is the information you need to get things going.

To start with I picked the IOGEAR Bluetooth 4.0 USB Micro Adapter (GBU521) that can be found on Amazon for just $13 since it looked like the chip it uses is decently supported with recent Linux kernels. The only issue I had is the size itself, if it didn't have a little nub on the end it would be too small to pull back out of the USB plug.

Continue reading

Running Lotus Notes 8 on Linux with newer xulrunner

I recently got tired of running Lotus Notes under wine because I kept getting meeting invites that I couldn't accept. So I ventured out because I had heard that Notes now had a Linux client and sure enough it does. The install is huge but it went very smooth up until the point that I first launched to read my mail. At the point where it should have shown me the start screen I got an error dialog with the error "JVM terminated. Exit code=160" and a big stack trace.

Lotus Notes error message
(Click the image to see a larger version)

After digging around a little I found that the Eclipse framework/SWT expected an older version of xulrunner to be installed. The simple fix to get Notes running was to move the xulrunner libraries out of the way:

mv /usr/lib/xulrunner-1.9/ /tmp/
mv /tmp/xulrunner-1.9/  /usr/lib/

Now when I started Notes I was able to get all the way in and see the following error on the start page:

Lotus Notes start page error
(Click the image to see a larger version)

Now the key to getting Notes into a usable state is to close the "Getting Started" tab. If you don't do this you can never move xulrunner back into place. Once you have closed the tab exit out of Notes and then put the xulrunner libraries back where they belong.

Now you can start Notes without an issue, just make sure not to open anything that requires a web browser.

Lotus Notes home page
(Click the image to see a larger version)

After going through this someone pointed me towards the latest 8.5 beta 2 release of Lotus Notes for Linux and after installing that I can report that it actually has fixed the issue. So whenever 8.5 comes out this should be fixed until another incompatible version of xulrunner comes out.

VNC on OS X + Devil's Pie = seamless desktop

I've been doing iPhone development lately using a mac mini. When we first started looking at developing for the iPhone it seemed like overkill to go out and buy multiple macbooks or one macbook to share between developers so instead we got a mac mini to share using Vine VNC.

For reference we are able to share the mac mini by taking advantage of fast user switching for more information see this guide on using Multiple Desktop Sessions on Mac OS X.

The VNC part is pretty easy once you have the multiple desktop sessions working. I've been doing development on a linux box that has two monitors connected so I will open the desktop in one window and all the non-mac stuff in the other. After using the VNC desktop like that for a while I started to get annoyed by the window decorations so I looked to see what I could do to remove them and that is when I ran into Devil's Pie.

Devil's Pie runs as an application in the background and watches for window events that you set up in a configuration file. When it sees the events it can do all kinds of fancy things to the window like remove decorations and set position. It turns out there isn't a lot of documentation on the configuration language but I did find a configuration language reference, a gnome configuration file editor that kind of works depending on what you need it to do, a decent reference, some configuration examples, and best of all an example of how to remove window effects. With all that I was able to cobble together the following configuration file:

(if (contains (window_name) "VNC:") (begin (undecorate) (maximize) (geometry "+1280+0")))

This says to undecorate, maximize, and set the geometry of any window that contains the value "VNC:". The undecorate will strip the title bar and any border from the window, the maximize does what it says to the window, and the geometry in my case puts the window on the right hand screen. I tweaked the background for my account in OS X and the resulting combination of it all looks like this:

(Click the image to see a larger version)

So now I have what feels like an OS X box integrated right into my normal desktop.

How to transfer a Linux image from VirtualBox to Xen

There have been times recently when I wanted to pull a VirtualBox Linux instance I had into Xen. I kept thinking it had to be fairly easy but I kept putting off trying it until recently when I ran into something I wanted to install from a CD image into an Amazon EC2 AMI. It turns out the main hurdle in transferring an image is lack of documentation.

Continue reading

4 pet care tips to help you keep your dog happy & healthy

To keep your dog healthy, you need to address their emotional and physical needs consistently. Your pup will need grooming, nutrition, food, shelter, and water. You also have to take into account your dog’s health. In this article, we explore some of the top pet care tips for your dog to help keep them happy and healthy.

High-Quality Nutrition

Your dog should have high-quality nutrition, whether at home or in pet daycare. You should avoid commercial foods that use meat by-products or fillers. Such additives will cut down the diet’s nutritional value. The food should contain the basic elements of nutrients that a dog needs. That includes carbohydrates, fats, vitamins, proteins, minerals, and water. If you’re taking your pup for pet daycare, you should inform the boarding service of any special diet requirements.

Quality Grooming for Your Dog

Keeping your pup’s coat clean is one of the essential elements of their physical and mental well-being. Depending on their type of coat, their fur will have to be trimmed from time to time for good hygiene. Long coats can irritate your dog, and if their coat is around their face and eyes it can block their line of vision.

You should also ensure you trim their nails to keep them from growing long and uncomfortable. Be careful not to cut the inner part, as this can be painful for your pooch. If you don’t have the time, you can find a local pet care service to assist you with their grooming. For more professional tips visit

Provide Exercise

Exercise is beneficial for your pup’s physical and psychological health. Without it, your dog may show signs of restlessness like barking, digging, or chewing. It is especially important for 70% of apartment renters’ who own pets to constantly walk their dogs as they may not have a yard where the dog can run around. Different dogs have varying exercise requirements so be sure to talk to your vet about your dog’s exercise needs.

When you take your pup to a pet daycare, ensure they have adequate provision for exercise for the breed. Local dog boarding services can offer playtime and daily walks to keep your pet healthy. It can be a convenient solution when you don’t have time to care for your furry friend.

Visit a Veterinarian

A veterinarian can advise you on different aspects of taking care of your pup. Your pet may need vaccinations, and a professional is in the best position to educate you on what’s required to keep your dog healthy. A veterinarian will evaluate your dog’s health and may provide vaccinations, treatments, and check-ups. They can also give you advice on grooming as well as pet daycare.

Your dog needs routine attention every day in the form of exercise and socialization. However, it can be tricky to give your dog the regular exercise and socialization they need to be happy and healthy. After all, you need to work. Fortunately, pet daycares can provide your dog with the regular exercise they need. To learn more about our pet daycare services, contact Eastern Shore Pet Resort today.

PowerDNS Makes Custom DNS Backends Easy

I ran into PowerDNS recently when I needed to find a DNS server that would allow me to produce custom responses to domain queries. I needed to have a request for a DNS entry return a different IP depending on some factors in a database and I needed that data to always be accurate (not cached locally). I found that PowerDNS allows for a lot of customization and I ended up using its piped backend for dynamic queries feature.

With this level of customization you can do things like write your own DNS black list, track who is making DNS requests, give out IP addresses based on a servers availability or use geographic information to return a different IP.

Continue reading

Upgrading from Fedora 7 to Fedora 8 with yum

Fedora 8 has been released so it is time to upgrade once again. First you should go back and upgrade to Fedora 7 if you haven't already. From there it is even easier this time to upgrade. Here are the steps you need to do the upgrade from Fedora 7 to Fedora 8:

  1. yum update
  2. yum clean all
  3. I like to repeated update and clean all a second time to make sure everything got updated
  4. Run the following command to update the yum repo on your box:
    rpm -Uhv
  5. Next do a yum -y update
  6. I needed to remove a couple packages to get the dependencies to work out. This seems to be a normal need now when upgrading but isn't usually a big deal. In this case I had to remove the heliodor and beryl-settings that both had to do with beryl.
  7. In my case the total set of packages it needed to download was 1.2G so it took about an hour to download and install. Now it was time for a reboot.
  8. The reboot went so fast I almost didn't believe it rebooted. This was the smoothest upgrade I have had so far.

Tags: ,

Upgrading from FC6 to Fedora 7 with yum

Now that Fedora 7 has been release it is time to upgrade from that crusty old Fedora Core 6. Note that they have removed the "Core" from the name so a few things have changed with the paths used in yum. Last year I did a post on how to upgrade from FC5 to FC6 and this upgrade happened on the first box I used for that.

  1. Before you start see the note after these steps about checking for disk labels
  2. yum update
  3. yum clean all
  4. I repeated update and clean all a second time to make sure everything got updated
  5. I then ran the command:
    rpm -Uhv
  6. I then found that I had to move fedora-development.repo and fedora-updates.repo out of /etc/yum.repos.d/ and replace them with fedora-development.repo.rpmnew and fedora-updates.repo.rpmnew. I also needed to remove a custom repo I had but no longer used so I didn't take time to figure out why it needed to be removed.
  7. I then did a yum -y update and waited
  8. After a good wait another X server was started so you may think about not doing the update while running under X. Luckily it was able to start on another console so all was ok. Now it was time for a reboot.
  9. After the reboot I had to fix up some NVidia issues but overall it looks like it upgraded without a problem

Notes on disk labels:

There are a few things listed in the release notes under Upgrade Related Issues.

The first was to make sure all your drives have labels. You can do this by running the command "/sbin/blkid" and then checking that each line that is not part of the LVM system has a LABEL entry. If you need to add a label to a drive use the "/sbin/e2label" command and then edit your /etc/fstab to use the label on boot instead of the device.

LABEL=/boot             /boot                   ext3    defaults        1 2

You don't need to label LVM drives since the LVM keeps track of the drives it uses on its own. The only drive I had on a stock install that wasn't under the LVM was /boot and it had a label already.

After you upgrade they sugest running the following command and then upgrading anything that has a date before the upgrade date:

rpm -qa --last > RPMS_by_Install_Time.txt 

Tags: ,

Acrobat Reader 7 and FC6

I broke down and wanted to install Adobe Acrobat Reader 7 on my FC6 box to replace xpdf. After installing it from the tar.gz version the acroread startup script bombed out with the error: expr substr 2400000000000 1

After a little searching I didn't find much help so I started looking at the script myself to see if I could track down the problem. It turns out that it wasn't that hard to fix. First off the script file was located at: /usr/bin/acroread

Open the script file and find the function named "check_gtk_ver_and_set_lib_path". This is the location of the first error you will hit. To fix the error you will need to change:

base_version=`expr substr "${base_version}0000000000" 1 $len_version`



You will find this two places and it needs to be changed in both. If you don't notice the 2nd place it is right after the first in a loop:

while [ $len_version -gt $len_base_version ]; do

The second problem you will have is located in the function "get_gtk_file_ver". Find this function and change the following line:

echo $mfile| sed 's/libgtk-x11-\([0-9]*\)\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'


echo $mfile| sed 's/libgtk-x11-\([0-9]*\)\([0-9]\)000.\([0-9]*\)\|\(.*\)/\1\2\3/g'

Now you should be able to run acroread without errors.

Tags: , ,