Why do I obtain this error: 'Error 'Invalid MIT-MAGIC-COOKIE-1' when I do sudo to lauch MATLAB on a Linux machine in MATLAB (R2012b)?

When I remode desktop to a Linux machine, where MATLAB is installed, I obtain the error:
Error 'Invalid MIT-MAGIC-COOKIE-1'
Could you help? Thanks!

 Accepted Answer

Please note that we do not support Remote Desktop Connections. But the follwoing quick fix will solve the issue.
The issue is due to XAUTH and/or XHOST when you are trying to be a super-user and make connections through the X server.
The workaround is to execute the following in the terminal, as a normal user:
xhost local:root
Then sudo to MATLAB.
sudo matlab
You may want to automate it in a script and create an alias for launching MATLAB as a super-user.

More Answers (0)

Categories

Products

Release

R2012b

Community Treasure Hunt

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

Start Hunting!