Last active
March 28, 2019 21:46
-
-
Save cbdavis/591daf9eafb2e18d1aff to your computer and use it in GitHub Desktop.
Configure Linux to directly open a .nlogo file with NetLogo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a symbolic link to netlogo in /usr/bin: | |
cd /usr/bin | |
sudo ln -s ~/Downloads/netlogo-5.0.5/netlogo.sh netlogo | |
sudo updatedb | |
In the netlogo.sh file, override the default 'cd' command to point to the directory where the jar file (and the shell script) is: | |
cd ~/Downloads/netlogo-5.0.5 | |
nano netlogo.sh | |
comment out the other cd command and add this: | |
cd ~/Downloads/netlogo-5.0.5 | |
Now we need to get netlogo to show up as an option when we right click on a *.nlogo file and select "Open with Other Application": | |
cd ~/.local/share/applications | |
nano netlogo.desktop | |
add something like this to the netlogo.desktop file: | |
[Desktop Entry] | |
Name=NetLogo | |
Comment=I like turtles | |
Exec=netlogo %f | |
Terminal=false | |
Type=Application | |
Icon= | |
Categories=Awesome; | |
StartupNotify=true | |
MimeType=text/x-text; | |
Then find a nlogo file, right click, select "Open with Other Application", and netlogo should appear in the list. Double clicking the file should directly open it in NetLogo. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment