Installing NetLogo in Linux
Asked Answered
V

1

6

I have been trying to install NetLogo under my Ubuntu setup. I have downloaded the latest NetLogo 5.3 files and have extracted them.

I placed the files in the /opt/netlogo-5.3.0/ directory. I then proceeded to create a symbolic link to the NetLogo executable from the /usr/bin directory.

sudo ln -s /opt/netlogo-5.3.0/NetLogo netlogo
 @ubuntu:~$ ll /usr/bin/netlogo 
lrwxrwxrwx 1 root root 26 Jan  4 10:36 /usr/bin/netlogo -> /opt/netlogo-5.3.0/NetLogo*

However, when I try to run NetLogo by issuing the netlogo command, it gives me a Permission Denied error. I can however run it as sudo netlogo

Is it possible to get it to run without relying on sudo?

Vaud answered 4/1, 2016 at 10:56 Comment(1)
A way to avoid this problem, if you are the only user that will be using NetLogo, is to run the extract as yourself.Passionless
A
6

It sounds like you need to change the file permissions of the NetLogo file with chmod, or change the file owner with chown.

ls -l /opt/netlogo-5.3.0/NetLogo will probably show the permissions as "rxw------". Try

sudo chmod 755 /opt/netlogo-5.3.0/NetLogo

to fix the problem, changing perms to "rwxr-xr-x".

(755 is an octal (base 8) number. The first digit says what the owner can do. The second says what members of the file's group can do. The third says what everyone can do. 7 is binary number 111: read, write, execute ("rwx"). 5 is binary 101: read, not write, execute. So chmod 755 gives group members and everyone the ability to read and execute the file, but not change it.)

It's possible that you also need to change the permissions on the directories under the NetLogo file. 755 should work for that, too.

Aconite answered 4/1, 2016 at 13:39 Comment(1)
Thank you very much. It has changed from -rwxr--r-- 1 root root 10551 Jan 4 10:16 NetLogo* to -rwxr-xr-x 1 root root 10551 Jan 4 10:16 NetLogo*Vaud

© 2022 - 2024 — McMap. All rights reserved.