Skip to content

✨ Desktop: Add Firefox shortcut to Desktop#256

Merged
mbercx merged 1 commit intomainfrom
new/firefox-desktop
Apr 21, 2026
Merged

✨ Desktop: Add Firefox shortcut to Desktop#256
mbercx merged 1 commit intomainfrom
new/firefox-desktop

Conversation

@mbercx
Copy link
Copy Markdown
Collaborator

@mbercx mbercx commented Apr 21, 2026

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.

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.
@mbercx
Copy link
Copy Markdown
Collaborator Author

mbercx commented Apr 21, 2026

@mbercx
Copy link
Copy Markdown
Collaborator Author

mbercx commented Apr 21, 2026

Merging: transient issue with PseudoDojo not fixable here, no need to run CI again just to have it pass.

@mbercx mbercx merged commit 87b7376 into main Apr 21, 2026
3 of 4 checks passed
@mbercx mbercx deleted the new/firefox-desktop branch April 21, 2026 11:32
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.

1 participant