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

[bug] auto generate desktop entry when start program #316

Open
Kiri2002 opened this issue Jul 17, 2024 · 1 comment
Open

[bug] auto generate desktop entry when start program #316

Kiri2002 opened this issue Jul 17, 2024 · 1 comment

Comments

@Kiri2002
Copy link

Kiri2002 commented Jul 17, 2024

In Archlinux, when launch imagej2, it will auto generate :

/home/kiri/.local/share/applications/ImageJ2.desktop

Contains:

[Desktop Entry]
Version=1.0
Name=ImageJ
GenericName=ImageJ
X-GNOME-FullName=ImageJ
Comment=Scientific Image Analysis
Type=Application
Categories=Education;Science;ImageProcessing;
Exec=/usr/share/imagej2/ImageJ-linux64 %F
TryExec=/usr/share/imagej2/ImageJ-linux64
Terminal=false
StartupNotify=true
MimeType=image/*;
Icon=/usr/share/imagej2/images/icon.png
StartupWMClass=net-imagej-launcher-ClassLauncher

If installed fiji, when start fiji, it will generate same name file, and contains:

[Desktop Entry]
Version=1.0
Name=ImageJ
GenericName=ImageJ
X-GNOME-FullName=ImageJ
Comment=Scientific Image Analysis
Type=Application
Categories=Education;Science;ImageProcessing;
Exec=/opt/fiji/ImageJ-linux64 %F
TryExec=/opt/fiji/ImageJ-linux64
Terminal=false
StartupNotify=true
MimeType=image/*;
Icon=/opt/fiji/images/icon.png
StartupWMClass=net-imagej-launcher-ClassLauncher

It may cause icon issues.
Any way to ban this aoto-generate behavior when building?

@github-project-automation github-project-automation bot moved this to Backlog in Fiji Fit Nov 25, 2024
@ctrueden ctrueden moved this from Backlog to Ready in Fiji Fit Nov 25, 2024
@ctrueden
Copy link
Member

This desktop file autogeneration logic needs to be updated as part of the update to Java 21 + Jaunch. Intended behavior:

  • never generate an ImageJ2.desktop anywhere
  • generate only a Fiji.desktop in ~/.local/share/applications and maybe also in Fiji.app
  • ensure the Fiji.desktop references the correct fiji-linux-<arch> executable
  • ensure the Fiji.desktop includes the new fiji MIME type (Add support for fiji:// links fiji/fiji#343)
  • ensure the Fiji.desktop references the Fiji icon, not the ImageJ2 icon
  • update StartWMClass to org-scijava-launcher-ClassLauncher
  • update the various name keys to use Fiji, not ImageJ nor ImageJ2
  • include a comment linking to the source code that generates the file
  • consider how to make the autogeneration optional, because the user might not want it—e.g. they may have multiple Fiji installations, which could fight over owning the icon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants