Open a jar application with a single click

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
Jerry3904
Administrator
Posts: 21931
Joined: Wed Jul 19, 2006 6:13 am

Open a jar application with a single click

#1 Post by Jerry3904 »

{I think this should be a MX default]

I am always annoyed that to run a jar application such as the referencer JabRef neither of the obvious steps works:
1. click on, it b/c that opens Archive Manager
2. right-click > Open with another application, b/c Java is not listed there.
That means that the average user will first need to find out what command is needed, then open a terminal and use it with the correct syntax--not what MX Linux is about!

I did a websearch on "linux launch jar application" and found on the first page the following neat solution:
  • Open a root Thunar in /usr/share/applications/
  • Click File > Create Document > Empty file
  • In the name box that pops up, type java.desktop and click Return
  • Click on the newly created file to open it in Leafpad
  • Paste in the following:

    Code: Select all

    [Desktop Entry]
    Name=Java
    Comment=Java
    GenericName=Java
    Keywords=java
    Exec=java -jar %f
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    MimeType=application/x-java-archive
    StartupNotify=true
  • Save the file and exit.
Now when you click a jar application it will open correctly.

EDIT: this needs an icon for the menu
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: Open a jar application with a single click

#2 Post by skidoo »

Is there a consolidated "collected Thunar custom actions" topic in this forum?
If not, seems like a good project and a good pinned thread candidate.

(140+ results) https://www.google.com/#q=thunar+custom ... munity.org
(800+ results) https://www.google.com/#q=thunar+custom ... github.com
(29k+ results) https://www.google.com/#q=thunar+custom ... collection

Back in the day, we had an extensive custom actions topic at the (now disappeared) SalineOS forum.

User avatar
Jerry3904
Administrator
Posts: 21931
Joined: Wed Jul 19, 2006 6:13 am

Re: Open a jar application with a single click

#3 Post by Jerry3904 »

Nope. I thought about making it a custom action, but decided it was better to make it what the user expects.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Stevo
Developer
Posts: 12832
Joined: Fri Dec 15, 2006 8:07 pm

Re: Open a jar application with a single click

#4 Post by Stevo »

Is there some package we can add that to, something like antix-goodies?

User avatar
anticapitalista
Developer
Posts: 4165
Joined: Sat Jul 15, 2006 10:40 am

Re: Open a jar application with a single click

#5 Post by anticapitalista »

Any suggestions for the icon?
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
Jerry3904
Administrator
Posts: 21931
Joined: Wed Jul 19, 2006 6:13 am

Re: Open a jar application with a single click

#6 Post by Jerry3904 »

There's a couple already on board IIRC, will look later
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: Open a jar application with a single click

#7 Post by skidoo »

[redacted]
misunderstood the intended icon usage (for a .desktop launcher) when I posted this
Last edited by skidoo on Thu Sep 29, 2016 4:49 pm, edited 1 time in total.

User avatar
Stevo
Developer
Posts: 12832
Joined: Fri Dec 15, 2006 8:07 pm

Re: Open a jar application with a single click

#8 Post by Stevo »

This one, only edited to say "Java", as in a jar full of Java. (Frappaccino? mmmm)

Image

No problem with copyright, as it's on openclipart.

Edit: like this
java-jar.png
I also attached the zip of the vector svg file. I'm pretty sure that xfce4 can use svg files as icons, though Debian policy seems to require png or xpm bitmaps.

User avatar
Jerry3904
Administrator
Posts: 21931
Joined: Wed Jul 19, 2006 6:13 am

Re: Open a jar application with a single click

#9 Post by Jerry3904 »

I like it! But do we need a (little tiny) trademark symbol for the name on the label?
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: Open a jar application with a single click

#10 Post by skidoo »

a (little tiny) trademark symbol for the name on the label
it's already there.
Maybe it's too small to be seen unless sub-pixel hinting is enabled?









oops, no... that's just a booger on my screen :hitmyhead:

Post Reply

Return to “Tips & Tricks by users”