Linux Tip: Stuttering Audio with Flash and Firefox

Problem: When playing back flash video in firefox on Ubuntu version 12.04, you may experience stuttering audio and dropped frames
Possible cause: pulseaudio may be configured for “simultaneous output”, which adds overhead that may be slowing down your system.

Solution (in my case): Click the volume icon, then click Audio Settings. Make sure the default output device is the correct sound card, not “Simultaneous output.” Also make sure the settings for the sound card are correct, including inputs and codecs. Don’t turn on anything you don’t need.

A note of publicity

Thanks to this here blog, I am now a published photographer. In 2004 Char and I took a trip to Mass Moca and I took some photos of the installations we saw. One of these photos seems to have gotten some extra google-juice because twice now I’ve been contacted by authors wishing to use my photograph of Ann Hamilton’s “Corpus” in their publications. Each time I’ve only asked for proper credit and a copy of the publication.

The first publication to use my photo was a small newsletter, but the second was a little more substantial as I found out when I opened the fairly heavy package I got in the mail:

[800×600][1600×1200]
A weighty tome

“Noplaceness” is a product of Atlanta Art Now and is:

An incisive look at artists whose work reveals the changing perceptions of place and space in the era of globalization. Noplaceness features writing examining the work of over 30 artists in historical and critical contexts, including Scott Belville, Sarah Emerson, Ruth Laxson, Beth Lilly, Ann-Marie Manker, The Paper Twins, Fahamu Pecou, Sheila Pree Bright, Rocío Rodríguez, Angela West, and K. Tauches.

I haven’t read the articles yet, but the production quality is top-notch. The paper is really thick and the (many, many) photographs look excellent. You can even get it on amazon!

And (thanks to the index), there on page 130 (the left):

[800×600][1600×1200]
Not exactly a large print

OK so it’s not a two-page spread or anything. I guess that’s why they didn’t need a higher resolution version of the original. For those too lazy to click on this handy link right here, here’s the original:

It’s too bad that a work of such huge scale had to get reduced to a 2″ image in a critical art book-thing, but at least anyone on the internet curious about Corpus will keep finding their way to my humble blog.

Owen at the Together Center, 3/27/12

I played a 1.5 hour set of deep house at the Together Center this Tuesday. I was only supposed to play for an hour but the next DJ was late. I was running out of tracks to play at that point so I started playing some techno instead. In the following video I start playing around the 1 hour mark.



Video streaming by Ustream

Here’s the tracklist:

  1. Matthias Meyer, Patlac – Salt City (Nick Curly Remix)
  2. HouseRiders – Yesterday’s Future (Evren Ulusoy Remix)
  3. Lips – Mbali – Original Mix
  4. Soukie & Windish – Great Gatsby (Original Mix)
  5. John Talabot – So Will Be Now… feat. Pional (Original Mix)
  6. Daniel Dexter – No House For Old Men (Original Mix)
  7. Dark & Stormy – Feel It
  8. &ME – Glaced (Original Mix)
  9. SIS – Aires
  10. NTFO & Optick – From The Tower (Nikola Gala Remix)
  11. Atnarko, Sam Mollison – Thinking Of You – Pezzner’s Remix
  12. Pete Gooding, James Doman – Oosa – Original Mix
  13. Freak Seven Feat. Aniff – Nano Kids (Vocal)
  14. Tony Rohr – Night Drive (Alexi Delano Remix)
  15. Shifted – Spire
  16. Sandwell District – Feed Forward Test Session (Recorded Live In Berlin 23/10/2010)
  17. Kevin Gorman – Cast
  18. Mathew Jonson – Marionette

Keybinding GTK to shifted numbers

GTK (and I think QT also) has a fairly intuitive system for binding keys to commands: Control 3 is just "<Ctrl>3". However when you want to bind a key with Shift, things get tricky. I had tried "<Ctrl><Shift>3", and "<Ctrl>#", and "<Ctrl><Shift>#", all without success.

To make this particular keybinding work, you have to use the special X11 keysym name for that key. I found permanent url that describes these keys here, and a better list with printable characters here.

So for my example, the proper binding would be "<Ctrl><Shift>numbersign".

However keybindings like this are very tricky and shouldn’t be used in production applications (this example is a personal plugin for GEdit). This is because keyboards in other countries have different symbols over different numbers. So it’s not a given that Shift-3 is the same as numbersign in every country.

On The Boogiedownload — behind the scenes

A while back, Nick over at Beantown Boogietown asked me for a mix to post on his website, and recently I put something together that I thought was worthy of publication. Nick went all-out, doing a little mini-interview and giving the mix a very flattering review.

Check it out.

I do want to get one more thing on the record: although I didn’t have a preset tracklist, this isn’t a one-take mix. I did go back and rerecord a few of the transitions that drifted a little. If I was in the middle of a mix and things started trainwrecking a bit, I stopped everything, rewound the outgoing track to the breakdown, and redid the transition. I did that twice. And then when I listened to the recording I discovered nine or ten minutes of the recording was doubled up, making it unlistenable, so I had to go back and rerecord that section too.

I took these four or five pieces into Ardour and spliced them carefully together. I know, the magic is ruined, etc etc. Sorry. I was just really glad that the messed-up section wasn’t the whole last 40 minutes of the mix instead of just the two tracks.

Rapid Development, aka Chaos

Now is a shitty time to be a GNOME user. However, I’ve realized that’s because now is a really interesting time to be a GNOME developer. The linux desktop is undergoing a period of transition, one that hasn’t been seen since about 2002 when GNOME2 began to replace GNOME1. ((KDE users went through the same thing in 2007 when KDE4 replaced KDE3, to much uproar.))

After ten years of development, the core GNOME libraries have grown old and crusty and not suited to the post-desktop world that phones and tablets and connected TVs are ushering in. Sure, linux was doing fine for a specific arrangement of screen, keyboard, and mouse, but if linux wants any presence on devices that don’t have these peripherals, it needed to change.

For developers, this is a lovely time to throw spaghetti at the wall and see what sticks. There’s a ton of innovation happening right now and lots of experimentation is going on that is exciting to watch. Every day brings an exciting new demo of an idea for workspace management, or search functionality, or UI innovation.

But these new desktops simply aren’t ready yet. The current situation from a user perspective is one of multiple, competing, buggy, slow, unfinished desktops that don’t live up to the functionality that users are accustomed to. There’s Unity, Gnome-Shell, GNOME Classic, Trinity, and KDE4. Many of these desktops use completely new user interaction systems, introducing a lot of unfamiliar concepts while tossing out a lot of a desktop user’s knowledge.

Change is hard, and change from something that worked to something that doesn’t is a recipe for angry users. The transition from GNOME2 technologies to GNOME3 has clearly been bungled. Distributions were too quick to push users out of very capable desktop environments and the “fallback” options (especially GNOME Classic) are too well-hidden and half-baked. Distributions needed to give users more time — I mean literally years — to try out the new desktops and reject them if necessary. Lots of people are sitting on Ubuntu 11.04 or even 10.10 for fear of being pushed into using a new desktop. ((Long-Term Support versions are probably supposed to fill this gap, but many people have already moved to Ubuntu 10.10, which is past 10.04LTS))

I look forward to switching to Unity or GNOME3, but only when I’ve decided that they are ready for me. I’m old enough now that I just can’t put up with a lot of bullshit, and I will stick with what works for as long as I need to. So I’m using GNOME Classic with a bunch of hacks that make it work like my old desktop. It’s probably too late to resurrect the trusty GNOME-panel interface, but there should be a clear, simple migration path from GNOME-panel to the new GNOME Classic Mode. Sure, load Unity or GNOME3 by default, but if the user selects GNOME Classic the old settings should be invisibly ported as best as possible.

Ubuntu sometimes launches the wrong web browser

I just upgraded to Ubuntu Oneiric 11.10, and aside from being forced to abandon Gnome 2 for Unity or Gnome 3, I found an annoying bug that took me a while to fix. Although I have set up Firefox as my default web browser, I was finding that sometimes Epiphany would get launched instead. Specifically this problem turned up in my app PenguinTV.

The reason for this is that although there is a per-user “preferred application” setting, there is also a system-wide setting that can only be changed on the command line. Run this command in a terminal:

sudo update-alternatives --config gnome-www-browser

This will give you a list of browsers to choose from, one of which will be the one you actually want.

Electric Chord

Hummmmmmmmmmmmmm....

The electrical device in my building and the construction equipment across the street play what I think is a dead-on major chord. I think the truck outside is playing the first and fifth, with the boxy thing playing the third. Music majors please correct me if I’m wrong.

Avid Tip: Ugly fonts in Media Composer 6

When I first installed Avid Media Composer 6, I ran into an issue where the main Avid UI application font was horribly ugly. It was low rez, unsmoothed, and had awful kerning. Like this:

Ugly aliased badly-kerned fonts Ugly aliased badly-kerned fonts
Ugly aliased badly-kerned fonts. Notice how not all text is ugly

It turns out this is a known problem with a simple solution.

