Skip to main content


Showing posts from July, 2009

Set up wireless without KDE nor Gnome

One of the first problem faced when going away from KDE, Gnome or XFCE is that you have to set up your wireless connection manually.
If you have 10 minutes, it can be done once and for all: just follow this how to HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc..
Then you can remove the NetworkManager startup script : "sudo update-rc.d -f NetworkManager remove".
Keep in mind to launch a "sudo /etc/init.d/networking restart" in case of problem.

Update: I just found a solution to automatically start Network Monitor Applet (nm-applet) with Awesome Window Manager. But I am quite happy with my current setting, it just connect when it starts.

Java GUI application in Awesome Window Manager

There is a known problem with Java and the non-reparenting Window Managers like for example Awesome.
Java applications which use the XToolkit/XAWT backend may draw gray windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in JDK 5 and 6 because it assumes a reparenting window manager.

There are a number of places where this is described:
in the FAQ : GUI Java apps appear as a gray screen!
in the wiki Problems with Java
in the Man page

To sum up:
it doesn't affect version Java 1.4.2 and before.
it doesn't affect version Java 1.7 and hopefully after.
the best workaround by far, is to set a name to the Window Manager, so it is recognise by Java as a non-reparenting Window Manager. A simple utility allow to set this name. Just add 'wmname LG3D' to your .xinitrc or simply run it.
Here are other workarounds left here for reference:
launch another X server, like Xephyr
set the following environment variable (to use the older Motif back-end instead): AWT_TOOLKIT=MToolkit. …

Lightweight OS : Awesome Window Manager

Some year ago I used to try all kind of Window Managers on Linux and basically loosed a lot of time for nothing. I never though that I would fall back again, but having just 1Go RAM and running JetBrains MPS forced me to consider lighter alternatives than KDE.

First I tried XFCE, but it wasn't enough: too close to Gnome, too traditional. So I tried Fluxbox, didn't like the menu, RatPoison too simple and finally: Awesome. As usual, I found the Wikipedia list very useful.

And so far it is the best Window Manager I ever used.
- Fast, clean and simple, even their Web site is well designed.
- No more loosing time resizing the windows ! At about 98% I just need to have the applications full screen.
- But still it is easy to resize, typically popup window are often too small.
- No waisted screen space : no desktop.
- an unified way to close applications (no more Ctrl-Q, Ctrl-E, Ctrl-X ... one Mod4-Shift-c for all !)
- easy shortcuts
- search through the menu. It is not as good as Spo…

DSL and Meta Programing System

As a regular Software Engineering Radio listener, JetBrains MPS 1.0 release came to my attention.
I read articles, watched the screen-casts and downloaded the beast to put my hands on.

I have a mixed feeling: on one hand, it is a step towards higher abstractions. From bare metal to assembly to C to C++ to Java, this is where we are doomed to go.
But on the other hand, the tool and the concepts are really complex. It is not the kind of tool that you download and play with before digging the manual ! With MPS, I have been following the tutorial carefully, step by step. It won't be mainstream yet.

Nonetheless, it opens a whole new landscape. I guess that there will be DSL users, DSL developers and of course DSL architect !? The tool is already very powerful. The samples with complex numbers and mathematical notation are impressive: the readability is way better.

It remind me the idea that code isn't meant only to compile, but its most important purpose is to communicate its intent t…

UMLgraph and Maven

Just a quick note on how to setup UML Graph in Maven.
{additionalparam>-attributes -enumconstants -enumerations -operations -types -visibility -inferrel -inferdep -hide java.*{/additionalparam}
The only trick is that all the additional parameters must be set on one line ! This doesn't appear in the documentation nor on the web. Quite the contrary, I found a lot of bad examples on the web ! This POM configuration simply works great. I noticed a new UMLGraph version 5.2. I didn't try but it shou…

Maven how to set the Main-Class in the Manifest

In Java, for a jar to be executed, the easiest way is to set its entry point. This is done by setting the Main-Class in the Manifest. Easy.
Now let's do it with Maven !

First you use your jar, in Maven, you can to configure it this way:
artifactId maven-jar-plugin
version 2.2
Now you would like your jar to contain all the dependencies, then you use the maven-assembly-plugin. But it won't take the configuration set in the jar plugin. You have to reconfigure the exact same main-class again. It is redundant OK, but why should it have a different syntax !?!
artifactId maven-assembly-plugin
OK, the point is that there are at least two way to configure the Manifest. Either with a free key/value syntax, with Manifest Entries. Or with the class Manifest which has a mainClass element. So it is up to you to b…

Store Flac, broadcast MP3 : mp3fs and Ampache

Lets say that you keep your music with the best quality while still consuming very little disk space : flac (lossless audio compression).
Now that is fine for PC, but most portable players (iPods) doesn't support flac, but MP3, MP4 and other .
You could duplicate your whole collection in two formats, or transcode as needed, but that would be painful. (Even if some application like Amarok are able to transcode on the fly the music or podcast transfered on an iPod.)
A solution for me is to use mp3fs. Mp3fs takes a directory full of flac and present it as another directory full of ... MP3 ! That is very useful for FTP, NFS or Samba shares.
So your Flac music can now be copied on your ipods easily.

One caveat: unless you have a powerful PC, don't expect to listen directly the mp3: the transcoding take some time. It is fine to copy, but not to stream !

Lastly, I didn't find package for Kubuntu nor Fedora. You just have to compile, which is very simple. The only problem being to get …