Killer SSH Tip

Posted by Scott on Mar 4th, 2009

I feel the need to spread this ssh tip that saves me from quite a bit of typing on a daily basis. I learned about it from Elliott’s OS X Tips and Tricks post on the Carsonified blog.

Add the following to your ~/.ssh/config file:

Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p

Now when you ssh into a host, subsequent connections to that host use the same TCP socket, and don’t require authentication. This will be the case for as long as that initial connection stays open, and it works for sftp as well as ssh.

I realize another way of avoiding typing your password all the time is to use ssh keys, but I happen to work on embedded systems that get rebuilt very frequently and which I’m not able set up an ssh key as part of the build process. This technique allows me to log into the system once per session and not have to type the password over and over again.

Resolving NetBeans Issues with Compiz/Xgl

Posted by Scott on Nov 27th, 2008

Now that I’m settling back into some serious Rails development, I’ve been increasingly annoyed by this bug where the Compiz window manager (which provides all the fancy 3D effects on my Ubuntu system) causes dialog boxes in Java applications (e.g, NetBeans) to appear blank on an intermittent basis. Thankfully, it’s been fixed! You simply need to run jre 6u10.

This fixed version of Java is packaged by default in the Ubuntu Intrepid Ibex repositories. For those of us still running Hardy Heron, I can confirm that using the Intrepid packages works without problems. There is also a bug filed in Launchpad lobbying to have 6u10 included in Hardy as an update.

Firefox Motion JPEG Bug

Posted by Scott on Oct 31st, 2008

I’ve spent the better part of this week doing battle with a pesky problem in Firefox v3. The bug report on Mozilla’s bug tracking system (along with a patch to fix it) can be found here if you’d like to read all the gory details.

The product I’m putting the finishing touches on at work is a touchscreen-based appliance that can, among other things, display video streams from IP cameras. The lowest common denominator for IP cameras it supports is the motion JPEG protocol, so early on in the project (many months ago) we did some testing and found that Firefox readily supports displaying these streams, and that we could also use a video player plugin for better system performance. Sounds like an easy feature to add, yes?

Nope! It turns out that the bug I referenced above means that once you display an MJPEG stream, it never stops running. If you browse away from the stream you still take a performance hit, and Firefox eats up the CPU and network bandwidth resources as if the stream was still being displayed. This became a critical problem on an embedded platform that needed to display up to four IP camera streams at the same time. Additionally, the camera streams are not the focus of the product (its primary purpose is to control multiroom audio systems).

So onto “Plan B” – the mplayer video plugin for Firefox. As a bonus, this plugin makes use of hardware video acceleration to display streams, resulting in significantly lower CPU utilization. Have we found a winner? No, again. The plugin did its job well, until you went to unload it from the page. This process turns out to take an indeterminate amount of time due to various complex interactions between the plugin and the independent mplayer process that also needs to be shut down. The delay would amount to several seconds regularly – unacceptable for the product’s requirements. Various aggressive methods of killing the plugin to avoid the delay only resulted in killing Firefox along with it. And through communication with one of the open source developers of the mplayer plugin, we confirmed that this was a inherent design problem that could not be overcome.

So what now? All I can say is we are very, very lucky that the Mozilla team fixed this bug. Although it is not yet released into the mainline Firefox, I was able to apply the patch cleanly to the sources and compile a custom Firefox that meets our needs.

It’s been a long week, but in the end I am still grateful that we’re using open source software as our technology foundation. It may have its problems, but if you put some effort into searching through the infrastructure that’s publicly available on the web (i.e, bug tracking sites and mailing lists) you can usually understand and find the solutions to your problems.

VirtualBox: My New Preferred VM Solution

Posted by Scott on Dec 30th, 2007

As a long time user of VMWare’s Workstation virtualization software, I’ve always had a way to run WindowsXP or other operating systems on top of my Ubuntu Linux environment without any problems. However, late last year I heard that Parallels Desktop for OS X had an intriguing new feature, which allowed you to run windows from your VM directly in your host desktop environment.

This means that for doing cross-browser web application testing, you could pop up Internet Explorer or various other Windows browsers and run them side-by-side with your hosts’ native browser(s). Very, very useful. This was a killer feature that I was hoping VMWare would introduce. It appears that version 6 of VMWare Workstation didn’t include it, so I didn’t even bother upgrading from v5.5, since I was happy with how it ran in every other sense.

My wait for this feature is now over, and even better, is being offered by an open source software project called VirtualBox. VirtualBox works with the same operating systems I use, and has the killer feature I described above, which they call “seamless mode.” I’ve been using it for a few days now and love it. On top of that, the performance of the virtual machine even seems a bit faster than VMWare Workstation 5.5. Oh, and you can even use VMWare disk files with VirtualBox, though I haven’t tried that myself.

VMWare Workstation is a more mature product and has some other features that VirtualBox currently lacks, but I have no need for those features. I’m thrilled to be able to use VirtualBox as an alternative, and I think for anyone wanting to speed up their cross-browser web development, this is a great setup to use. Give it a try.

Ubuntu Release Day – 7.10 “Gusty Gibbon”

Posted by Scott on Oct 18th, 2007

Congratulations and a huge THANK YOU to the folks who participated in the creation of the latest release of Ubuntu GNU/Linux (and that’s a lot of people)! I’ve used a number of GNU/Linux distributions, and Ubuntu meets my needs perfectly for desktop usage and as a software development platform.

Where I work, I tend to go a bit overboard and run a release party, which last year featured an Ubuntu cake and balloons. This year we kept things simple with orange cupcakes and donuts (which were scuplted into the shape of the Ubuntu logo by my colleague and friend Jim). Everyone in the Engineering group knows when a new release of Ubuntu comes out, and it’s a great (if somewhat geeky) way of spreading the message of free software and the spirit of Ubuntu.

I’ve been extremely busy lately and probably won’t have a chance to install the new release for another week or so. But it won’t be long until all of my computers are running the Gutsy Gibbon.

Dell and Ubuntu GNU/Linux

Posted by Scott on May 4th, 2007

I am very pleased to hear that Dell is going to be offering select desktop and laptop systems with Ubutnu Linux pre-installed. I just purchased a Dell Latitude D620 (without Linux preinstalled – it was right before the announcement), and I have to say I’ve never had a smoother laptop Linux installation before than with this laptop and Ubuntu 7.04 “Feisty Fawn.”

This move on Dell’s part will do a lot to differentiate them from other companies, and it’s definitely going to impact my recommendations when it comes to suggesting computers for friends and family. Thank you, Dell, for taking this leadership role and selecting one of the finest desktop Linux distributions available today, Ubuntu.

DHCP Strangeness

Posted by Scott on Feb 2nd, 2007

I’m working with Debian Sarge (stable) on an embedded Linux device at work, and recently wasted a lot of time tracking down problems with DHCP. Specifically, the client was changing IP addresses intermittently during a DHCP lease renewal – not cool. So I put the device behind another Linux system running its own DHCP server, and found the following clue in the logs:


dhcpd: DHCPDISCOVER from 00:d0:c9:9e:ae:59 via eth1
dhcpd: ICMP Echo reply while lease 192.168.1.215 valid.
dhcpd: Abandoning IP address 192.168.1.215: pinged before offer
dhcpd: Wrote 0 deleted host decls to leases file.
dhcpd: Wrote 0 new dynamic host decls to leases file.
dhcpd: Wrote 9 leases to leases file.
dhcpd: DHCPDISCOVER from 00:d0:c9:9e:ae:59 via eth1
dhcpd: DHCPOFFER on 192.168.1.210 to 00:d0:c9:9e:ae:59 via eth1
dhcpd: DHCPREQUEST for 192.168.1.210 (192.168.1.1) from 00:d0:c9:9e:ae:59 via eth1
dhcpd: DHCPACK on 192.168.1.210 to 00:d0:c9:9e:ae:59 via eth1

Interesting… Some research (and help from the folks on the GNHLUG discussion list) uncovered that the client was sending a DHCPDISCOVER while still using the old address. When a DHCP lease is being renewed, the client is supposed to send a DHCPREQUEST, not DHCPDISCOVER.

So why on earth was it doing this in the first place? My only explanation is that the dhcp-client package that Debian Sarge comes with (v2) isn’t following the specification correctly. I have no idea how old that package is, but I do know that nearly all of the modern Linux distros I’ve used for years come with dhcp3-client. Fortunately, the Debian stable repositories include dhcp3-client – it’s just not the default client!

The lesson from all of this?: don’t assume that just because a package is in Debian’s default stable install you can take its correct operation for granted.

« Prev

Blog Badges



[FSF Associate Member]

Archives