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

Associate QGIS MIME types with the QGIS application entry #59

Merged
merged 7 commits into from May 17, 2023

Conversation

MattF-NSIDC
Copy link

@MattF-NSIDC MattF-NSIDC commented May 10, 2023

Resolves #55

@github-actions
Copy link

Binder 👈 Test this PR on Binder

@MattF-NSIDC
Copy link
Author

The changes so far aren't working. I think this is successfully adding the QGIS mimetypes and file extension associations to the database, but the application isn't properly associated with them yet. I think I need to run update-desktop-database to pick up the ~/Desktop/*.desktop file(s)...

@MattF-NSIDC
Copy link
Author

MattF-NSIDC commented May 10, 2023

Got it working. Placing the .desktop file in ~/Desktop successfully creates an icon that can be double-clicked to open that application, but doesn't add an entry to the applications menu or set up MIME type associations with that application. For that, we also need: A MimeType attribute in the .desktop file, an XML MIME type definition file, and to register those with the desktop and mime databases.

I think repo2docker could potentially be enhanced to handle these in a standard way. Perhaps:

  • a standard directory for .xml MIME type definitions which will get copied into the image at ~/.local/share/mime/packages/. and registered into the database
  • another standard directory for .desktop application definitions which will get copied into the image at ~/.local/share/applications/. and registered into the database
  • a standard file containing the names (in-image paths?) of .desktop entries that should be symlinked to the desktop.

@MattF-NSIDC MattF-NSIDC marked this pull request as ready for review May 10, 2023 23:14
@MattF-NSIDC MattF-NSIDC requested a review from weiji14 May 10, 2023 23:14
qgis.desktop Outdated Show resolved Hide resolved
postBuild Outdated Show resolved Hide resolved
postBuild Outdated Show resolved Hide resolved
start Show resolved Hide resolved
start Show resolved Hide resolved
@yuvipanda
Copy link
Contributor

Thanks a lot, @MattF-NSIDC! This lgtm :)

@yuvipanda yuvipanda merged commit 3b59501 into CryoInTheCloud:main May 17, 2023
1 check passed
@MattF-NSIDC MattF-NSIDC deleted the qgis-file-associations branch May 17, 2023 15:27
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

Successfully merging this pull request may close these issues.

.qgs and .qgz QGIS project files not associated with QGIS application
4 participants