Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Obviously I'm not looking to open another terminal and ssh without -X. I'm actually doing this with running Matlab on another server. So after ssh'ing into my remote server with the -X option, I type matlab and the graphics forward in as expected.

How do I run matlab with X11 forwarding enabled but without graphics?

share|improve this question
so you want it to not connect to the X11 display and just use the console? try DISPLAY= foobar where foobar is your command. – strugee Jun 15 '14 at 0:05
up vote 5 down vote accepted

You can run matlab with the -nodesktop option.


                      ss #1

Source: Launching MATLAB without the desktop

share|improve this answer
Thank you for pictures and everything. Works great. – Daniel Miladinovich Jun 15 '14 at 1:06

You should be able to invoke matlab with the -nodisplay option

matlab -nodisplay

or simply unset the DISPLAY environment variable e.g. in bash

DISPLAY= matlab
share|improve this answer
Great thank you works great! – Daniel Miladinovich Jun 15 '14 at 1:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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