I'm fighting with a rather odd problem with Matlab.

The startup script is located in /opt/matlab_2013b/bin and is called matlab.

  • When I run it in terminal, it works fine.

But I want to make a launcher for it in the Xfce panel.

  • With just this, it crashes right away: /opt/matlab_2013b/bin/matlab
  • When I use xterm -e "cd /opt/matlab_2013b/bin; ./matlab", it works, but I have a useless xterm floating around. (Same result if I use the above and select "start in terminal" - then I have a lxterminal, not a big improvement)
  • sh -c "cd /opt/matlab_2013b/bin; ./matlab" does not work (I thought maybe it'd fool matlab into thinking it's in a terminal, but no

I think the startup scripts must somehow depend on being invoked from a interactive terminal.

Is there some way to run xterm or other terminal without the window? So that the process that runs in it thinks it's in real terminal, but there's no window showing?

  • Can you do Alt + F2 and type in /opt/matlab_2013b/bin/matlab
    – SailorCire
    Mar 2, 2015 at 12:54
  • no, it crashes. It needs the terminal for whatever reason
    – MightyPork
    Mar 2, 2015 at 13:14

1 Answer 1


You can do this with screen in detached mode. Put something like this in your startup script:

screen -d -m /opt/matlab_2013b/bin/matlab

It will create a detached screen session, which should allow the script to start. You can attach to the screen session as normal at any time.

You can almost certainly achieve the same effect with tmux, but I haven't used it enough to find out.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.