Allow execution of a program [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
peter_62au
Level 1
Level 1
Posts: 21
Joined: Wed Apr 29, 2015 4:43 am

Allow execution of a program [SOLVED]

Post by peter_62au »

I am brand new to Linux and so far am loving it. I hope this question isn't to stupid. I am trying to port a Java program from windows. I have discovered I must allow execution of the program and have found the check box in the properties dialog box. However I am unable to check the box, I assume this is because I need admistrative permission (which I have) but there is no prompt for the password when I open the properties box . How do I do this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Allow execution of a program

Post by altair4 »

I will answer that question two different ways:

[1] If you want to make something executable through the file manager as root then you need to open the file manager as root:

Code: Select all

gksu nemo
I am assumming you are using Mint Cinnamon since you didn't specify and nemo is the name of it's file manager. Replace that with caja ( MATE ) or thunar ( XFCE ) if apprpriate.

[2] A jar file does not need to be executable.

Linux is a little confused by this whole thing. A jar file is a Java ARchive and as such is not an executable entity.

The best thing to do is to create your own file association for a jar file so that it will run without being executable:

Right click any jar file.
Select "Open With" > Other Application
At the bottom where it says "Enter a custom command" enter:

Code: Select all

java -jar
Then select "Set as Default"
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
peter_62au
Level 1
Level 1
Posts: 21
Joined: Wed Apr 29, 2015 4:43 am

Re: Allow execution of a program

Post by peter_62au »

Thank you so much. I tried both ways and they both worked. Just need to change a couple of things in my program now, mainly paths I think. This will get me a lot closer to ditching windows completely. Thank you again.
Locked

Return to “Beginner Questions”