You are not logged in.

#1 2016-08-19 11:58:52

CerebrosuS
Member
Registered: 2011-02-13
Posts: 10

Fluxbox menu -> starting matlab

Hey guys,

I try to start matlab from the fluxbox menu. The entry in .fluxbox/menu is:

    [exec]   (MATLAB 2016a) {matlab -desktop}

Typing 'matlab' directly into a urxvt instance of bash works.

After pressing the menu item, the splash screen of matlab pops up, but it goes away without displaying the application. (Like using 'matlab' without the '-desktop' option)

Any suggestions?

Greetings

Offline

#2 2016-08-19 14:08:45

totte
Member
Registered: 2011-08-22
Posts: 64

Re: Fluxbox menu -> starting matlab

What happens if you run 'matlab -desktop' in urxvt? Any error messages?

Offline

#3 2016-08-19 20:21:26

CerebrosuS
Member
Registered: 2011-02-13
Posts: 10

Re: Fluxbox menu -> starting matlab

Just an information from OpenJDK8 that maxMem ist not supported and will be ignored. That happens since I switched to OpenJDK instead of the matlab oracle jdk. But the problem has also been there before I switched to OpenJDK, so I don't think that this is the problem.

Any other information needed?

Greetings

Offline

#4 2016-08-19 21:18:34

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: Fluxbox menu -> starting matlab

Typing 'matlab' directly into a urxvt instance of bash works.

How about

[exec] (MATLAB 2016a) {urxvt -e matlab -desktop}

Offline

#5 2016-08-20 06:41:49

CerebrosuS
Member
Registered: 2011-02-13
Posts: 10

Re: Fluxbox menu -> starting matlab

Thx teckk, that worked. But it always opens a additional konsole. Also, I want to understand why the problem occurs.

Greetings

Offline

#6 2016-08-20 14:02:40

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: Fluxbox menu -> starting matlab

I haven't been using matlab. It looks like matlab needs the shell to stay open for it to run.

urxvt -e matlab -desktop opens an instance of urxvt and the -e switch opens an executable in it. Look at man urxvt

You can run anything that you want from fluxbox's menu that way.

Examples:

[exec] (Sleep) {sudo systemctl suspend}
[exec] (TCPdump) {xterm -T TCPdump +sb -g 80x45 -e sudo tcpdump -q -t -n -i any}
[exec] (Inox) {inox --disable-gpu --disable-infobars}
[exec] (MyBrowser Gtk WebKit) {~/mybrowser_Gtk.py}
[exec] (Clear Firefox cache) {~/.cache/mozilla/clear}
[exec] (Rox as Root) {sudo -E rox -n}
[exec] (USB drive FAT Mount) {sudo mount -t vfat /dev/sdb1 ~/usb}
[exec] (Capture Audio to mp3) {ffmpeg -f alsa -i hw:1,1 -c:a libmp3lame -b:a 32k -vn capture.mp3}
[exec] (Edit Menu) {geany ~/.fluxbox/menu}

Offline

#7 2016-08-21 15:34:36

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Fluxbox menu -> starting matlab

No experience w/ matlab, but you could try

[exec] (MATLAB 2016a) {nohup matlab -desktop > /dev/null & disown %1}

Offline

#8 2016-08-22 11:15:46

CerebrosuS
Member
Registered: 2011-02-13
Posts: 10

Re: Fluxbox menu -> starting matlab

Thx seth,

as your solution removes the terminal. I still don't understand why it doesn't work with matlab -desktop only, but that is enough for me now.

Thx to everyone who helped me in solving this problem.

Greetings

Offline

#9 2016-08-23 09:57:14

CerebrosuS
Member
Registered: 2011-02-13
Posts: 10

Re: Fluxbox menu -> starting matlab

Hey,

is there a way to mark the Thread as [SOLVED]? Or is there no need for documentation?

Greetings

Offline

#10 2016-08-23 10:21:16

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Fluxbox menu -> starting matlab

Edit your first post, adding [SOLVED] to the post title.

Offline

#11 2016-08-23 12:07:03

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Fluxbox menu -> starting matlab

CerebrosuS wrote:

I still don't understand why it doesn't work with matlab -desktop only, but that is enough for me now.

See eg. http://unix.stackexchange.com/questions … disown-and

Notice" that nohup + disown will make the entire thing very "aggressive" about staying alive.
matlab won't implicitly close on a logout - unless it's (I assume) a graphical process and dies when loosing the X11 server connecetion.

Offline

Board footer

Powered by FluxBB