Deny incoming network connections

12 次查看(过去 30 天)
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