Is there a visual bell in Linux that works in X?
I don't of anything exactly like that, but you can use the command line tool notify-send to have pop-ups on the desktop. In Ubuntu the package is libnotify-bin. For example:
notify-send -u normal -t 10000 -i info 'hw' 'Hello world'
I had the same problem so I wrote a program for this:
https://github.com/rianhunter/xvisbell
To run:
$ git clone https://github.com/rianhunter/xvisbell.git
$ cd xvisbell
$ make
$ xset b on
$ xset b 100
$ ./xvisbell &
$ xkbbell # test
Hope that helps.
Depending on what you need, there is also xmessage
—it's old, it's ugly, but it's included with X. It doesn't flash the screen, but it will pop up a message, and you can specify what buttons are on it (which one you press is returned in the exit status) if that's important.
You didn't specify GNOME or KDE, but KDE 4.2 has built-in support for this. If you look under System Settings > Accessibility, you can turn on the visual bell there. KDE also lets you customize actions for various system notifications that go beyond sounds. For example, you can show a popup, run a command, mark a taskbar entry, etc. This is under System Settings > System Notifications.