shannah / shellmarks

GUI for shell scripts
37 stars 8 forks source link

Unable to edit/update catalog #3

Open karthick-kk opened 1 year ago

karthick-kk commented 1 year ago

I have a problem editing the content inline from shellmarks catalog. When I click the edit button, below error is seen on the terminal

Failed to open script for editing: The EDIT action is not supported on the current platform!
java.lang.UnsupportedOperationException: The EDIT action is not supported on the current platform!
    at java.desktop/java.awt.Desktop.checkActionSupport(Unknown Source)
    at java.desktop/java.awt.Desktop.edit(Unknown Source)
    at ca.weblite.shellmarks.Main$5.lambda$editScript$6(Main.java:1812)
    at java.base/java.lang.Thread.run(Unknown Source)

(java:20395): Gdk-WARNING **: 09:49:14.987: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

This is on Ubuntu 20.04 Gnome 3.36, GTK 3. Tried to fallback to GTK2(shellmarks -Djdk.gtk.version=2), neither didn't help. Tried next on WSL with display export. Got the same message"EDIT action is not supported on the current platform!"

Is there any documentation reference explaining the platform requirements for complete gui functionality of catalo.

My second query is on the customizing the default catalog section. This looks to come from https://github.com/shannah/shellmarks/blob/master/src/main/resources/ca/weblite/shellmarks/welcome.adoc However I do not find an adoc in ~/.shellmarks folder. Is there a way to customize this content?

shannah commented 1 year ago

Yeah. I've run into this before. I use the Java "Desktop" API which seem to be not supported sometimes on Linux. Not sure if this is fixed in the latest Java versions - I'll try publishing a release that uses the Java 18 or 19 and see if that makes a difference. I've worked around this in the past by implementing alternate implementations for Linux... if all else fails, I'll do that again here.