Archive for the ‘Linux’ Category

Linux Virtualization

Thursday, June 26th, 2008

I’ve been using VirtualBox for some months now. It’s pretty slick and doesn’t get in my way too much. Just for the heck of it I’ve been experimenting with a few other similar systems: OpenVZ, vserver, KVM, and Xen. OpenVZ and KVM are the only two I’ve tinkered with long enough to at least have a clue what’s going on.

I was trying KVM at the suggestion of someone in #debian who seemed to like it a lot better than VirtualBox. After playing with KVM I’m not sure where this opinion came from. Just getting KVM and libvirtd to the point where I could actually run a VM took over a half hour. The virt-manager GUI looked nice but was buggy in some spots, and the lack of guest OS drivers meant that many things were a bit sluggish. On the plus side, networking was much easier to setup — but only sometimes. (If you add a network card *after* creating a VM you cannot choose which mode to run it in and are forced to use usermode NAT.) Another cool feature was emulation of a tablet pointing device in addition to a regular mouse device. This means that KVM doesn’t need any guest drivers for mouse integration, because it set the pointer position using the tablet.

At the end of the day, VirtualBox still wins for desktop virtualization. I’m still keeping KVM on the radar though.

Bluetooth presence detection

Monday, April 14th, 2008

I recently found my USB Bluetooth adapter and have been tinkering with using it to talk to my Palm. I’ve successfully configured Linux to allow PPP connections over Bluetooth, so I can sync my Palm if I don’t have the cradle hooked up.

But a more interesting use for Bluetooth is presence detection. BlueProximity is a project that will establish a connection to a device and use it to trigger Gnome’s screensaver. When you leave the room the screensaver locks, and when you come back it unlocks. Nifty idea in theory, but it renders my Palm useless while I’m in the room — it displays a “Connecting” dialog that blocks use of anything else. While BlueProximity can be disabled with a few mouse clicks, why would I want to go through the hassle of disabling and enabling something that’s supposed to make my life easier? It’s far fewer steps to, say, hit a key combination to lock and enter my password to unlock.

But it’s not always necessary to make a connection. hcitool allows you to, for example, query device names by Bluetooth address. If it can get a response we assume that the device is in range. I’ve employed this technique in a script I’ve been maintaining over some years for myself. I trigger it from cron at certain times and it raises my volume to 90% and loops over a Spin Doctors song — a pretty effective alarm clock. What if I get up early and leave though? My neighbors probably wouldn’t appreciate hearing music that loud that early until I get back (however good the music may be). So last night I added a conditional that checks if my Palm is in range of my computer. It will only continue if it sees my Palm. And since I take my Palm everywhere, leaving my dorm room effectively disables my alarm clock. Neat.

I wonder if BlueProximity could be patched to allow picking between connection-based and name-discovery-based detection. This kind of tool has a lot of cool applications, such as setting Pidgin away when I leave and setting it available when I get back.

Better would be a “presence” D-Bus service that could be configured using a variety of presence-detection systems (such as checking for a Bluetooth device) and would fire an event when the user leaves or returns. Any interested application could be notified of user presence changes.

gnome-terminal cursor

Friday, March 28th, 2008

The latest release of gnome-terminal has removed the ability to disable the blinking cursor, which I had previously turned off. The only way to disable it is to disable blinking cursors in all text entry widgets. For some reason I prefer the cursor in text boxes to blink, but cannot stand a blinking terminal cursor. Every blink jars my mind and I lose focus, like someone’s looking at me waving his hands and yelling “hey!” every second.

Blink. Blink. Blink. Arrrgh.

Anyway, since the developers saw fit to remove this feature presumably under the GNOMEism of “keep things simple, users be damned,” I have coded a quick patch to permanently disable cursor blinking in gnome-terminal.

As frustrated as I am at what I think is a stupid decision, at least this is free software.

Tursiops 0.1 released

Monday, December 3rd, 2007

