
Hi guys, I switched to Xmonad recently, after looking into wmii and dwm, and I am quite happy with it :) However, I tried starting up MATLAB today and it displays a huge gray screen. I thought it crashed during startup but when I clicked on where the menu bar should be, the menus actually open and are displayed properly. But everything else just doesn't draw in the MATLAB window. Does anybody has an idea what the problem might be (and/or give me hints how to provide some more useful information)? It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well. Thanks in advance, Christian

On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote:
Hi guys,
I switched to Xmonad recently, after looking into wmii and dwm, and I am quite happy with it :)
However, I tried starting up MATLAB today and it displays a huge gray screen. I thought it crashed during startup but when I clicked on where the menu bar should be, the menus actually open and are displayed properly. But everything else just doesn't draw in the MATLAB window. Does anybody has an idea what the problem might be (and/or give me hints how to provide some more useful information)?
It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well.
Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad. Fortunately, there is a workaround in the Java code which makes things work again, as long as the current window manager it Compiz or Looking Glass 3D. One of the contrib modules (XMonadContrib.SetWMName) fiddles the X-property settings so that xmonad pretends to be LG3d; the author claims that this makes Java programs work correctly. Stefan

On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote:
On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote:
It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well.
Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad.
Yes, the Matlab GUI is Java. Another known workaround that often (but not always, for unknown reasons) works is export AWT_TOOLKIT=MToolkit before starting Java programs. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Brandon S. Allbery KF8NH wrote:
On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote:
On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote:
It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well.
Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad.
Yes, the Matlab GUI is Java.
Another known workaround that often (but not always, for unknown reasons) works is
export AWT_TOOLKIT=MToolkit
before starting Java programs.
Ok, great. That worked for me. Thanks.

mail:
Brandon S. Allbery KF8NH wrote:
On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote:
On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote:
It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well.
Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad.
Yes, the Matlab GUI is Java.
Another known workaround that often (but not always, for unknown reasons) works is
export AWT_TOOLKIT=MToolkit
before starting Java programs.
Ok, great. That worked for me. Thanks. _______________________________________________
could someone summarise this issue generically, with the fix details, for the xmonad.org/faq.html page please? -- Don

