Can't make matlab entry in menu!

When I open a xterm matlab start fine eventhough I get this message:

johs@ubuntu:~$ matlab
/home/johs/apps/matlab/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Permission  denied

but if I have this in my .fvwm2rc file:

#-------- Most popular programs
AddToMenu MyApps				"MyApps Menu"	Title
+  "matlab"							Exec exec matlab

And I choose to restart fvwm and then click on matlab from the menu the
start image from matlab only appears for a second and then it disappears and the program does not start.

What am I missing?

Anything in your ~/.xsession-errros file?

– Thomas Adam

this is what I get in the .xsession-errors file after I try to start matlab_

xscreensaver: 15:06:40: 0: for window 0x2a0000e (kate / Kate)
QObject::disconnect: Unexpected null parameter
kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle '/etc/samba/smb.conf'
kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle '/etc/security/fileshare.conf'
/home/johs/apps/matlab/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Permission denied

                              < M A T L A B >
                  Copyright 1984-2004 The MathWorks, Inc.
                         Version 7.0.0.19901 (R14)
                                May 06, 2004

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> kio_thumbnail: WARNING: KLocale: trying to look up "" in catalog. Fix the program
xscreensaver: 15:07:12: 0: unrecognised ClientMessage "_NET_WM_DESKTOP" received
xscreensaver: 15:07:12: 0: for window 0x2a0000e (kate / Kate)
xscreensaver: 15:07:12: 0: unrecognised ClientMessage "_NET_ACTIVE_WINDOW" received
xscreensaver: 15:07:12: 0: for window 0x2a0000e (kate / Kate)

does not seem to be any errors

It seems you are starting matlab with no desktop. That is in terminal mode. Matlab will be reading stdin from fvwm (which will be empty) an print to .xession-errors (which is what you see).

I use “Exec exec xterm -e matlab -nodesktop -nosplash” to start matlab in an xterm. If you want to (slow) matlab desktop you may try to append -desktop to your command.