✨ Desktop: Add Firefox shortcut to Desktop#256
Merged
Conversation
Users wanted a clickable browser on the desktop rather than having to open GNOME Activities and type "firefox" to launch one. Copy the Firefox `.desktop` file into `~/Desktop/` with mode `0755`. On Ubuntu 24.04 Firefox ships only as a snap, so the system file lives at `/var/lib/snapd/desktop/applications/firefox_firefox.desktop` rather than the usual `/usr/share/applications/` location, and the destination on the user's desktop keeps that same name. A `.desktop` file with `+x` alone is not enough — GNOME's `ding` desktop-icons extension on 24.04 also requires a `metadata::trusted` GVFS xattr before it will launch the shortcut; without it the user sees an "Invalid Permissions on Desktop File" popup. Setting that xattr via `gio set metadata::trusted true` normally needs a DBus session bus, which does not exist during Ansible provisioning. Wrap the call in `dbus-run-session` so a throw-away bus is spawned just long enough for the write to reach GVFS's on-disk metadata under `~/.local/share/gvfs-metadata/`, which the user's GNOME session then picks up on first login. A symlink from `~/Desktop/` to the system file was the first attempt and is cleaner, but `ding` still refuses to launch symlinked shortcuts without the trust xattr, so the task copies the file instead.
Collaborator
Author
|
Some links:
|
Collaborator
Author
|
Merging: transient issue with PseudoDojo not fixable here, no need to run CI again just to have it pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users wanted a clickable browser on the desktop rather than having to open GNOME Activities and type "firefox" to launch one.
Copy the Firefox
.desktopfile into~/Desktop/with mode0755. On Ubuntu 24.04 Firefox ships only as a snap, so the system file lives at/var/lib/snapd/desktop/applications/firefox_firefox.desktoprather than the usual/usr/share/applications/location, and the destination on the user's desktop keeps that same name.A
.desktopfile with+xalone is not enough — GNOME'sdingdesktop-icons extension on 24.04 also requires ametadata::trustedGVFS xattr before it will launch the shortcut; without it the user sees an "Invalid Permissions on Desktop File" popup. Setting that xattr viagio set metadata::trusted truenormally needs a DBus session bus, which does not exist during Ansible provisioning. Wrap the call indbus-run-sessionso a throw-away bus is spawned just long enough for the write to reach GVFS's on-disk metadata under~/.local/share/gvfs-metadata/, which the user's GNOME session then picks up on first login.A symlink from
~/Desktop/to the system file was the first attempt and is cleaner, butdingstill refuses to launch symlinked shortcuts without the trust xattr, so the task copies the file instead.