In case that link ever dies, here’s the info:

Quit MC and run the enableFontSmoothing script in the Applications > Utilities > Avid Utilities > AppleFontSmoothing folder. I think you just double-click on it for it to work. Then you can launch MC again.

Or if you feel comfortable using the Terminal (and this is what I used successfully), quit MC and launch the Terminal. Then execute the following command:

defaults -currentHost write -globalDomain AppleFontSmoothing -int 1

Hit Return and quit the Terminal, then relaunch MC. The value of 1 at the end should fix the issue (it did for me) but it was also suggested to try 2 or 3 if you still see an issue. Executing the command with 0 resets to the default.

This is a permanent change (you don't have to re-execute the command on system startup) and should solve the font issue.

Here’s what mine looks like afterward:

CAPTIONCAPTION
Nice smoothed fonts. Still somewhat crappy kerning.

Thanks to Kevin Klimek on the Avid forums for posting this solution

Reordering Indicators in Ubuntu

Now that the GNOME panel is dead (long live the panel), the next best option for displaying system information in the upper menu bar is Ubuntu’s Indicators. Indicators are a much less powerful system than the old panel once was, due to various tradeoffs of complexity for ease-of-use. One limitation is that indicators seem to appear in a random, arbitrary order. I’d prefer to arrange the indicators myself. For instance I’d like to have all my system monitors grouped together.

It turns out there is a way to reorder the icons, but it’s tricky. These instructions assume you know how the command line works and can read a process list without getting worried. Until the Ubuntu developers add the ability to reorder indicators this is the only way to do it. This page gave me a good head-start. You have to start by creating a special “override” file that will tell the indicator applet how to reorder the icons. Start by creating the override file with the system defaults:

mkdir -p ~/.local/share/indicators/application
cp /usr/share/indicator-application/ordering-override.keyfile ~/.local/share/indicators/application/
gedit ~/.local/share/indicators/application/ordering-override.keyfile &

My default file looked like this:
[Ordering Index Overrides]
nm-applet=1
gnome-power-manager=2
ibus=3
gst-keyboard-xkb=4
gsd-keyboard-xkb=5

The next step is tricky: You’ll need to add each indicator to the file and assign it a number (lower numbers are further to the right), but what do youo call each item? In many cases (but not all), the name is the same as the executable. indicator-cpufreq is just indicator-cpufreq. Run this command to list all the indicators running on your system:

ps xa |grep indicator-

Other applications, like Tomboy, set up their own indicator name. We need a way of finding out what that name is.

The only way I know of to find this name is to rerun the indicator service and read through the debugging output. Yeah, I know. Warning, this process may mess up the display of your indicators. Nothing done here is permanent, so you can always log out and log back in to restore your regular desktop.

Try this:
killall indicator-application-service && /usr/lib/indicator-application/indicator-application-service

Much text will start spewing. If the command prompt comes back right away and you see the following text, just try the command I gave you again:

(process:7601): libindicator-WARNING **: Name request failed.
(process:7601): indicator-application-service-DEBUG: Service disconnected
(process:7601): indicator-application-service-DEBUG: Application proxy destroyed '(null)'
(process:7601): indicator-application-service-DEBUG: Application free '(null)'

Look for lines like this:
(process:7672): indicator-application-service-DEBUG: 'bluetooth-manager' ordering index is '20626C75'

This tells you two things: bluetooth-manager is the name of this particular indicator, and that’s what you’ll want to put in your override file. Also, 20626C75 is the current ordering index. Because it’s a long number, this value is not currently being overridden.

Now we want to make some changes.

Edit your override file. Here’s mine:
[Ordering Index Overrides]
nm-applet=1
gnome-power-manager=2
ibus=3
gst-keyboard-xkb=4
gsd-keyboard-xkb=5
indicator-penguintv=6
tomboy-notes=7
multiload=8
indicator-sensors=9
indicator-cpufreq=10
indicator-sysmonitor=11

The rerun the command I gave you. You should see some changes:

(process:7672): indicator-application-service-DEBUG: 'indicator-sensors' ordering index is '9'

This means that I successfully assigned the ordering value of 9 to indicator-sensors. And indeed, all my indicators are in the order I want.

When everything is how you want it, log out and log back in to make sure the changes worked.

update 10/19/2012:

there’s a better way to list running indicators:
dbus-send --type=method_call --print-reply \
--dest=com.canonical.indicator.application \
/com/canonical/indicator/application/service \
com.canonical.indicator.application.service.GetApplications | grep "object path"

This will print out the running indicators. replace underscores with hyphens in the keyfile