Matlab 2007b problem in Ubuntu 8.04 (Hardy Heron)

May 23rd, 2008 | Categories: applications, math software, matlab | Tags:

Yesterday I wrote about Mathematica 6.0.2 not working properly on Ubuntu 8.04 and today I discover that Matlab 2007b doesn’t like it much either. When you run Matlab you might get nothing more than an empty gray window and Matlab will essentially be unusable. Apparently the problem stems from a bug with Java applications when using Compiz or Beryl effects so just turn them off and all will be well.

To fix the problem just click on System -> Preferences -> Appearance in the GNOME menu and select the Visual Effects tab. Set the effects to None and then click on close. Matlab 2007b should now work properly and you won’t be wasting any CPU cycles on eye candy.

Of course you might not want to disable all of the pretty visual effects. If so then try the workarounds detailed in The Mathwork’s article on this issue – I haven’t tried any of these extra tricks since they are unsupported and I am more insterested in a working Matlab than a pretty desktop.

  1. June 5th, 2008 at 05:52
    Reply | Quote | #1

    I set None as default. Matlab 2007a cannot start. Only the welcome Matlab window is opened, then, it close. Matlab 2007a cannot run. Dunno y?


  2. admin
    June 5th, 2008 at 17:02
    Reply | Quote | #2

    Hi falleaf

    I have no idea what is causing your issue I am afraid. Are you using Ubuntu or something else? Are you sure it is Matlab 2007a?

  3. Adrien
    June 11th, 2008 at 09:31
    Reply | Quote | #3

    Hi falleaf,

    When starting Matlab from a desktop shortcut, you have to use the “-desktop” option In the shortcut properties, just add -desktop in the field containing the command to execute. Without this option Matlab will display the welcome window and then exit. The other option is of course to start Matlab from a terminal.

    By the way, the trick of defining the environment variable AWT_TOOLKIT=MToolkit solves the problem of Matlab not working with visual effects on. However when starting Matlab from a remote machine, I still had to turn visual effects off to have a working Matlab.

    Hope this helps.

  4. darryl
    July 8th, 2008 at 14:34
    Reply | Quote | #4


    try opening a terminal window and running matlab from there by typing ‘matlab’

    You will most likely see the reason why matlab is not starting.

  5. jy008
    July 18th, 2008 at 03:46
    Reply | Quote | #5

    My matlab2007b works well on kubuntu v8.04 (hardy)

  6. Debadeepta Dey
    July 24th, 2008 at 15:26
    Reply | Quote | #6

    Thank you very much. I am a very hardcore Matlab user and I absolutely cant live without it and you basically solved my problem in one click.

  7. Markus
    October 13th, 2008 at 10:54
    Reply | Quote | #7

    Thanks a lot!

  8. Joakim
    October 28th, 2008 at 21:59
    Reply | Quote | #8


    It’s still really slow (i run over ssh), but at least now I can see something.

  9. steven
    February 5th, 2009 at 02:50
    Reply | Quote | #9

    brilliant! works for us from 8.04 using matlab 2007b over ssh. thanks much.
    (note we didn’t have this problem using 2008a for some reason. weird.)

  10. Hyder
    July 6th, 2009 at 19:48

    Perfect man .. great help you saved me alot of time and energy

  11. Serhan Cosar
    November 16th, 2009 at 08:07

    Thanks for such a useful share!!