Sunday, October 07, 2012

A Fix for Broken Autohide in Unity's Launcher

If you've recently updated your Nvidia graphics driver and Unity's launcher bar no longer awakens from auto-hide, this is a known bug in the driver. Rather than revert to an earlier version, a simple addition to xorg.conf fixes the problem nicely.

if /etc/X11/xorg.conf is missing, create it with these lines:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "ConstrainCursor" "no"

If xorg.conf does exist, simply add 

Option         "ConstrainCursor" "no"

to Section "Device" where the nvidia information is stored.

Restart Xorg by logging out and back in. 

Of course, you can just put up with it like I did by waking the launcher with the Super key (Windows key usually). Or you can turn auto-hide off.

Thanks to Doug McMahon for this tip!

Tuesday, July 03, 2012

Fish and Other Mysteries

This video was shot in the Pennypack Creek on the last, lazy Saturday in June. I bought a cheap, refurbished Kodak PlaySport several months ago that was supposed to be waterproof to three meters, and wanted to give it a proper test. Fish inhabit a murky, alien world and this camera made a convenient probe with which to explore it.

Behind the Scenes

Underwater, the camera's low weight proved to be a hindrance as even the gentle current insisted on knocking it over when I tried to balance it against a stone. Eventually, I just shoved it about an inch or two down into the silt and gravel, and that was enough to hold it in whatever direction I pointed it.

From the surface, the fish aren't immediately obvious; their coloration combined with the flickering reflections of sunlight off the water disguise the creatures from casual observation. One has to stand and stare at the water for a moment before the fish become obvious.

The fish also didn't seem too interested in hanging around the camera, so I hatched a simple plan to catch them on video: wade into the water downstream of the fish, then walk towards the camera while my son and my buddy tossed rocks into the water around me, thus herding my ichthyic subjects into frame. Fish, however, are remarkably averse to herding and they challenged us repeatedly by swimming towards shallow water to skirt around me and the fusillade of stones.

We kept modifying this strategy and shifting the camera's position in an effort to negotiate a happy outcome for fish and human, but this process took about twenty minutes before we were sure something had swum past the camera's lens.

I later learned there was no need to be so aggressive in my approach. Each time I placed the camera and walked away, the silt churned up by my exertions proved an attractive banquet and plenty of creatures swam into frame within moments. Still, the variety of locations and angles proved interesting, and I edited down some of the more interesting footage into the shots seen above.

In addition to throwing stones in my general direction, my buddy also pulled out his smartphone and made numerous recordings in the hope that I'd slip or lose my balance and fall into the silty stream. I'll let him post his results elsewhere.

Refurbished and Waterproof Don't Go Together

Proud of our efforts and satisfied that I'd gotten some interesting video, I plucked the camera from the water and stored it in the pocket of my wet shorts. After all, if the thing had been under a couple of feet of water for almost a half hour, it certainly should have no trouble with wet pants. Right?

Wrong. The PlaySport has two latched doors that hide the unit's I/O ports and battery compartment. I think one of those little doors sprang open inside my pocket, because about fifteen minutes later I found the display had misted up and the camera was no longer responsive. I immediately pulled the battery and hoped for the best, but I was disappointed that I'd probably only gotten one use out of the camera.

Something's Fishy with YouTube

I thought all the interesting parts of this story were behind me when I edited the movie together last night. Knowing that YouTube is quite obsessive about catching copyright-protected songs and realizing that the bubbly underwater sound captured by the camera wouldn't hold attention as well as a punchy piece of music, I went off to Amazon in search of something royalty-free that I could drop in as a simple soundtrack. I chose "You Took Advantage of Me" by Richard Rodgers from the CD "Royalty Free 1920s Music, Volume 2". It had a quirky vibrancy that worked well with fish going about their fishy business.

I mixed it all together in Blender, then uploaded the finished piece to YouTube so it would be easy to share with friends.

But shortly after uploading, my video got flagged with a copyright warning. I rolled my eyes and investigated, thinking that YouTube didn't distinguish between royalty-free music and RIAA's little fetishes. But YouTube instead claimed that I was using Bix Beiderbecke's "(What Are You Waiting For) Mary" from The Orchard Music.

I'd heard about YouTube getting confused about birdsong before, but now it's clear they can also be mistaken about songs. It seems their algorithm for identifying intellectual property "theft" is a bit shaky. I filed a dispute over the claim, but the form for the dispute didn't include a choice matching "Hey bozos, your computers picked the wrong music", so I went with the closest match: "This video uses the copyrighted material at issue, but with the appropriate license or written permission from the copyright owner."

I can appreciate the need to support musicians, and while I think RIAA gets carried away, I'm happy to make adjustments to ensure no one is denied fair compensation. I specifically bought this music to use in videos uploaded to YouTube, but their process for identifying copyrighted material is flawed. This was intended to be a quick, throw-away piece of video seen by less than ten people.

If I had used Beiderbecke's piece, what difference would it have made? The musician died in 1931 and had no children. With no heirs, only The Orchard has an interest in the matter, and it's not like recordings of "What Are You Waiting For" are flying off the shelves. I doubt any of my friends were likely to buy copies of either Beiderbecke's or Rodgers' pieces before I made my video, and they're only slightly more interested (at best!) in such a purchase now. The only way such dusty, old pieces are likely to generate any income for their owners is through public exhibition.

YouTube used to be a fascinating place that reflected the cultures of the planet. One could go there to view all sorts of productions in grainy, low-quality in ten minute chunks. A lot of that material belonged to major studios, but there was something vibrant and exciting about a repository of all visual media. When RIAA and MPAA went after YouTube and Google, that shared culture was compromised. It would suck if YouTube so significantly hurt profits from music, television, and movies that big companies started going out of business, but I rather doubt that was ever a serious possibility. And the reaction has been just as bad; a war on culture that has undermined people's ability to share their own creative efforts.

I haven't quite given up on YouTube yet. There are other sources of royalty-free music I'd like to try, and I keep hoping I'll someday come up with a few tolerable compositions of my own to use as soundtracks for experimental videos like this one. But at this rate, YouTube is proving to be more trouble than it is worth.

Tuesday, May 22, 2012

Eliminate Video Tearing in Ubuntu 12.04

Under Ubuntu 11.10, I quickly lost interest in the Unity interface and turned to Gnome 3 for my desktop experience. While it, too, was bug prone and awkward, it wasn't as bad as Unity, and I just accepted it as a temporary solution. I customized Gnome 3 quite a bit and in the end had a relatively stable environment with only one flaw: video tearing. When I upgraded to Ubuntu 12.04, I found the default Unity experience a bit more satisfactory and I decided it was time to get rid of my video artifacts once and for all.

Video tearing occurs when, for one of various reasons, one portion of the screen is displaying a different frame of a video from the rest of the screen. The effect can go from barely noticeable to downright annoying.

I have a dual-screen system using an NVidia 8600GTS graphics card. While a bit dated now, the card is generally satisfactory. I plan to upgrade it in the coming months to a card that supports CUDA GPU rendering in Blender. Under most applications, the display is clean and responsive, but it suffers a bit when playing video.

With a few, simple tweaks of Compiz, I've eliminated video tearing.

First, you'll need the CompizConfig Settings Manager. You can find it using Synaptic Package Manager or the Ubuntu Software Center, but I find it's really easy to drop into a terminal (ctrl-alt-t) and type:

sudo apt-get update
sudo apt-get install compizconfig-settings-manager

The CompizConfig Settings Manager (CCSM) allows you to make a variety of changes to the "personality" of your desktop experience. You can use it to control the behavior of the Unity Dash, apply special effects to common desktop activities, and even put your virtual desktops on a multi-sided polygon (the Cube) and spin to the desktop you need with your mouse.

For all its flexibility, CCSM (or maybe it's just Compiz itself) is glitchy and sometimes behaves unpredictably, so before you make any changes, scroll down under CCSM's Desktop section, click on the "Ubuntu Unity Plugin", and disable the plugin. Dash and your global menu will disappear. Don't worry, we'll re-enable them after we're done, and everything will be fine.

Now, scroll back up to the General section, and select "OpenGL". Turn off "Synch to VBlank", and set your Texture Filter to Best. Back out of OpenGL, then select the "Composite" plugin. Uncheck "Detect Refresh Rate" and bump the "Refresh Rate" up to at least 61. (Actually, I believe this depends on the refresh rate of your monitor -- you might need to check that first and set it higher.) "Force independent output painting" might be useful if you have multiple monitors; I do, but I leave this setting unchecked.

And that's it! Go back to the Unity Plugin and re-enable it, hit the back button, and when Unity finishes redrawing the Dash and global menu, close down CCSM. It's possible Dash won't respond unless you use the super key; if that happens, a simple log-out, log-in (don't bother rebooting) will suffice to get everything working again. As I said, Compiz is still a bit glitchy.

I've done this twice now under 12.04. Once within a couple weeks of installing it, and again this morning after I was messing around with command line utilities for Unity and accidentally reset it to default configuration. My cube was gone, my windows reset, my virtual workspaces all messed up, and that cursed video tear was back. After putting everything back, I figured I'd share my approach with others.

Good luck.

P.S.: Another thing to check: be sure both Sync to VBlank and Allow Flipping are enabled under the OpenGL tab in nVidia Settings.

Friday, September 30, 2011

Where Everybody Knows Your Name

I've finally set up my Google+ account. After a day playing with settings, several things occur to me:

Anonymity Abandoned

Since the late 1980s, I've maintained an online presence in one form or another as Psion. Handles have always been common online, perhaps taking a cue from the old citizen's band radio days when folks might identify themselves as “The Rubber Duck”.

But lately I've seen a surge to hold everyone accountable online. Efforts by Facebook and Google+ to eliminate handles and replace them with real names are often justified with a queer rationalization that anonymity is somehow cowardly. Randi Zuckerberg claimed last July that online anonymity should be eliminated in the interests of ending cyber-bullying.

My suspicion is that the true motivation behind the drive for real identities is to make it easier to persecute heretics. Zuckerberg et al don't necessarily want to end cyber-bullying so much as make it easier to out anyone who says or does something with which they don't agree. I note, grimly, that Google's User Content and Conduct Policy limits those with content “... that promotes hatred or violence towards groups of people based on their race or ethnic origin, religion, disability, gender, age, veteran status, or sexual orientation/gender identity.” This is laudible, so far as it goes, but missing from that list is content that promotes hatred against people based on their political ideals. Or views on global warming. Or any other, similar polarizing issue. You can't hate someone online because they're an atheist, but you can say hateful things about someone because they don't like unions. The policy doesn't limit any hate speech at all except a few, carefully chosen, pet preferences. It's curious that I wouldn't violate Google's policy if I wrote hateful things about a Tea Party candidate, but if I included scandalous details about their sexual preferences, I'd be in trouble.

Anonymity is important. Online, and in the real world. It has been since Hamilton and Madison wrote under the pseudonym “Publius” in the Federalist Papers. In the Supreme Court Case, McIntyre v. Ohio Elections Commision, Justice Stevens wrote, “Under our Constitution, anonymous pamphleteering is not a pernicious, fraudulent practice, but an honorable tradition of advocacy and of dissent. Anonymity is a shield from the tyranny of the majority.” It isn't difficult to see the parallels between pamphleteering and posting online.

Google's and Facebook's policies do nothing to shield from the tyranny of an intolerant majority.

Omniscient Google

I've steadfastly avoided Facebook and MySpace. Trendy and flippant, not only did both services strike me as unnecessary for anyone who maintained their own website, but they also seemed to defend the confidentiality of their users with little rigor.

Throughout this period, though, I've been more forgiving of Google. Maybe I've given them too much credit for their “do no evil” motto. I've certainly enjoyed the generosity of their development projects. “Google's Summer of Code” competitions have rewarded a number of open-source products with useful functionality. Blender, for example, has benefited repeatedly.

But Google knows an awful lot about me. I notice this, for example, when I type in a search for a particular Mexican dish and it returns a list of restaurants near me. Now and then, I try to seed Google with random bits of disinformation by doing prolonged searches on Cricket matches, for example, or checking street names in small French towns, but the effort is only half-hearted, since I don't honestly wish Google ill. I just want to make it a little harder to predict my interests.

Starving my friends.

I built my first website in 1994. “Psion's Other Dimensions” was a quaint blog from which I could pontificate and where I could share simple artwork and entertaining stories. I also rigged the guestbook functions provided by my host network so that every post I made allowed readers to reply. The World Wide Web, I had noticed, was full of single voices shouting to the masses, but curiously lacking a place where the masses could shout back. It was a fun experiment and lasted for about five years. I then upgraded my Internet service and began hosting, where I'd hoped to build on the ideas explored with Psion's Other Dimensions. While Psidonia continues to stand, it wasn't quite as popular as its predecessor, and a friend launched a packaged bulletin-board system that proved more popular with our group.

I'm the second or third-most active participant on his boards, so I don't begrudge him his success. Had I been more diligent with my own site, I wouldn't have lost my audience. And I'm sure my participation in his site made it easier for him to succeed. I just found that in a world with Slashdot and Digg there was little need for the kinds of services I originally wanted to bring to Psidonia, and my early thoughts about a collection of games centered around a virtual world with its own economic system paled in comparison to the work I discovered in Second Life, so I neglected my site to work on other projects. A planned massive upgrade to my hand-coded software stalled years ago, though I continue to think about what I want to do with my domain.

