Instead of creating a nautilus script or similar, I recommend creating a new mime type. I base my instructions off this:
https://stackoverflow.com/questions/14943742/how-to-add-new-mime-type-and-associate-with-new-application, which has a link to a video. Below are all the steps, so you don't have to view that link. I only include the link for reference.
1) In /usr/share/mime/packages, add a new file called VASSAL.xml. You will need to use sudo (or log in as root) to do this. The contents are:
VASSAL.xml said:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="
http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vasl.game">
<comment>vasl saved game</comment>
<glob pattern="*.vsav"/>
</mime-type>
</mime-info>
I am assuming you are using .vsav for your saved vasl games. Change this if you use some other extension.
2) Using sudo or as root, run "update-mime-database /usr/share/mime". This took a few minutes to run on my machine.
3) I created a new directory that isn't with one of the VASSAL versions I have. The directory is called "vasl.script". I moved my vasl.sh (but not VASSAL.sh) to this new directory. If you put vasl in a menu, you need to change your menu to point to this new script. If you create a new directory and previously set your PATH, you will need to change your path to the location with the new script.
Create or change your vasl.sh script in vasl.script:
vasl.sh said:
#!/bin/sh
#
# Execute this file to launch VASSAL on MacOS or Linux
#
# Find where VASSAL is installed, dereferencing symlinks
INSTALL_DIR=$(dirname "$(readlink "$0" || echo "$0")")
cd "$INSTALL_DIR"
../VASSAL-3.2.17/VASSAL.sh ../vasl/vasl-6.4.2.vmod "$@"
I have fixed the path to VASSAL.sh in vasl.sh so it now points to the particular version of VASSAL I want to use ("../VASSAL-3.2.17/VASSAL.sh"). In addition to that change, the new bit is the "$@" in the call to VASSAL.sh. That will pass any filename given by nautilus (or in my case, thunar) in addition to the .vmod at startup.
4) Open a new nautilus/thunar window. Right click on a .vsav file (it should already say "application/vasl.game" in the type column), open with (or similar), custom, browse to your vasl.sh script. Your saved game should now open with vasl.
That's it. At this point running vasl in your menu should open vasl starting with the wizard, while clicking on a .vsav file should open that saved vasl file.
If you use VASSAL for multiple types of games, each with a different extension, you could add more mime-type entries in the VASSAL.xml file:
VASSAL.xml said:
<mime-type type="application/VASSAL.foo.game">
<comment>foo saved game</comment>
<glob pattern="*.vfoo"/>
</mime-type>
[Note that the format for the type is slightly different here than in the version I gave for vasl. In fact the string is arbitrary. It just needs to be different from other mime-types (although perhaps a space is not allowed, but I don't know for certain).]
You would also need to create a new script, perhaps "run_foo.sh", which would point at the right .vmod for your other game.
5) When you get a new version of VASSAL or vasl, you will have to update the vasl.sh script to point to the new VASSAL directory (if you have separate directories for each VASSAL version like I do) and/or the .vmod file.
JR