Friday, February 27, 2009

Awesome/other wrong keyboard layout

due to the high resource usage by Eclipse (I have to use that unfortunately because of my professor) I've temporarly dropped GNOME and now I'm using Awesome for a while.

Ok let's say the problem: the keyboard. Do you have different languages, layouts and so on among several configurations (GNOME, X, ...) and your keyboard layout is messed up with awesome?
Just do it:

setxkbmap -layout YOURLAYOUT

Where YOURLAYOUT for me is it.

I've found this utility in this mailing thread. Yet you can read that awesome is still too young and lacks some keyboard configuration features.

Have fun!

Tuesday, February 24, 2009


I'm recently writing a game with Java AWT/Swing/SwingX/JMF for a university exam.
If you are using the Java Media Framework and most of the formats (all the well known and used formats) can't be handled by the library here's your definitive solution to the problem.
You will usually get "Unable to handle format: MPEG" or something like that.

How do you get rid of that and make things work? There's a great plugin named jffmpeg which handles a huge number of audio and video formats (including ogg/vob).
Just follow the instructions on the project website to install the plugins.

Alternatively you can register only the codec and demux you use from within your application code as follows (e.g. only handle MPEG video format on input):

Format[] inFormats = { new VideoFormat ("MPEG") };

PlugInManager.addPlugIn ("net.sourceforge.jffmpeg.VideoDecoder", inFormats, null, PlugInManager.CODEC);

PlugInManager.commit ();