I found that a single urxvt window as an X client is not enough sometimes. I decided to change mgl-x.pl to start a full-featured WM instead of a single terminal. From now on, you must install and configure a lightweight WM (I found JWM a perfect choice, hence it is a default X client now) and then specify it as an argument for the mgl-x.pl script.