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

Add .desktop file for linux and a .png version of the icon. #40

Closed
ApostolosB opened this issue Nov 4, 2018 · 9 comments
Closed

Add .desktop file for linux and a .png version of the icon. #40

ApostolosB opened this issue Nov 4, 2018 · 9 comments
Labels

Comments

@ApostolosB
Copy link

The desktop can be something like:

Type=Application
Version= 0.9.3
Name=fstl
Comment=Fast viewer for .stl files.
Exec=fstl %F
Categories=Graphics;
Icon=fstl.png

The png is something someone must export from the ico file or convert the original file.

@DeveloperPaul123
Copy link
Member

Would you consider filing a PR for this?

@VestigeJ
Copy link

VestigeJ commented Dec 6, 2019

I’d recommend packaging it as a snap package or appimage to hit several linux distros at once.

@ApostolosB
Copy link
Author

Would you consider filing a PR for this?

while what i wrote on the first comment will work as a desktop file i have no idea where those are placed and how they are installed. As for the icon we will probably need the original file.

@mboerwinkle
Copy link
Contributor

I think .desktop files are supposed to be either installed by 'make install' (if building from source) or handled by whoever packages it for release per platform.
Geany places their .desktop file in their root directory and has a directory for icons, but they primarily target Linux.
Based on how platform specific stuff is currently set up in this repo, I would suggest making a new directory named "linux" (or something. As a parallel to "app" and "exe") containing the .desktop file and the .png icon.
We would then need to do something with cmake so that 'make install' handles the .desktop and .png on relevant platforms.
I can probably do more research and tackle this at some point, but please let me know if you have any thoughts.
Martin

@ApostolosB
Copy link
Author

By looking at other linux projects that also support macos they seem to have a directory with sub directories for each OS. those include . desktop and whatever is needed. About the installation stuff i have no idea.

@DeveloperPaul123
Copy link
Member

Thanks for the updates and suggestions @mboerwinkle @ApostolosB, I think I have the information I need to implement this. Doesn't seem like it would be too hard.

@pablorq
Copy link

pablorq commented Apr 12, 2021

Hi!

This is a simple installer for the desktop file on Ubuntu 20.10, but it should work on other Linux systems.

Inside the .zip file there are:

  • The desktop file
  • The icon file
  • The installer

The installer just copy the desktop and icon files to their corresponding directories. Admin credentials (sudo) are required.

Enjoy!

fstl-desktop.zip

@nathaneltitane
Copy link

This sis quite important as there is no way as of now to associate the mimetype automatically on install for light systems using
i3wm or similar.

The desktop file must also specify the mimetype for handling xdg-open queries.
Here is a more complete sample copied from meshlab:

[Desktop Entry]
Version=1.0
Name=fstl
GenericName=STL viewer
Comment=View STL model files
Type=Application
Exec=fstl
Icon=icon.png
Terminal=false
MimeType=model/stl
Categories=Graphics;3DGraphics;Viewer;Qt;

@DeveloperPaul123
Copy link
Member

Closed in #101

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

No branches or pull requests

6 participants