• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Where is the file type/context menu info stored in Linux?

Red Squirrel

No Lifer
I tried googling this but maybe I don't have the right terminology. You know when you right click and have "open with" options for different file types, where is this info stored in Linux? Currently to play Minecraft I have to right click and open with Open JDK. I want to figure out what exactly happens when I do that, so I can script it. I'm guessing it's calling a binary somewhere and passing the jar file as an argument, but I don't know what binary or what syntax. Currently using Kubuntu as my distro.
 
java -jar name_of_jar_file.jar

You call the java executable with your jar file and other options you want to pass to the JVM.

I would probably just create a bash alias, it's not really worth writing a shell script for a single command.

As far as the "Open With" menu... that's going to depend entirely on your Desktop Environment and Window Manager....
 
java -jar name_of_jar_file.jar

You call the java executable with your jar file and other options you want to pass to the JVM.

I would probably just create a bash alias, it's not really worth writing a shell script for a single command.

As far as the "Open With" menu... that's going to depend entirely on your Desktop Environment and Window Manager....
this
 
See if this helps...

http://forum.kde.org/viewtopic.php?t=16137

Why do you want to script it?

When I open the jar file I get archive manager. I can't seem to change that option through the GUI since it only appears in the open with list, not in the extended list with all the categories, where I can check the box to remember the selection.

Java -jar seems to work though. I was trying just java but it was saying the file was not found.
 
Last edited:
When I open the jar file I get archive manager. I can't seem to change that option through the GUI since it only appears in the open with list, not in the extended list with all the categories, where I can check the box to remember the selection.

Java -jar seems to work though. I was trying just java but it was saying the file was not found.
.jar is an archive format. It's intended behaviour that when you double click on a .jar an archive manager opens.
 
Back
Top