Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change WM_CLASS from org.jabref.gui.JabRefMain to jabref #7848

Open
JoKalliauer opened this issue Jun 24, 2021 · 5 comments · Fixed by #7858
Open

change WM_CLASS from org.jabref.gui.JabRefMain to jabref #7848

JoKalliauer opened this issue Jun 24, 2021 · 5 comments · Fixed by #7858
Labels
status: depends-on-external A bug or issue that depends on an update of an external library

Comments

@JoKalliauer
Copy link
Contributor

Is your suggestion for improvement related to a problem?
If you filename your *.desktop-file (on linux) different than the WM_CLASS then you have two problems

  • first you can't add them to favourites via right-click
  • secondly jabref is twice in the menu, one pinned one, and one for the opened instances

Screenshot from 2021-06-24 18-19-10

Describe the solution you'd like
change the WM_CLASS of the linux-application to jabref

the current WM_CLASS is org.jabref.gui.JabRefMain and can be checked with xprop

so you have to name the *.desktop-file as org.jabref.gui.JabRefMain.desktop which is very unconvetional/inconvenient (and maybe problematic because it contains dots . the typos in the filename could be easily be overseen) .

Additional context
Illustration of the problem: https://askubuntu.com/a/1155956/676490
Infos about WM_CLASS: https://unix.stackexchange.com/a/225409/241592

@Siedlerchr
Copy link
Member

Thanks for the info. I checked JabRef's code and the only case where it's used is in the desktop-template file:
https://github.com/JabRef/jabref/blob/main/buildres/linux/JabRef.desktop
So I guess it should be sufficient to change it in this file as it gets copied over/is the basis.

If you want to test it locally, you could do a ./gradlew jpackage to generate the installer/executable for your system.

Siedlerchr added a commit that referenced this issue Jun 28, 2021
@Siedlerchr
Copy link
Member

@JoKalliauer Can you please test this version? https://builds.jabref.org/pull/7858/merge/

@JoKalliauer
Copy link
Contributor Author

I tried:

JabRef 5.3-PullRequest7858.422--2021-06-28--966aa36
Linux 5.12.12-300.fc34.x86_64 amd64 
Java 16.0.1 
JavaFX 16+8

and the problem persist

WM_CLASS(STRING) = "org.jabref.gui.JabRefMain", "org.jabref.gui.JabRefMain"
WM_ICON_NAME(STRING) = "JabRef"
_NET_WM_ICON_NAME(UTF8_STRING) = "JabRef"
WM_NAME(STRING) = "JabRef"
_NET_WM_NAME(UTF8_STRING) = "JabRef"

Screenshot from 2021-06-28 22-58-07

@Siedlerchr
Copy link
Member

I looked a bit more into it, but except from changing the Startup_WM_CLASS it's not possible.
The class is automatically assigned by javafx.
cryptomator/cryptomator#956 (comment)

Siedlerchr added a commit that referenced this issue Jul 1, 2021
@koppor koppor reopened this Jul 5, 2021
@koppor koppor added the status: depends-on-external A bug or issue that depends on an update of an external library label Jul 5, 2021
@koppor
Copy link
Member

koppor commented Jul 5, 2021

@Siedlerchr That means, we are waiting for someone filing a JavaFX issue and working on fixing that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: depends-on-external A bug or issue that depends on an update of an external library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants