feat: fix the davinco .desktop launcher

This commit is contained in:
Simon Lambin
2026-09-09 23:07:45 +02:00
parent 0cf503d01e
commit 829f0a503c
2 changed files with 90 additions and 20 deletions

View File

@@ -110,23 +110,36 @@ reports something like "Unsupported GPU processing mode" on launch.
## App menu entry (icon, no terminal)
Resolve ships its own `.desktop` files and icons under
`/opt/resolve/share` and `/opt/resolve/graphics` — no need to write one by
hand:
Same approach as Houdini's: write a minimal `.desktop` by hand and export
it, rather than adapting Resolve's own shipped `.desktop` files. Resolve's
shipped `DaVinciResolve.desktop` uses the `%u` field code for file-manager
"open with" support, and Resolve crashes (`AppConfig::LoadAllSiteInfo`
assertion) if it's ever launched with a stray/unexpanded argument — not
every app launcher strips unused field codes before running `Exec=`. A
hand-written `.desktop` with no field codes at all sidesteps this
entirely. See CLAUDE.md for how this was found.
```bash
distrobox enter davinci
mkdir -p ~/.local/share/applications
cp /opt/resolve/share/*.desktop ~/.local/share/applications
rm ~/.local/share/applications/DaVinciResolveInstaller.desktop
sed -i 's/RESOLVE_INSTALL_LOCATION/\/opt\/resolve/' \
~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop
sed -i "s,Exec=,Exec=distrobox enter -n davinci -- /usr/local/bin/davinci-run ," \
~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop
distrobox-export --app "$HOME/.local/share/applications/DaVinciResolve.desktop"
cat > /tmp/davinci.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=DaVinci Resolve
Comment=Editing, visual effects, color correction and audio post production
Exec=davinci-run
Icon=/opt/resolve/graphics/DV_Resolve.png
Terminal=false
Categories=AudioVideo;AudioVideoEditing;
StartupWMClass=resolve
EOF
distrobox-export --app /tmp/davinci.desktop
```
(Adapted from davincibox's `add-davinci-launcher` script — see CLAUDE.md.)
This copies the icon to `~/.local/share/icons/` on the host and writes
`~/.local/share/applications/davinci-davinci.desktop`. Distrobox also
auto-creates a generic `davinci.desktop` ("Terminal entering davinci") when
the box is created — set `NoDisplay=true` in that file, or delete it, if you
don't want both entries in the app menu.
## Known gotchas (from upstream, not yet hit here ourselves)