DeSmuMEがUbuntuで起動しない件が解決した

Ubuntuをインストールした当初から遭遇していた問題で、コマンドラインでDeSmuMEを起動しようとすると

$ desmume

Nbr of joysticks: 0

The program 'desmume' received an X Window System error.
This probably reflects a bug in the program.
The error was 'GLXBadContext'.
(Details: serial 275 error_code 177 request_code 159 minor_code 5)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

みたいなかんじでGLXBadContextがどうこうと言われて起動しなかった。

DeSmuMEのフォーラムにまったく同じ現象で困ってる人がいて(Desmume v7.0 - anyone got it working on kubuntu/ubuntu (Page 1) / General / DeSmuME forums)、読んでみると「AIGLXをdisableにするといいよ!」って書いてるみたいだった。

The work around from the http://forums.desmume.org/viewtopic.php?id=138 does not disable 3D. That is you will be able to run Desmume and get 3D emulation.

The work around (see post #6 from the above thread) is to disable the AIGLX extension of X Window. This will bugger up any OpenGL based compositing window manager you are running (Compiz or Beryl).

So you have to choose between having Desmume 3D emulation or having flashy desktop effects (and some useful features).

なので、/etc/X11/xorg.confに以下を追記してAIGLXをoffにしたら起動するようになった。

Section "ServerFlags"
Option "AIGLX" "off"
EndSection

でも、フォーラムの投稿にあるようにデスクトップの特殊効果がなくなってしまった。ちょっと寂しいけど、しょうがない。
これでやっとMQOビューアの製作を進められる!