Root Login and Matlab Installation

So I updated to Mint 18.1, and because it had been a while I decided to reinstall clean. Everything went fine, except I now have a problem with reinstalling Matlab R2016b. Installing Matlab with symbolic links in GNU/Linux requires root privileges! And I cannot, for the love of god, figure out how to get root login using GUI. I need to have the root access in GUI because my Matlab installation has to be done using my lab's Mathwork account, and that is limited to GUI.

Any ideas?

run whatever executes the installation as root from the CLI

3 Likes

open the terminal on the installation folder (or open in the default position and navigate there), and there should be an "install" file in that folder. to install run:

sudo bash install

and that should do it.

BTW i'm running antergos linux and i don't need root privileges to install matlab. Try running the above code without sudo at first.

1 Like

i think his issue is that the installer is walled in by a client interface, i.e. he has to login to the service before he can install the software, so im assuming there wont be a local install file, or it would be easy to circumvent the login requirement.

1 Like

Yup! That's exactly the problem. Besides, without root I cannot write to /usr/local/bin, and without that I cannot set up symbolic links. Which means every time I will need to manually fix this issue... instead of Matlab checking the required directories automatically.

Can you fire up Matlab by clicking on the icon in the menu, or do you need to launch it through commandline? What folder did you install it in? It seems I am restricted to the home folder, or some sub directory under it, without root.

I installed matlab in my home folder (Documents sub directory to be more precise). I don't think there is any need to give it root privileges. Its working fine for me.
To launch matlab i navigate the command line to the bin subdirectory in the installed folder and run:

bash matlab

And it opens. For some reason i can never get it to make a shortcut so i use this method every time.

1 Like

Why do you need to navigate to bin, if you installed it in Documents?

And how come you don't get a shortcut? The mathworks support system says it should create a shortcut!

The folder where you install matlab (in my case home/Documents/Matlab) doesn't have the binary as it is located in the bin sub folder (in my case home/Documents/Matlab/bin).
About the shortcut i don't know...maybe its desktop related.In Cinnamon it might show up on the menu. I'm using Gnome shell and i don't have the shortcut. But launching matlab from the command line is easy so no biggie.

1 Like

I installed it into my home directory too. I do not exactly remember why (it was 2014) but I do remembe having problems installing it as root.

1 Like

I figured it out! Here's what you do. First you download the installer and extract the files to a specific folder.
Then in the terminal:

cd /

Then

cd <path to where you extracted the downloaded files>

for me this was:

cd /home/biolinguist/Documents/R2016b

Then use the following:

biolinguist@biolinguist-Alienware-17-R3 ~/Documents/R2016b $ ls
activate.ini  bin   install              java                   patents.txt  sys             ui
archives      help  installer_input.txt  license_agreement.txt  readme.txt   trademarks.txt
biolinguist@biolinguist-Alienware-17-R3 ~/Documents/R2016b $ sudo ./install

After this, if you have done everything right, the GUI installer would pop-up, let you sign in to your mathworks subscription account, and set up the symbolic links to usr/local/bin.

According to Mathworks this should create a Matlab shortcut in the menu. I will update on if this is so once the installation finishes. But even if it does not create a shortcut, the symbolic links would mean I wouldn't have to navigate the terminal to a specific folder every time I want to fire up Matlab!

No shortcuts were created, but just running bash works fine!

You can make the shortcut yourself if you are not lazy. I made one for MATLAB in KDE.

1 Like

Feel free to elaborate...

Not gonna be on my linux machine in the next week or so but here is a link to a tutorial
http://cs.boisestate.edu/~amit/teaching/handouts/cs-unix/node51.html

1 Like

Thanks, but unfortunately that doesn't work. This may be because I am on cinnamon, but I doubt it will work with Matlab on KDE either. See, running matlab with symbolic links requires it to be installed in /usr/local/Matlab, while the binaries go in /usr/local/bin. So, launching it requires you to first navigate the terminal to that location, and then running bash. Creating a shortcut and linking it to the matlab executable doesn't work. I tried...__

I will make a note, and will come back to answer you after 5 to 7 days. I am 100% sure I do have matlab shortcut. ( If I get somebody to start my computer at home and be able to connect via TV, I will write to you sooner ).

1 Like

Fantastic! I'll be doing this in a day or so.

1 Like

No rush, but thanks!

I'm using MATLAB on Ubuntu, seems to be working just fine. I have to launch it in the terminal, but I saw a way to create a shortcut on their website.... To lazy/need to get used to terminal (even if you just have to type MATLAB to get it to run lol)

I had to use terminals to start the install and then it went to a GUI installer. Idk if that's what you are talking about?

I'm a noob at this, only really been using Linux again for the last week. Been years, think I had Ubuntu like 9-10 years ago on the side just Cuz it sounded cool lol

Edit: Annnnd I saw you figured it out how to install lol that's what I get for not reading all the posts lol

1 Like