As expected, the hacking on Tursiops continued most of last week. I’m a little late getting a release out there, but here it is. The archive contains two folders, one for i386 machines and one for amd64. The copy of Tursiops in each is identical, but the glue library is platform-specific.

If you want the corresponding source code, svn co https://layla.chrishowie.com/svn/Tursiops. This release corresponds to revision 126 if you want the exact code of this release at a later date.

The only known issue at this point is that the “refine search” function does not update the progress meter, and a refine operation cannot be canceled. This should be fixed in the next release.

Feedback is welcome — just comment here. Enjoy!

Tursiops beta around the corner

Saturday, November 24th, 2007

I wrote a while ago about a project I had started to develop a universal trainer for Linux. I’ve been intentionally delaying the public release because I wrote it as one of my first C# projects and the codebase was less than maintainable, and probably had a lot of memory leaks. Additionally, the UI was created using Glade and instantiated using Glade#.

I’ve been working over Thanksgiving break to bring it up to par with my other projects. Basically this means a complete rewrite, except for the C glue library. Surprisingly, much of the codebase is identical, but the pieces that have changed have changed dramatically. The UI has been rewritten with MonoDevelop’s Stetic designer, and there should be no major memory leaks. The UI is more streamlined and search speed has been improved. In fact, where it used to use several MB of memory at a time during searching, it should now use next to none.

This is why I haven’t released for over a year. I knew this had to be done first, but I hadn’t got around to it. I expect a beta release by the end of next week. Two more things remain to be implemented: search result narrowing (important) and freezing (less important but still cool).

If I haven’t already said so, the project will be released under the GPLv2.

Debian Etch released, layla upgraded

Monday, April 9th, 2007

Etch has finally been released. I have upgraded layla (the server running this blog) from Sarge to Etch, and the upgrade process was pretty smooth. Only a few things needed manual attention.

Quite surprisingly, there weren’t any problems upgrading the kernel to 2.6.18, even though this required replacing hotplug with udev, something I’ve experienced pain with before. One reboot is all it needed.

pcap-sharp RC1

Friday, March 23rd, 2007

I have released pcap-sharp RC1. If you’re interested, give it a shot and let me know how it works for you.

VirtualBox

Wednesday, February 7th, 2007

Okay, I lied. KQEMU is not the only open-source virtualization solution. VirtualBox is another, and is partially GPLed. Features that are attractive to corporate consumers (iSCSI and USB support, among others) are available only in their proprietary product, but the rest (including the required kernel module) are released on their public Subversion server under the GPL.

I compiled and messed with it last night. The performance is amazing. By amazing, I mean that it boots Windows XP faster than VMWare… and faster than it boots natively on my computer. There are “additions” that are comparable to VMWare Tools, such as a graphics driver and a mouse driver that enable tighter integration with the host interface.

It did crash several times last night while running Windows XP. Today I recompiled it after updating from Subversion and have not seen any crashes yet, so I’m not sure if whatever it was got fixed. There are still some bugs with snapshots that cause the VirtualBox server to crash, but so far they haven’t damaged any of my virtual machines.

After all considerations, I’m ready to ditch VMWare. Open-source virtualization is finally here, and it kicks butt.

KQEMU opened!

Tuesday, February 6th, 2007

The author of QEMU has finally released his previously closed KQEMU accelerator kernel module under the GPL! FOSS people should be very pleased by this; it’s the first fully open virtualization system that does not require a CPU providing VT extensions.

Laptop

Tuesday, January 16th, 2007

The laptop I purchased on eBay showed up a few days ago (thanks to a friend who was willing to drive it up from my house). It’s already got Debian Etch running smoothly, and of course XP in case I need it — you know how schools are with Windows. Fortunately I have not needed to boot Windows yet.

Development on the go… fantastic.

Stats:

  • Intel 2.8gHz CPU.
  • 512mb RAM.
  • 40gb hard disk.
  • 15″ TFT screen, max res. 1024×768.
  • Built-in WiFi (Broadcom 4306).