1

I'm currently trying to run a game on xubuntu that is downloaded as a .jar and to make it work I need to check of a box that says "allow executing file as program" I know where the box should be for everyone else but it isn't there for me. I use xubuntu 12.04 and the check box should be under properties> permissions.

  • 1
    You can do it from a command line with chmod a+x file replacing file with with the file name. Otherwise have you tried right clicking the file and selecting properties. I don't use Xubuntu so I have a different file manager but right click works in Ubuntu and Lubuntu. You may need to prefix the command with sudo if you don't have write permissions for the file – Warren Hill Jul 19 '13 at 7:36
  • Also it is possible that file was downloaded by another user. In this case, the chown command can help. – Danatela Jul 19 '13 at 7:40
1

The option, to make a file executable is only shown for programs that the file manager considers to be of an executable file type. Jar-files are not in that list, although on Ubuntu setting them executable allows you to run them (maybe this should be reported as a bug?). Depending on the settings used when compiling the kernel (or generally on other operating systems), setting jar files executable might not work, and I guess this is the reason why file managers don't consider them runnable.

So, your options are:

  • Use the command line tool chmod to add the execute permission. (chmod +x <filename>)
  • Don't care about execute permissions and just always run java -jar <filename>.
    • You can create a launcher icon that runs this command.
    • You can create a write a wrapper shell script that can then be set executable. Most java programs available in the Ubuntu repositories install such a wrapper to /usr/bin, while the jar files reside in /usr/share/java
  • Thank you so much for your help everything I needed worked perfectly. – Paindeer Jul 19 '13 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.