How do I install the MCR in Ubuntu 14 without "killing" Unity?

2 views (last 30 days)
Background: I have created an Ubuntu VirtualBox from LAPP stack and added the Ubuntu desktop (Unity: sudo apt-get install ubuntu-desktop). Now I am attempting to install the MCR without loosing Unity.
  • Download MCR zip and extract to MCR_SOURCE
  • Go to my folder that contains the files: cd /media/sf_shared/MCR_ SOURCE
  • Change installer_input.txt file:
destinationFolder=/opt/MCR
agreeToLicense=yes
outputFile=/opt/install.log
mode=silent
product.MATLAB
product.MATLAB_Builder_JA
# Note: To find out the required toolboxes >> start Matlab >> run your code and find out which toolboxes were used with: license('inuse')
  • Install MCR: sudo ./install -inputFile /media/sf_shared/MCR_SOURCE/installer_input.txt >> success
  • Restart Ubuntu >> test whether Ubuntu’s Unity still exists >> everything is fine
  • Attention the next step will “ kill ” your Ubuntu desktop configuration!!! (i.e. copy your hardisk, anything you must do to recover quickly) – now configure: sudo gedit /etc/environment
LD_LIBRARY_PATH="/opt/MCR/v84/runtime/glnxa64:/opt/MCR/v84/bin/glnxa64:/opt/MCR/v84/sys/os/glnxa64:${LD_LIBRARY_PATH}"
XAPPLRESDIR="/opt/MCR/v84/X11/app-defaults"
Note: X11/app-defaults folder does not exist
  • Restart Ubuntu >> Unity is gone, recovery attempts such as deleting the above lines do not recover Unity; reinstalling the Ubuntu desktop does not help either.
I have tried an alternative route with exporting the variables, which also "kills" Unity. By the way this affects all users.

Accepted Answer

Wolfgang Garn
Wolfgang Garn on 22 Jun 2015
It is not necessary to register these environment variables in /etc/environment, which means that the Unity sidebar will not be affected.
Instead register the environment variables temporarily either as local user or via sudo -i:
export LD_LIBRARY_PATH="/opt/MCR/v84/runtime/glnxa64:/opt/MCR/v84/bin/glnxa64:/opt/MCR/v84/sys/os/glnxa64:${LD_LIBRARY_PATH}"
export XAPPLRESDIR="/opt/MCR/v84/X11/app-defaults"
Now it is possible to run Matlab Apps without "killing" Ubuntu's desktop. For instance to run the Java compiled makesqr.m file. The Java package makesqr was created using "Matlab's JavaBuilder tutorial". This was done on my Windows 7 machine, which runs Matlab R2014b.
java -classpath "/opt/MCR/v84/toolbox/javabuilder/jar/javabuilder.jar:/media/sf_shared/for_testing/makesqr.jar" makesqr.Class1 5
Please ensure that the owner and permissions of the /opt/MCR and /media/sf_shared/for_testing folders are set correctly (see here for details).

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!