I run Linux Mint (21.3). In early July, I got the error:
For security reasons, running the file '/home/../.kolmafia/KoLmafia-xxxxx.jar' has been blocked.
This was the result of double clicking the .jar file, located in a folder in my home directory.
I could get around this by manually running the file in the command line, but would have to do that every time, and I just wanted to double click. Note that this is not the "executable bit" problem.
The problem was the addition of cautious-launcher, which automatically installed itself to prevent running .jar files.
My solution was to edit OpenJDK Java 21 Runtime in my usr/share/applications directory. This file is what appears to run the code to execute .jar files when clicked. Specifically, I used a text editor to change:
Exec=cautious-launcher %f /usr/bin/java -jar
to just become
Exec=/usr/bin/java -jar
I don't plan on running other java applications though, and don't really know what I'm doing, so maybe this isn't good advice. I'm mostly just posting this here in case anyone else has the same issue, since when it first arose I could not find anything on the internet about it. I have since had to re-implement the fix a few months later.
For security reasons, running the file '/home/../.kolmafia/KoLmafia-xxxxx.jar' has been blocked.
This was the result of double clicking the .jar file, located in a folder in my home directory.
I could get around this by manually running the file in the command line, but would have to do that every time, and I just wanted to double click. Note that this is not the "executable bit" problem.
The problem was the addition of cautious-launcher, which automatically installed itself to prevent running .jar files.
My solution was to edit OpenJDK Java 21 Runtime in my usr/share/applications directory. This file is what appears to run the code to execute .jar files when clicked. Specifically, I used a text editor to change:
Exec=cautious-launcher %f /usr/bin/java -jar
to just become
Exec=/usr/bin/java -jar
I don't plan on running other java applications though, and don't really know what I'm doing, so maybe this isn't good advice. I'm mostly just posting this here in case anyone else has the same issue, since when it first arose I could not find anything on the internet about it. I have since had to re-implement the fix a few months later.