Deny incoming network connections

조회 수: 11 (최근 30일)
Gordon Fain
Gordon Fain 2019년 8월 22일
답변: Gordon Fain 2019년 8월 29일
How do I set a global deny and stop this attachment from popping up every time I start MatLab?

채택된 답변

Gordon Fain
Gordon Fain 2019년 8월 29일
Your cure is worse than the disease. Why don't you guys just fix the problem? Is it so difficult?

추가 답변 (1개)

Payas Bahade
Payas Bahade 2019년 8월 27일
Hi Gordon,
I have heard that this issue is known and the concerned parties may be looking into it.
As a workaround you can launch MATLAB from the 'Terminal' by directly entering the location of the MATLAB executable or by using a shell script.
You will be prompted to accept the network connections the first time you launch MATLAB and all further launches through the 'Terminal' will not display the network message.
1. To launch MATLAB from the 'Terminal' by directly entering the location of the MATLAB executable:
1a. Launch 'Terminal' (This may be present in Applications > Utilities)
1b. Inside the 'Terminal' window type the location of the MATLAB executable.
For example, /Applications/MATLAB_R2019a.app/bin/matlab
2. To launch MATLAB from the 'Terminal' using a shell script:
2a. Create a shell script and save it on the Desktop or desired location for easy access:
a. Launch 'Terminal' (This should be present in Applications > Utilities)
b. Type 'cd <desired location>' inside the 'Terminal' window.
For example: cd desktop to change the current directory.
c. Type 'vim <filename>' inside the 'Terminal' window to create a new file with the desired filename.
d. Press the letter 'i' on your keyboard to enter the INSERT mode.
e. Inside the file type the below commands:
#!/bin/sh
# location of the MATLAB executable script with respect to the current desired location. For example:
/Applications/MATLAB_R2019a.app/bin/matlab
f. Press the 'esc' key on the keyboard to exit the INSERT mode.
g. To save the file, type in a colon followed by wq. i.e :wq
2b. Make the shell script executable by typing the below command in the 'Terminal' window:
chmod u+x <filename>
You can now launch MATLAB by double clicking the file or typing the below commands inside the 'Terminal' window:
cd <file location>
sh <filename>
An alternate workaround is to disable the built-in firewall on MAC.
WARNING: Disable MAC's firewall ONLY if you are behind a trusted router with a firewall.
To do so go to System Preferences > Security and Privacy > Firewall and click "Turn Off Firewall".

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by