Linked multiple desktops using Xinerama and Xdmx

It’s always trouble when you start out conversations with “You know, why can’t I just…”

15 minutes later, I did.

This screenshot is of a ‘virtual’ desktop. In reality, the display is being handled by 2 computers working together to drive 2 different screens. A single ‘proxy’ program called XDMX is managing the ‘single’ X display, and farming out the actual rendering of the pages to 2 different machines (yawl, my normal desktop machine, and ‘endor’, a server I bring with me to conventions.

By running Xdmx on ‘yawl‘, and telling it ‘endor’ was an available screen, and yawl itself was another one, Xdmx provided a ‘virtual’ desktop spread across multiple screens and computers. I can slide a window from one screen to another without noticing any change.

The biggest surprise came when KDE noticed the Xinerama-based desktop without question, and enabled features like “How do you want these multiple screens oriented” “Woudl you like the toolbar to extend across all your screens”, etc etc. Very pleasant!

In theory, Xdmx can handle any number of monitors in any configuration. I may put that to the test soon, but for now, having one extra large desktop is a fine place to start.

By the way, if you’re considering doing this on your own, I highly recommend this article on IBM developerworks. Very informative and helpful.

JRemoteforMyth Released

Folks, family, and friends may have noticed I’ve been fairly absent from posting, chatting, and general socializing for the last few days. A chunk of this mysterious quietness can be attributed to digging my fingers into a coding project I’ve been thinking about for a while.
I’ve just released JRemoteforMyth. This is a webstart-enabled app for folks who tend to hang around on their laptops or desktop machines, with a MythTV box nearby. It allows for a small ‘remote’ application to sit on their desktop and control the Myth box remotely via normal “up” “down” “enter” buttons.
There were a number of challenges writing this. I haven’t written Swing applications in a few months, and I’ll be needing to get back in the saddle shortly for some consulting work I’m doing. This was a great ‘simple’ defined application I could whip up that had a fairly definite design, goal, and completion metric.
The second challenge was this was my first full webstart-enabled app written entirely inside Eclipse. For the most part, this didn’t present any particular problems, and went quite smoothly. I’m still ecstatic about Eclipse’ SVN and CVS repository integration. Using CVS to hold my working files, I was able to switch from my laptop to my desktop machine with only a Project->Team->Commit on one machine, and a Project->Team->Update on the other. Yay!
Last but not least, a grump. When writing a Webstart enabled app, the resulting ‘jar’ file that containst he app is published onto a webserver, and the JNLP descriptor file tells webstart well to download it. Webstart, however,will only install and run ‘signed’ jar files. Eclipse provides no mechanism for signing jar files internally. It can generate the jar file for the application, but several command line tools need to be run to actually sign the file. Very annoying.
I’ve announced the app to the mythtv-users list, and I’m seeing downloads, so SOMEONE is interested in it.
Next will be some basic enhancements to it, adding things like keyboard entry, an multiple tabs so the ‘keypad’ can be displayed along with normal navigation keys.

Article Subscription fixed

A week or three ago our wonderful blogmaster installed the subscription module into Movable Type. Unfortunately, a configuration wasn’t quite set right, and subscriptions were not working.
If you want to receive mail notifications when a thread updates or changes, you can now subscribe to the thread (see the article detail for the field). You’ll get a piece of email asking for confirmation (this is to avoid spammers), and then you’re in like flynn.
Sorry if you tried to subscribe before!

Coding horrors from the past!

It’s nice to be back into coding for a while. Of course, one of the drawbacks is coming across code written over half a decade ago that should never have seen the light of day. Take for example this gem I ran across while continuing with my updating Keystone project…

$pq = db_query("select dtable,dcolumn,dflags from dictionary $wclause");
while ($pd = db_fetch_array($pq)) {
$varname = "op_$pd[dcolumn]";
eval("$oval="$$varname";");
$varname = "sp_$pd[dcolumn]";
eval("$sval="$$varname";");
if (empty($oval)) {
$oval=0;
}
$active = $sval ? "1" : "0";
$subtable = ($pd[dtable] == $proptable) ? '' : $pd[dtable] ;

It’s been said there’s a special hell for people who write code that uses the eval statement in production code. Apparently I’m headed there already. This was a very bad coding decision, but I remember actually writing this particular snippet. It was around 1998, and I was flying to California to talk with the company that would eventually buy Keystone from me. I seem to do some of my best coding work while flying on airplanes, though this sample isn’t exactly a sterling example of it. It did, however, enable one of the cooler features of the product – the ability to, using any of the various data sets, set up a custom browse view based on the structure of the table.

Using ‘eval()’ statements and depending on global variables was NOT the way to implement it though. Now that I’m converting all 12,000 some odd lines of Keystone code over to support running on a system that doesn’t have register_globals enabled, it was time to update this particular code snippet. It took a good 1/2 hour to figure out exactly what it was doing, but once I did that, it was a simple change to:

$pq = db_query("select dtable,dcolumn,dflags from dictionary $wclause");
while ($pd = db_fetch_array($pq)) {
$oval = $_POST["op_" . $pd[dcolumn]];
$sval = $_POST["sp_" . $pd[dcolumn]];
if (empty($oval)) {
$oval=0;
}
$active = $sval ? "1" : "0";
$subtable = ($pd[dtable] == $proptable) ? '' : $pd[dtable] ;
}

Don’t see much of a difference? It’s a big one from a code security and design standpoint. Don’t sweat it too much, it means a lot to me at least.

The conversion is moving along nicely though. I think I can have eval versions ready for folks to test out within a day or three, if I keep this pace up. I’ll be curious to see what sort of response I’ll get on the net to the system. It’s been a while.

Dusting off the Old

Back in the dark ages, I wrote a very successful ticketing system called Keystone. This was a successor to another reasonably successful program called PTS, which I wrote while working at Fidelity using this new fangled thing called ‘PHP/FI’. Online ticketing systems were still something of a novelty, and none existed in the opensource world (save for GNATS which, at the time, was an abysmal piece of code.
PTS, and later Keystone – flourished. In the dotcom runup, Keystone was a hot item. Whenever I posted a new version and announced it on Freshmeat, I would see thousands of downloads of the updated package within days. At conventions, I was well known. “YOU WROTE KEYSTONE? HOT DAMN!”
Alas, the dotcom era came along and an opportunity to sell Keystone dropped into my lap. I took it, along with a sizeable check, in exchange for an agreement with the new owners, that they would continue to support the product, as well as let me continue working on it.
Neither of these things actually happened. When the bubble burst, the owners found themselves holding a piece of software that they were not using, and still owed money on. The crunch came, I called in the debt, they couldn’t pay, so the entire system reverted back to me, lock stock and copyright, in exchange for me foregoing the outstanding balance.
On the one hand, yay, I got my program back. Hard to argue with that. On the other hand, 2 1/2 years had passed. The new owners had not touched the code, the industry had advanced a LOT in that time, and the competitors, which had excellent products at the time of the buyout, now had a 2 1/2 year jump on me.
Keystone languished.
Over the last few months, several people have been poking me about the code. Some clients have been running versions for YEARS, and are asking if there are updates coming. Others would like to set up new installations. I’ve half-heartedly worked on updating Keystone off and on a few times, but never really finished the changes into something I could release again.
Tonight I spent 2-3 hours dusting off the old code and continuing the updating process. Files with revisions half a decade old are coming up in my editor, with me vaguely remembering even writing them. But, the system works. It has some interface designs that I still find intriguing and useful, as well as it’s share of “WHAT WAS I THINKING?!?!?” elements. Like an old friend, though, the motions and patterns started up again – edit, save, flip, reload, flip, edit more… a dance step long disused, but not forgotten.
I fixed 4 bugs reported by the new users, committed and posted the changes, and updated the users’ vhost. Fixed. Problems brought up and addressed. Happy users.
I remember this.
It’s nice to be back with you, my old friend.

Video about SVS-like School

This is a GREAT video posted on YouTube – it’s part of a documentary about the Fairhaven School in Maryland. Fairhaven is a Sudbury Valley-like school, which is where my son Zach goes. This video covers all aspects of the school, interviewing students and showing what life is like in a environment democratically run by the students.
BoingBoing has the link to the video.
If you’ve ever had any questions about the Sudbury Valley School, this is a fantastic overview of what it’s like.

Fox News Questionable Business Practices?

One of the functions of my blogging software is to keep an eye on who is posting comments to the blog, and where they come from. Over the last few months, I’ve been seeing several posts of this variety showing up, always pointing to Fox News, and having -nothing- to do with the topic being replied to.

A new comment has been posted on your blog Planet Geek!, on entry #2674 (10 Years Ago...).
View this comment: 
IP Address: 206.15.101.61
Name: defwjkd
Email Address: wdve@aol.com
Comments:
<A HREF="http://www.foxnews.com/story/0,2933,193083,00.html">Zarqawi:
'What Is Coming Is Even Worse'</A>
this is so scary - cannot believe this...

This is obviously spam, something bloggers are well used to (we use various measures to block spammers). Blogspam’s purpose is to raise the google ranking of the target site by providing more links to it. It’s somewhat the bane of bloggers in general, though most blog software has decent countermeasures, but traditionally, these types of spam were promoting sex enhancement drugs (real or fake), or the like. However in this case, it’s a known, established, and high profile business. Fox news.

I can’t think of any legitimate reason a comment like this would be posted to my blog. I’m assuming Fox has hired some marketing company to up their news ranking, and the marketing company is resorting to blogspam to accomplish their goal. Heads up, Fox, this is not the way to do business, and will get your site banned from commentary pretty quickly.

Bridge




P4280040.JPG

Originally uploaded by eidolon.

I do like taking walks. After a morning helping out family members, I spent almost 2 hours in the woods near Bolton, MA on the conservation trails. Toward the end the sun was beginning to go down, and the trail crossed this stream.

I don’t think I’d ever been on this bridge before, but I loved the patterns of the light and the water.

Thwarted!

Gosh, it seemed like a good idea. I have a Bluetooth phone (sort of, the Treo 650 is… not the best bluetooth platform out there). I have a Bluetooth enabled laptop. I listen to music on my laptop via headphones all the time. And the laptop has a microphone. Bluetooth phones support remote ‘hands free’ models, I should be able to use the laptop as a HF device on the phone, right? Anyone? Right? Anyone?
Well, not quite. The bluetooth support in Linux is quite good for many things, such as file transfer support and wireless modems, but the handsfree module that was part of the KDE bluetooth package seems to have gone missing.
And, I have to admit, I’m really less than thrilled with the Bluetooth stack on the Treo. It’s painful.

Real Estate Valuation via Zillow.com

I’m a little late coming to this, but NPR’s All Things Considered aired an interview with the CEO of Zillow.com and I had to give it a shot. Forget Mrs. Grundy, this tool lets you find out how much your house, your neighbors house, your bosses house, or any house in fact is worth given current market conditions. The folks at Zillow are the first to admit it’s not 100% accurate (in fact, looking at when we sold our last house, the chart showing property values rates that house at 20% higher than what we sold it for. Sort of sad, actually), but it’s fascinating looking up house prices and history of sales for not only the house you’re in, but the houses around you as well.
Update: fixed broken HTML. Sorry

The Continued Improvement of KDE

The Continued Improvement of KDE
I’ve written before about the fairly detailed advances that have been occurring in the KDE desktop environment. This past week I got a chance to test out a few more, and for me the environment gets better and better with each passing week.
USB Device Support
One could argue this is better attributable to Kernel level and OS-level improvements, but history has seen that desktop enhancements often lag far behind kernel and OS changes. In this case, they’re moving forward hand in hand.
I use several ‘external’ USB devices that I connect to either yawl or to hunter. These consist of any of the following:

  • A 256 meg pen drive (used for ‘hot’ backups of databases while at events)
  • A generic 190gig external USB drive for backups and general storage
  • an Olympus C-770 camera
  • A Palm Treo-650
  • An Apple iPod

Traditionally, using ‘removable’ filesystem devices under Linux would involve much finagling of automounting device confifgurations, as well as the ‘Pray and Pull’ approach to disconnection. It might disconnect cleanly, it might not.
With the switch to devfs in the 2.6 Linux kernel, USB devices are mounted and unmounted automatically upon detection. I have been able, without doing any filesystem tuning, to simply jack in any of the above devices, and both of my machines mount the device immediately. Under KDE, the devices even show up on the desktop as an active icon, and I’ve configured KDE to automatically open the device in a file browse window upon detection. This makes moving pictures and other items on and off the drives a breeze. A simple drag and drop. For camera operations, this is sufficient, but read on for considerations for other devices.
iPod support in Amarok
The Apple iPod is an unusual device. It does function as a USB drive, and shows up on the filesystem with appropriate file structures and the like, but it’s really not meant to be manipulated as a filesystem directly. Music is stored in ‘numbered’ directories, with cryptic names on each. Not very helpful when simply browsing with a filesystem view. Fortunately, some bright lights have come up with a great interim system.
I had originally been using GTKPod as a tool for working with the iPod, but I found the interface less than intuitive, and it didn’t integrate well with the rest of my desktop. It was a typical standalone Gnome app, with only the faintest nods to the concept of desktop interaction and interface sharing.
When confronted with “Hm how am I going to sync my music collection to my iPod”, I noticed in the Amarok window a selection for ‘media devices’. And sure enough, in there, there was the iPod, available for synchronizing. I went through my already selected playlists (I use Amarok constantly), selected a handful of new songs, and said “Add these to media device queue”. Once they were all set, I simply clicked “Synchronize”, and the system connected up to the iPod properly, synced the music over to it, and shut down cleanly. Total time, about 8 seconds.
My understanding is this is similar to how iTunes works (I’ve only run it briefly – my exposure to it under Windows only brought up feelings of ‘bulky, slow, unintuitive, and not native. Looks like an Apple port’, and after that I didn’t bother. With Amarok, I’m using my own music collection via a tool that is an absolute joy to use (Amarok). The iPod synchronizing is just icing on the cake, but a pleasant find nonetheless.
A good desktop
All in all, the KDE desktop simply continues to improve and improve and improve more. Yes, some of these functions are things that others have been doing for a while. But when was the last time anything really revolutionary was done in the desktop environment? The gap between the ‘stable, consistent Windows desktop’, the ‘warm and fuzzy and friendly mac desktop’, and the opensource rogue of KDE is far narrower than many would say. At the moment, I’d put the useability, capability, and flexibility of KDE over the Mac, and in many ways, far over Windows as well.

Oh to have an EE clue.

My expertise in geekythings is limited to what I can do in the software of a system. Given a fully built linux box, I can run just about any program, write anything, do what I want with it. Bend it to my will as my whim directs.
But once outside that box, interfacing with the real world, my skills fall off. Some of my more geekier ambitions fall into interfacing with the computer and systems in ways other than just a keyboard, mouse and screen. Secondary controllers, mobile electronics, small devices that do ‘something’ for you and communicate amongst themselves. Fascinating, but really beyond my base knowledge.
So when I come across absolutely stunning projects like this one, it makes me keenly aware of the holes in my education. Embedded systems are a fascinating field, but one I don’t have the time to explore. Doesn’t mean I can’t appreciate things like this though:
The CLIVE Project is a combination hardware/software/art project that is on display at Burning Man The setting is an archway sculpture in the middle of the playa, with a large countdown clock on it, as well as a green laser shining up into the sky :

A giant digital clock that hangs from that arch counts down from 00:01:30. The warning spinners go still, having gotten your attention. The beam, still pointing oddly at nothing as the countdown marches on, slowly dims. As the clock reaches the last fifteen seconds a tiny dot in the sky gets just bright enough to be seen… moving swiftly towards the green pencil of light.
The dot is barely visible at first; in only seconds it’s brighter than the stars near it and then gets brighter yet. As it crosses the beam its light peaks — shimmering a good eight times brighter than anything else in the sky. It’s moving fast. Not so fast as a falling star, but quicker than most anything else one would see in the natural night sky.
Just as quickly it pases, fading; the laser dimmed to nothing, the entire archway gone dormant. No light; no sound… just that same travelling pinpoint of light dipping out of sight into blackness again. A few long seconds pass; maybe a halfminute or so. With a gentle whirr and flicker of green light the archway returns to life, counter resetting. “NEXT FLARE:” scrolls up on the display across the archway’s main beam, the 10-foot-long clock resetting and starting the countdown anew.
You just witnessed the magnitude -8 flare of an Iridium satellite, reflecting the sun straight at you as it passes overhead.
The large copper structure you’re standing under? It’s an almagest of sorts; a guide to the stars. We like to call it CLIVE: the Celestial Laser Identification / Visualization Experiment.

How cool is that?

When it rains it pours.

I think it’s a sign of the apocalypse. In the space of about 15 minutes, I not only smoked a video board (no, didn’t toke it up… it literally started smouldering while installed in the machine. The fan bearing had failed on the cooler), not only crashed said XP box right in the middle of getting information i was looking for, but in a fit of excitement, I apparently broke the seat of my nice Size C Aeron chair.
Since this was basically an ebay special, warranties are out of the question. I’ve had the chair about 7 months now, and use it daily day in and day out. I guess I wasn’t sitting on it properly or the like, but I’m not an -enormous- guy. I weigh about 270. The chair is a ‘large’ scale, it’s built to carry large people.
Now to find out what repairs or replacement costs will be for parts. Yippee.