Archive for the ‘Hardware’ Category

Barry: The Open-Sourced Blackberry Utility

September 30th, 2009 No comments

There is no denying that the installation process for the Barry project sucks. That said, the promise of having the ability to sync my blackberry with a linux-based calendar application like Mozilla’s Thunderbird or the Evolution mail client kept me working at it through the wee hours of the night. The Barry site at Sourceforge provides not one, not two, but four Debian packages (which rely on an additional two undocumented packages), that need to be downloaded and installed in a specific and undocumented order:

  1. libbarry0_0.15-0_i386.deb (sourceforge)
  2. barry-util_0.15-0_i386.deb (sourceforge)
  3. libglademm-2.4-1c2a (
  4. barrybackup-gui_0.15-0_i386.deb (sourceforge)
  5. libopensync0 (
  6. opensync-plugin-barry_0.15-0_i386.deb (sourceforge)

With the packages installed, I launched a terminal and used the auto-complete feature to find the command barrybackup. At first, I couldn’t figure out what it’s syntax was, until I realized that it doesn’t need any arguments, because it simply launches a GUI (that doesn’t appear anywhere in my Applications menu) that lets you back up your device databases:

Screenshot-Barry Backup

Well, thats a handy utility, assuming that it is also capable of restoring the backups to the device. I shied away from trying the restore feature, as I didn’t have access to a Windows box with which to fix the device should the worst happen.

I’m currently using Mozilla’s Thunderbird (re-branded in Debian as Icedove) as my primary mail client, along with the Lightning calendar plugin, and would be thrilled if I could synchronize it with my Blackberry. You’ll note that libopensync and a Barry opensync plugin were both a part of the installation process; having never used libopensync, I had a tough time figuring out how to make them cooperate.

The opensync page on Wikipedia lead me to install the multisync-tools package, which claims to be able to “synchronize calendars, address books and other PIM data between programs on your computer and other computers, mobile devices, PDAs or cell phones. It relies on the OpenSync  framework to do the actual synchronisation.” I have PIM data that I would like to sync! I have the OpenSync framework! We’re on a roll!

Finally, I installed the multisync-0.90 GUI and opensync-plugin-evolution v0.22-2 opensync plugin packages, which should have allowed me to sync between the Evolution mail client and my phone. I chose to try the process with this software first, as a plugin for Thunderbird was not immediately available. Unfortunately, when attempting to sync, I got this message:

Surprisingly, it was the evolution plugin that failed to connect

Surprisingly, it was the evolution plugin that failed to connect

Useful? Sort of. The Add button let me set up a Blackberry profile with both the barry and evolution plugins, but no matter how I tweaked the settings, I couldn’t get the evolution plugin to connect to my PIM data. Further, after making a synchronization group and adding plugins to it, I couldn’t find a way of replacing a plugin with a different one.

Sick of the limited GUI, I moved on to try KitchenSync, the KDE-based alternative. While it was uglier, I found it to be a far more useful front-end, and managed to get it to sync my device calendar and contacts with my filesystem:

Screenshot-PIM Synchronization - KitchenSync

This process exported all of the calendar and contact information from my Blackberry to a folder full of vCalendar and vContact files on my machine. Now if only I could get Thunderbird to read these files.

After a bit more looking around on the OpenSync webpage, I found a link to these guys, who claim to have programmed an opensync plugin called libopensync-plugin-mozilla-0.1.6 that allows Thunderbird and Lightning to talk to the OpenSync manager. They provide the plugin as a tarball that contains a *.so binary file and a sample *.xml configuration file… but no instructions on how to install them.

Thouroughly lost, I turned to the #opensync channel on for help. Until they see fit to help me out, I’m taking a break from this. No sense in giving myself a heart attack out of extreme frustration.

Edit: I got some help from the members of the #opensync channel, who recommended that I drop the file into the /usr/lib/opensync/plugins/ directory. While this didn’t immediately allow OpenSync to see the plugin, I noticed that every other plugin in the directory has an associated *.la configuration file. So I fabricated my own *.la file, and tried again. That didn’t work either.

The members of the channel then recommended that I try downloading the source code directly from the creators. I did as much, and found that it didn’t include a configure or make script, but just the source code. Not knowing how to proceed, I attempted to follow these instructions, which entailed downloading another 20 or so packages, including the sunbird-xpcom-devel package, which again lacks documentation on how to proceed with installation.

Lacking that package, and again frustrated beyond belief, I decided to drop the issue for another hour or so and do some math homework. That’s right, I chose to do math homework over playing with my computer, because this process has been that frustrating.

It doesn’t help that this entire process seems to be aimed at installed BlueZync, and not the opensync-mozilla-plugin. What the hell is going on here?

DNS Not Satisfactory

September 25th, 2009 No comments

While trying to connect to a remote webserver via SSH last night, I found that my machine refused to resolve the hostname to an IP address. I couldn’t ping the server either, but could view a webpage hosted on it. Now this was a new one on me – I figured that my machine was caching a bad DNS record for the webserver, and couldn’t connect because the server’s IP had since changed. That didn’t really explain why I was able to access the server from a webbrowser, but I ran with it. So how do you refresh your DNS cache in Linux? It’s easy to do in Windows, but the Goog and the Bing let me down spectacularly on this issue.

This morning, I tried to connect via SSH from my school network, and couldn’t get a connection there either. This reinforced the idea that a local DNS cache might have an outdated record in it, because at school, I was using a different nameserver than at home, and a whole 12 hours had elapsed. Out of theories, and lacking a method to refresh my local DNS cache, I hit the #debian channel on IRC for some guidance. Unlike my last two trips to this channel, I got help from a number of people within minutes (must be a timezone thing), and found out that unless I manually installed one, Debian does not maintain a DNS cache. Well, there goes that idea.

So where was I getting my DNS lookup service? A quick look at my /etc/resolv.conf file showed that the only entry in it was, which is the IP of my home router. The file also has a huge warning banner that claims that any changes will be overwritten by the operating system. Makes sense, as when I connect to a new network, I presumably get DNS resolution from their router, which may have a different IP address than mine. The guys on IRC instructed me to try to connect to the server with it’s IP address instead of it’s hostname, thereby taking the DNS resolution at the router out of the picture. This worked just fine.

They then instructed me to add a line to the file with the IP address of the nameserver that the router is using. In the case of our home network, we use OpenDNS, a local company with static servers. I did so, and could immediately resolve the IP of my remote server, and obtain an SSH connection to it.

Well fine, my problem is solved by bypassing DNS resolution at the router, but it still doesn’t explain what’s going on here. Why, if DNS resolution was failing at the router level (presumably because the router maintains some kind of DNS cache), did it work for my webbrowser, but not the for ssh, scp, or ping commands? Don’t they all resolve nameservers in the same way? Further, if it was the router cache that had a bad record in it, why did the problem also manifest itself at school, where the router is taken entirely out of the picture?

Further, will the file actually be overwritten by the OS the next time I connect to a different wireless network? If so, will my manual entry be erased, and will the problem return? Time will tell. Something smells fishy here, and it all points to the fact that my machine is in fact retaining a local DNS cache. How else can I explain away the problem manifesting itself on the school network? Further, even if I do have a local cache that is corrupted or contains a bad record, why did Iceweasel bypass it and resolve the address of the webserver at the router level (thereby allowing it to connect, even though the ssh, scp, and ping commands could not)?


My audio doesn’t work anymore

September 21st, 2009 1 comment

Yup. Not sure why. It just happened. I have tried messing around in my audio settings and still nothing. In fact the only audio device I can get to play is not PulseAudio, or anything standard like that, but rather the Intel audio card that it found for my system. While this is all fine and promising it still doesn’t work right. When I tried to set it as my primary device and restarted my machine KDE threw a bunch of error messages my way saying that it couldn’t use the Intel device (really? because that was the only one that worked for me…) and instead fell back to PulseAudio (really? because that one doesn’t work for me…).

Why is it that Linux works great for a short while and then suddenly breaks itself?

Mounting an NTFS-formatted External Drive

September 20th, 2009 7 comments

I have a Western Digital 250GB NTFS-formatted external hard drive that I use primarily to store backups of my Windows machine. Since I’m away from my house for a couple of days, I used the drive to bring along some entertainment, but encountered some troubles getting Debian Lenny to play nice with it:

mount-errorAfter searching around for a bit, I found a helpful thread on the Ubuntu forums that explained that this problem could be caused by a few different things. First, with the drive plugged in, I ran

sudo fdisk -l

from the terminal, which brought up a summary of all disks currently recognized by the machine:

jon@debtop:/$ sudo fdisk -l
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcccdcccd
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          31      248976   83  Linux
/dev/sda2              32        4864    38821072+  83  Linux

Disk /dev/dm-0: 39.7 GB, 39751725568 bytes
255 heads, 63 sectors/track, 4832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 38.0 GB, 38067503104 bytes
255 heads, 63 sectors/track, 4628 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 1681 MB, 1681915904 bytes
255 heads, 63 sectors/track, 204 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5b6ac646

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30401   244196001    7  HPFS/NTFS

Judging by the size of the drives, I figured out that the OS saw my drive at the location /dev/sdb, and the partition that I wanted to mount (the only partition on the drive) at the location /dev/sdb1.

Now, to determine why Linux wasn’t mounting the drive, I checked the fstab file at /etc/fstab to see if there was some other entry for sdb that was preventing it from mounting correctly:

# /etc/fstab: static file system information.
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/mapper/debtop-root /               ext3    errors=remount-ro 0       1
/dev/sda1       /boot           ext2    defaults        0       2
/dev/mapper/debtop-swap_1 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

Since there was no entry there that should have overwritten sdb, I gave up on that line of inquiry, and decided to try manually mounting the drive. I know that Debian can read ntfs drives using the -t ntfs argument for the mount command, so I navigated over to the /media/ directory and created a folder to mount the drive in:

jon@debtop:/$ cd /media/
jon@debtop:/media$ sudo mkdir WesternDigital
jon@debtop:/media$ ls
cdrom  cdrom0  floppy  floppy0  WesternDigital
jon@debtop:/media$ sudo mount -t ntfs /dev/sdb1 /media/WesternDigital/
jon@debtop:/media$ sudo -s
root@debtop:/media# cd WesternDigital
root@debtop:/media/WesternDigital# ls
KeePass.kdbx  nws  $RECYCLE.BIN  System Volume Information

As you can see, the contents of my external drive were now accessible in the location where they ought to have been if Debian had correctly mounted the drive when it was plugged in. The only caveat to the process is that the mount function is available only to root users, meaning that the mountpoint was created by root, and my user account lacks the necessary permissions to read or write to the external drive:


I figured that this issue could be solved by using chmod to grant all users read and write permissions to the mountpoint:

root@debtop:/media# chmod +rw WesternDigital
chmod: changing permissions of `WesternDigital': Read-only file system

Well what the hell does that mean? According to this post (again on the Ubuntu forums), the ntfs support in Linux is experimental, and as such, all ntfs drives are mounted as read only. Specifically, this drive is owned by the root user, and has only read and execute permisions, but lacks write permissions.

According to this thread on the forums, there is another ntfs driver for Linux called ntfs-3g that will allow me full access to my ntfs-formatted drive. After sucessfully adding the ntfs-3g drivers to my system, I dismounted the drive, and attempted to re-mount it with the following command:

mount -t ntfs-3g /dev/sdb1 /media/WesternDigital

This time, the mount command appeared to almost work, but I got an error message along the way, indicating that the drive had not been properly dismounted the last time it was used on Windows, and giving me the option to force the mount:

Mount is denied because NTFS is marked to be in use. Choose one action:

Choice 1: If you have Windows then disconnect the external devices by
 clicking on the 'Safely Remove Hardware' icon in the Windows
 taskbar then shutdown Windows cleanly.

Choice 2: If you don't have Windows then you can use the 'force' option for
 your own responsibility. For example type on the command line:

 mount -t ntfs-3g /dev/sdb1 /media/WesternDigital -o force

Well, since I didn”t have a Windows box lying about that I can use to dismount the drive properly, I’ll took a shot at using the force option. After warning me again that it was resetting the log file and forcing the mount, the machine finally mounted my drive with full permissions for the owner, group, and other users!

drwxrwxrwx 1 root root  4096 2009-09-18 15:40 WesternDigital

After a couple of manual tests, I confirmed that both my user account and the root user had full read/write/execute access to this drive, and that I could use it like any other drive that the system has access to. Further, thanks to the painful XBMC install process, I already had the codecs required to play all of the TV shows that I brought along.

New monitor woes

September 15th, 2009 No comments

So I’ve gone out and purchased myself a gorgeous LG Flatron W2243T. Unfortunately, getting it to work correctly has proven difficult so far. It’s connected to my computer through a DVI-to-HDMI cable. Now, adding a monitor to my Windows XP machine was fairly simple – all I had to do was plug it in, add it through display properties, and then I could futz around with it to my heart’s content. The task has proven more arduous on Mint.

Mint’s display manager really brought my system to its knees – as soon as I opened it, the computer slowed to a crawl and was basically unusable. Some of the information on the display manager was correct: there were two monitors (the laptop monitor and the new LG external monitor), and one was wider than the other; unfortunately, every other piece of information was “unknown”, and trying to change anything killed my system. After I rebooted, the monitor worked right from startup, which was a pleasant surprise, but that’s where the fun ended. I tried to get into my display manager again, but all it did was slow my system down and present me with a blank screen. I’ve tried going in through terminal and finding anything I could online, but I’m not sure what to do. Hopefully Jake can help me out when he gets home – otherwise I’m stuck with a mirrored dual monitor setup in a non-optimal resolution. Thankfully, my monitor and laptop share the same display ratio, so at least everything is in proportion.

Oh God How Did This Happen

Oh God How Did This Happen