I'm the author of SetWMName and I can summarise the issue, however I already
tried to do this in the comment in the beginning of the SetWMName.hs. If it
is not enough, please advice on how to improve the summary.
If it is possible, you should use the SetWMName instead of setting
AWT_TOOLKIT=MToolkit, because MToolkit (Motif, actually) is an old engine
for AWT and it doesn't support all the features needed to make the Java GUI
programs work (some programs work, some do not). Setting WM name is quite a
dirty hack, but it is the only way to work around the problem till, maybe,
JDK7 (and there are no guarantees we'd have anything fixed there).
Ivan
On 10/2/07, Don Stewart
mail:
Brandon S. Allbery KF8NH wrote:
On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote:
On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote:
It looks like it's a problem with Xmonad. I fired up an Xnest with
fvwm
and MATLAB works fine there. And Xnest with wmii and MATLAB works as well.
Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad.
Yes, the Matlab GUI is Java.
Another known workaround that often (but not always, for unknown reasons) works is
export AWT_TOOLKIT=MToolkit
before starting Java programs.
Ok, great. That worked for me. Thanks. _______________________________________________
could someone summarise this issue generically, with the fix details, for the xmonad.org/faq.html page please?
-- Don _______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi Ivan, I still have some trouble with MATLAB. As I reported earlier, the AWT_TOOLKIT=MToolkit hack worked for me, but - as I discovered later - only if I run MATLAB from the local machine. If I want to spawn it remotely on one of our computing machines (via ssh -X) nothing will show up at all. Today I tried it with your SetWMName extension (for which I needed to change from 0.3 to darcs), but it doesn't work :-( As in the module docs, I use setWMName "LG3D" (I tried to put it in my logHook first, and also triggering manually via a keypress), but the error is still the same (just blank grey screen with menus popping up properly but no widgets at all). I am thankful for any suggestions. Best regards, Christian Ivan Tarasov wrote:
I'm the author of SetWMName and I can summarise the issue, however I already tried to do this in the comment in the beginning of the SetWMName.hs. If it is not enough, please advice on how to improve the summary.
If it is possible, you should use the SetWMName instead of setting AWT_TOOLKIT=MToolkit, because MToolkit (Motif, actually) is an old engine for AWT and it doesn't support all the features needed to make the Java GUI programs work (some programs work, some do not). Setting WM name is quite a dirty hack, but it is the only way to work around the problem till, maybe, JDK7 (and there are no guarantees we'd have anything fixed there).
Ivan
On 10/2/07, *Don Stewart*
mailto:dons@galois.com> wrote: mail: > Brandon S. Allbery KF8NH wrote: > > > >On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > > > >>On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: > >>>It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm > >>>and MATLAB works fine there. And Xnest with wmii and MATLAB works as > >>>well. > >> > >>Is the MATLAB gui written in Java? There is a known bug in the Java > >>windowing code which prevents it from working correctly with > >>non-reparenting window managers like xmonad. > > > >Yes, the Matlab GUI is Java. > > > >Another known workaround that often (but not always, for unknown > >reasons) works is > > > > export AWT_TOOLKIT=MToolkit > > > >before starting Java programs. > > > > Ok, great. That worked for me. Thanks. > _______________________________________________
could someone summarise this issue generically, with the fix details, for the xmonad.org/faq.html http://xmonad.org/faq.html page please?
-- Don _______________________________________________ Xmonad mailing list Xmonad@haskell.org mailto:Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Does SetWMName hack work when you are starting the MATLAB on local machine?
Are you pressing the keys which set the WM name before the start the MATLAB?
Once the JVM inside which the MATLAB is running has been started, changing
the name of the WM does not affect this particular JVM (it only checks which
WM is used once on startup).
If this still does not work, can you please try adding AWT_TOOLKIT=MToolkit
line to the ~/.ssh/environment and make sure that it gets into the
environment of the remote machine at startup of your ssh session.
Ivan
On 10/12/07, Christian Thiemann
Hi Ivan,
I still have some trouble with MATLAB. As I reported earlier, the AWT_TOOLKIT=MToolkit hack worked for me, but - as I discovered later - only if I run MATLAB from the local machine. If I want to spawn it remotely on one of our computing machines (via ssh -X) nothing will show up at all.
Today I tried it with your SetWMName extension (for which I needed to change from 0.3 to darcs), but it doesn't work :-(
As in the module docs, I use setWMName "LG3D" (I tried to put it in my logHook first, and also triggering manually via a keypress), but the error is still the same (just blank grey screen with menus popping up properly but no widgets at all).
I am thankful for any suggestions.
Best regards, Christian
I'm the author of SetWMName and I can summarise the issue, however I already tried to do this in the comment in the beginning of the SetWMName.hs. If it is not enough, please advice on how to improve the summary.
If it is possible, you should use the SetWMName instead of setting AWT_TOOLKIT=MToolkit, because MToolkit (Motif, actually) is an old engine for AWT and it doesn't support all the features needed to make the Java GUI programs work (some programs work, some do not). Setting WM name is quite a dirty hack, but it is the only way to work around the problem till, maybe, JDK7 (and there are no guarantees we'd have anything fixed there).
Ivan
On 10/2/07, *Don Stewart*
mailto:dons@galois.com> wrote: mail: > Brandon S. Allbery KF8NH wrote: > > > >On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > > > >>On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: > >>>It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm > >>>and MATLAB works fine there. And Xnest with wmii and MATLAB works as > >>>well. > >> > >>Is the MATLAB gui written in Java? There is a known bug in the Java > >>windowing code which prevents it from working correctly with > >>non-reparenting window managers like xmonad. > > > >Yes, the Matlab GUI is Java. > > > >Another known workaround that often (but not always, for unknown > >reasons) works is > > > > export AWT_TOOLKIT=MToolkit > > > >before starting Java programs. > > > > Ok, great. That worked for me. Thanks. > _______________________________________________
could someone summarise this issue generically, with the fix
Ivan Tarasov wrote: details,
for the xmonad.org/faq.html http://xmonad.org/faq.html page
please?
-- Don _______________________________________________ Xmonad mailing list Xmonad@haskell.org mailto:Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
_______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

van Tarasov wrote:
Does SetWMName hack work when you are starting the MATLAB on local machine?
No, neither remote nor local.
Are you pressing the keys which set the WM name before the start the MATLAB?
Yes, did that.
Once the JVM inside which the MATLAB is running has been started, changing the name of the WM does not affect this particular JVM (it only checks which WM is used once on startup).
I just rebooted my machine to make sure no VM is sleeping somewhere - but still the same problem :-(
If this still does not work, can you please try adding AWT_TOOLKIT=MToolkit line to the ~/.ssh/environment and make sure that it gets into the environment of the remote machine at startup of your ssh session.
That for some reason does not work, but I can of course do an 'export AWT_TOOLKIT=MToolkit' in the ssh shell before I call 'matlab' (I suppose that should make no difference to the ~/.ssh/environment approach?). But then MATLAB freezes during startup - I cannot close the splash screen using Mod-C nor kill matlab using Ctrl-C on the terminal running the ssh session. Only Mod-C killing the terminal works (or probably a SIGKILL to matlab, but I haven't tried that). - Christian
participants (5)
-
Brandon S. Allbery KF8NH
-
Christian Thiemann
-
Don Stewart
-
Ivan Tarasov
-
Stefan O'Rear