Commit fc7ea133 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

force console mode when matlab started with -nojvm or -nodisplay flags or...

force console mode when matlab started with -nojvm or -nodisplay flags or octave started with --no-window-system flag (ticket 283)
parent 17568ee0
...@@ -101,6 +101,20 @@ for i=2:nargin ...@@ -101,6 +101,20 @@ for i=2:nargin
command = [command ' ' varargin{i-1}]; command = [command ' ' varargin{i-1}];
end end
if isempty(strfind(command, 'console'))
if exist('OCTAVE_VERSION')
if sum(get(0,'screensize'))==4
command = [command ' console'];
end
else
if isunix && (~usejava('jvm') || ...
((matlab_ver_less_than('7.5') && sum(get(0,'ScreenSize'))==4) || ...
(~matlab_ver_less_than('7.5') && ~feature('ShowFigureWindows'))))
command = [command ' console'];
end
end
end
[status, result] = system(command); [status, result] = system(command);
disp(result) disp(result)
if status if status
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment