Quickies: Flash 64, fixing skipping audio, mapping keys to applications


I've been having problems playing flash video on my new system at home.  The system is a 64bit amd running F10.  Flash video plays but the audio skips a lot.  I had similar problems with other applications but was able to get around it by using the right audio setup, such as using -A alsa when running xine.  But the flash plugin doesn't allow that sort of setting (at least not that I can find).

A little digging found a Fedora posting on using Flash.  This led to the Alpha version of a 64-bit Flash Player plugin for Linux.  This replaces the flash-plugin rpm (which you'll need to remove using yum).  I installed the alpha plugin and it seems to work fine, but the audio skipping is still there.

A little more digging and I found that Pulse Audio needs a minor tweek (or complete removal if you want to go that route).  I edited /etc/pulse/default.pa and changed this line

load-module module-hal-detect

to this

load-module module-hal-detect tsched=0

and then rebooted.  Viola!  The audio skipping is gone in flash video.  Pulse Audio still has a way to go before it's an ideal solution.  It sure seems to get in the way more than it helps.

The other thing I finally uncovered was mapping all those extra keys on my logitech internet navigator keyboard to something useful.  Turns out that this keyboard is supported under linux, specifically gnome if you go to System->Preferences->Hardware->Keyboard.  That gets some of the keys working, like audio up and down, but most of the keys still don't do anything even if you use the keyboard shortcuts option (System->Preferences->Personal->Keyboard Shortcuts).

What you need to do is find out they keycode for each key using xev (which comes in the xorg-x11-utils package). Once you have the keycode you use xmodmap (which comes in xorg-x11-server-utils) to map the keycodes to a key recognized by the X.org server (see /usr/include/X11/keysymdefs.h).  With the keycodes mapped to a key, you then have to map the key to an application using xbindkeys.   This is a little program that reads a configuration file, $HOME/.xbindkeysrc, which specifies what command to run when the key is hit.  To get this all working, I wrote a little script that I added to my startup session (see System->Preferences->Personal->Session) which runs xmodmap and xbindkeys for me.  Now when I log in I can use keys to launch a gnome-terminal, MythTV and various other applications.

You can find a little more detail on this process from this hotkey tutorial.

I haven't checked but I'm pretty sure that if you update the .xbindkeysrc file to add new key-to-application mappings you'll have to log out and log back in to have the mappings picked up for the current session.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.