Now, to make this appear when right-clicking. Any idea how I can achieve that?
No offense, but why Java?
Because that’s what I learned from Uni, didn’t want that skill to go to waste. I was thinking about how it would be easier to make the apps (plain applications that use executables and shell to run) .desktop file without any hassle (for new Linux users).
Also, Python was two semesters ago, so I forgot all about it.
Learn Kotlin, it’s adjacent and better.
deleted by creator
Why do you need cross platform availability, if .desktop files are (mostly) Linux only?
deleted by creator
Alright, but maybe take a look into something like Zenity. The task done by your tool doesn’t really justify installing a huge JRE, when a simple bash script would suffice.
deleted by creator
Because despite the popular bandwagon belief, there’s nothing wrong with using Java. It’s just a tool, like so many others.
This is like saying, “Why that Philips head screwdriver? Why not this other Philips head screwdriver?”
Why language-as-it’s-own-OS for displaying a dialogue?
Because it works, does not have any drawbacks that I could see, and is universal, but not from Microsoft, and does not require you to install pip or npm to run.
Don’t most desktop environments already have this?
If you want to include this as an option when right clicking the desktop, you will probably need to patch this into the DE of your choice, however I think at least KDE has an option for custom right click actions.
Yep, all desktop environments have this - whatever text editor is handy. :-)
I see, I didn’t know KDE had that, does KDE allow java apps to be used as the right click action? As for GNOME, I’m still trying to figure it out.
Until then, I will post the link to the app in the future. It needs some beautification, and quality of life changes so you and the others can use it as you use sudo apt update and upgrade to update your PCs.
Yes, it works with any command.
A window manager is enough with any customizable drop menu, can open a file manager of choice, create a folder or file, no desktop is needed.
worker ~/.Desktop
or whatever filemanager one is using
Btw:
# convince Java-Apps to use desktop theme and nice font rendering export _JAVA_OPTIONS="$_JAVA_OPTIONS \ -Dawt.useSystemAAFontSettings=on \ -Dswing.aatext=true \ -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \ -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
They use JavaFX, not swing, and AFAIK JavaFX doesn’t even have a bundled Windows look. Never knew Swing had a GTK look though, that’s nice.
deleted by creator
Does it allow java applications to be used as an ‘action’?
deleted by creator
Great! This is going to be my first time doing this, hopefully this comes to everybody’s machine as default.
I’d recommend converting to Kotlin, which saves a lot on bureaucracy and IntelliJ can easily do
https://askubuntu.com/questions/431703/how-to-add-open-with-custom-command-option-in-right-click-menu-of-nautilus might have what you want
Also, how’d you get the IntelliJ titlebar to work properly? In the new theme, I get two title bars on my machine.
I’d recommend converting to Kotlin, which saves a lot on bureaucracy and IntelliJ can easily do
I’d love to, but my mind, time, and energy is being spent on other studies.
https://askubuntu.com/questions/431703/how-to-add-open-with-custom-command-option-in-right-click-menu-of-nautilus might have what you want
Didn’t work, no new option appears after following the steps.
Also, how’d you get the IntelliJ titlebar to work properly? In the new theme, I get two title bars on my machine.
Easy, I made a .desktop file for IntelliJ and boom, no double title bars.
Hmm, why the bold?
Maybe try https://stackoverflow.com/questions/47235022/add-a-custom-option-in-nautilus-right-click-menu ?
What did you put in the .desktop file?
Hmm, why the bold?
to distinguish the quote from my reply
Maybe try https://stackoverflow.com/questions/47235022/add-a-custom-option-in-nautilus-right-click-menu ?
Will do, i’ll reply if it’ll work or not.
What did you put in the .desktop file?
I put the following:-
[Desktop Entry] Name=IntelliJ Idea Comment=IDE Exec=/home/user/Programs/IntelliJ\ Idea/bin/idea.sh Icon=/home/user/Programs/IntelliJ Idea/bin/idea.svg Type=Application Categories=Development;
basically
[Desktop Entry] Name= Comment= Exec= Icon= Type=Application Categories=Development;
For ‘Exec’ and ‘Icon’, type the absolute path for both em like the example. As for categories, here they are below:
- Audio
- Video
- Development
- Education
- Game
- Graphics
- Network
- Office
- Science
- Settings
- System
- Utility
- Other
I already have a normal desktop file like yours. I don’t see how replacing it with yours would provide any benefit as the execution arguments are all the same. I guess you won’t be able to help me then.
That’s quite useful i guess
How do I integrate gtk and qt, so both GNOME and KDE users can use this?
If you’re using swing, you can’t, unless you’re willing to use something called SwingWT from twelve years ago.
Im using JavaFX, i forgot to type that in the title.
If it still doesn’t work, i may have to just CSS or show the devs my work and they’ll implement my work in their own way.
Well, JavaFX has even worse support. There aren’t even bundled themes to mimic Windows and macOS style, and you’ll indeed have to port the CSS.
the devs
who?
the Java devs, OP’s thinking they can make a JEP and pull request when they have time