Skip to content

Instantly share code, notes, and snippets.

@cbdavis
Last active March 28, 2019 21:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbdavis/591daf9eafb2e18d1aff to your computer and use it in GitHub Desktop.
Save cbdavis/591daf9eafb2e18d1aff to your computer and use it in GitHub Desktop.
Configure Linux to directly open a .nlogo file with NetLogo
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