Other friends have their own sites, too. Personal websites from which they, too pontificate and shout from their soapboxes fashioned from HTML (even if they no longer need to know HTML to run a blog). And we share occasional visits and comments and keep in touch and plan with this collection of links.

But lately, even my first friend's hugely successful bulletin-board has seen fewer and fewer posts. I've lamented about this with him and he agrees with me the likely cause is Facebook, which lets folks keep in touch not only with our small circle of friends but with extended family and forgotten school chums scattered around the world. There's no reason all those people couldn't come to and share their thoughts with the rest of us, but in a world already fascinated with Facebook, why would they?

I don't like Facebook. He doesn't like Facebook. But our other friends don't share our dislike/distrust of Zuckerberg's monstrosity. And they're being drawn away. Slowly, my favorite social site (because it's populated only by my close friends and a few of their friends) is withering … a victim of the same fate that silenced Psidonia. Nine years of active, heartfelt argument and camaraderie are archived in a ghost town forum of thousands of old posts.

And now, I'm poking around with Google+. Is this what I want? Or maybe it's time he and I both faced the inevitability of progress. The old models fall to be replaced by new ideas. We'll all still be together in cyberspace, right? Even better, we'll even know each others' real names.

But I'm not convinced the convenience of Facebook and Google+ completely replaces the models we've had before. Psidonia and Ichiban were both products of our own creation. They served the specific purpose of hosting the thoughts and ideas of a small band of friends as they moved from early adulthood through middle-age. Turning that project over to Google just feels lazy.

Proselytizing with Games

Everywhere I look, Google+ is attempting to get me to increase its understanding of my friends. To draw them into the Google web. Having heard of Farmville on Facebook, I discovered a game called Cityville on Google+ and gave it a try. I loved every version of Sim City, and this looked like it could be dangerously addictive. Right away, it wanted to share information about my circles with the game. And in the first few turns, it tried to convince me to share my experiences with my friends dozens of times. I'm not sure what it wanted to share, but it looks like it's some kind of spam-engine to further lure the unwary to their doom. A quick peek around showed the other games had similar sharing features.

Google … I don't want to advertise for you. I want to play a silly game for a few minutes or a few more turns without trying to dodge buttons that launch a thousand notifications.

What Next?

It's the loss of anonymity that worries me most. What would Mark Twain or poor Richard Saunders do if they were forced to write as Sam Clemens or Ben Franklin? Beyond the political necessity for anonymity in a free society, there's the tradition of pen names that has shielded good and bad writers from fans and critics for generations. Google should really understand this and allow a similar function to flourish.

Google+ is clumsy and awkward and new and needs more polish, but even worse, it's proprietary, and runs on only one (albeit universally accessible) domain. I love the free-as-in-speech roots of the open-source movement and the contributions it made to HTML, CSS, and the way the World Wide Web operates. I resisted Flash specifically because it was a proprietary format.

And yet, I find myself fascinated.

Thursday, June 09, 2011

This is a quick and dirty 3D sketch of the general shape of the starship Enterprise with a ring-type warp drive instead of the traditional nacelles.

Nothing major here, I was messing around in Blender 2.57 and wondered how the starship Enterprise would look with "ringship" warp drive instead of the traditional nacelles. The warp drive attaches to the bottom of the secondary hull with a single pylon that is supposed to look like a continuation of the pylon connecting the saucer to the secondary hull. The primary-to-secondary pylon is a bit wider than the original and now connects with the center of the primary hull. If you look closely, you'll also see that the lower bulge on the primary hull is missing; in this version, a wider pylon now supports the functions that were formerly housed in this space.

This ship is also a bit larger than the original, with more volume in both the primary and secondary hulls.

This is only a crude representation, intended only to see how the different pieces fit together. If (when) I get back to actually work on this ship, I'll re-build it from scratch to allow more careful construction.

Some later studies:

Tuesday, August 04, 2009

A Visit To Chincoteague

This quiet, little town filled with hotels of varying quality and souvenir shops sits on the marshy edge of the DelMarVa peninsula's coast. This morning I woke up to search out a convenience store, but Google Local didn't rate the nearest one very highly, so I took that as an opportunity to explore while the rest of the family slept.

At four in the morning, Chincoteague Island's population of tourists and people who earn a living off tourists are sleeping and the roads are deserted and lined by darkened storefronts. My only companion as I slipped through the sand-lined streets was a persistent fog that thinned teasingly now and then, only to return in thick patches. I drove in towards the mainland on my search, leaving Assateague, Chincoteague, and Wollops behind, but I did find that the only other person awake and on the road in the area drove a white SUV and had a fondness for tailgating.

Eventually, I gave up and stopped at a member of the same convenience store chain as the one in town that had been poorly rated. I picked up several large bottles of Deer Park water and a small container of Pringles and headed back.

The horses of Assateague Island fed on the offerings of a coastal marsh as we headed towards the beach yesterday. The first time we came to Assateague, I promised my wife that we'd try to see them, but we didn't journey far down the nature trail before aggressive mosquitos drove her back to the car. My little boy threw a fit because he wanted to see the animals, and as his dad, it was my duty to offer to take him. But we barely walked another dozen meters before the mosquitos overwhelmed his curiosity. Since I had little desire to see them myself, I was happy to head back with him at the fastest pace his little feet could set. But this time, I spotted them off the side of the road, and ticked this off her list of things to do.

My little boy, my pride and joy, as he rushes back and forth with the waves. It's a game a lot of children play ... I did it myself. He also spent a lot of time kneeling in the wet sand after a wave washed back out, looking through the debris of shells and small stones for anything worth showing off or keeping. With his attention thus diverted, the sneaky Atlantic Ocean had plenty of chances to rush in and knock him down before retreating again. But JP handled these assaults with delighted laughs and little desire to change his strategy. He did, however, get knocked around rather badly for a three-year-old and he clung to my leg desperately until the surf retreated. He looked up at me with a worried expression and I wondered if he'd want to leave now, but I gave him a smile and he returned it with a laugh and went back to his search.

Sunday, June 28, 2009

Ubuntu 9.04: Missing Icons on Desktop

I finally decided to give the Jackalope a try. Hardy Heron (8.04) was relatively stable, but gave me some minor trouble with audio and video, and it was a hassle getting the latest software packages that hadn't been approved for 8.04.

The recommended upgrade path was 8.04 -> 8.10 -> 9.04, so I essentially had to upgrade twice. The process was relatively smooth, although time and bandwidth consuming, and I've noticed a number of subtle improvements in the operation of the system. And one very big malfunction: all my icons disappeared.

Now there's a configuration setting in gnome for hiding all your icons; it's useful for obtaining a smooth, uncluttered desktop with a clean view of your wallpaper. Use the gnome configuration editor by looking under the Applications->System Tools menu for "Configuration Editor". If it's not there, it's hidden by the distribution, but easy to reveal using System->Preferences->Main Menu. It's even easier to drop to shell (terminal) and type "gconf-editor". You'll see this window:

The Configuration Editor is a powerful tool that gives you direct control over much of the gnome desktop environment. Misuse it and you'll quickly have to learn how to do everything in the shell (which isn't a bad idea, but if you're anything like me you've no time for that). In the left sidebar, select "apps", then scroll through the list until you see "nautilus". Click that, then click on "preferences". You'll be rewarded with a plethora of options in the name/value window on the right. Scroll through that window until you find "show desktop"; it's a boolean value (a fancy way of saying on or off) and can be turned on by clicking the checkbox to the right of the label. When the box is unchecked, you have no icons. When it's checked you do. Simple.

Unfortunately, in my case, that box was already checked, and no matter how many times I re-checked it, every reboot was greeted with a barren desktop. What now? If you're like me, then you turn to the web and dig through your favorite search engine for a solution. Maybe that's how you found this page. My condolences. I found an interesting solution that recommended deleting the ~.local/share/applications folder. Tilde (~) refers to your account's root directory. I thought this sounded a little extreme, so I just renamed the folder to applications_old and logged out/logged back in. Bingo! Icons on my desktop.

So what's in this applications folder? When I went back to look, there was a new "applications" folder with only one file within: gconf-editor.desktop. Comparing this with the version in the renamed applications folder showed a much smaller file. The original contained tons of remarks in different languages, bloating the file from 405 bytes to about 10 kilobytes. I then looked at some of the other files in the old folder and saw indications that they contained settings that I'd made over the last ten months of using Ubuntu.

So, this was an imperfect solution. By deleting that folder, one risks losing one's efforts at customization. I put everything back except gconf-editor.desktop and relogged.

And all my icons disappeared.

Closer examination showed that along with the other twenty files I'd restored, I'd also moved "nautilus.desktop" back. On a whim, I moved that back out of the applications folder and relogged, and was greeted with an icon-laden desktop.

This is where I've stopped. As far as I'm concerned, something in nautilus.desktop caused the trouble, but I don't know what. I've examined the file, but nothing seems suspicious to me. There is one dangling matter that annoys me, though. If, for some reason I decide in the future that I prefer an icon-less desktop, the setting in gconf-editor for turning this off no longer seems to work. It's now flagged as an unwritable setting; possibly because there is no nautilus.desktop file present.

That's a matter for another day.