snapd strips Exec= lines from .desktop files which should be legitimate

Bug #1623580 reported by Björn Michaelsen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

According to: https://developer.ubuntu.com/en/snappy/guides/meta/
Desktop files with lines like:

 Exec=${SNAP}.${APP} %U

should be valid. However, libreoffice defines a "libreoffice" app in snapcraft.yaml (https://git.launchpad.net/~bjoern-michaelsen/df-libreoffice/+git/libreoffice-snap-playground/tree/snapcraft.yaml?h=xenial#n73), but the exec lines like (https://git.launchpad.net/~bjoern-michaelsen/df-libreoffice/+git/libreoffice-snap-playground/tree/setup/gui/libreoffice-writer.desktop?h=xenial#n24)

 Exec=libreoffice.libreoffice --writer %U

still get filtered out, thus rendering these .desktop files useless.

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Does 'Exec=libreoffice %U' work? If your command name matches the snap name then you don't need to do 'snap_name.cmd_name' and can just do 'snap_name'. I've seen this work in other desktop files.

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

Indeed, unlike documented:

 libreoffice ... %U

instead of:

 libreoffice.libreoffice %U

seems to work. https://git.launchpad.net/~bjoern-michaelsen/df-libreoffice/+git/libreoffice-snap-playground/commit/?id=826a9ab26d72518934c5f3df7df8048aa64fc682

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I suspect your setup/gui/libreoffice-startcenter.desktop and setup/gui/libreoffice-writer.desktop are going to suffer from https://bugs.launchpad.net/snappy/+bug/1616657 though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.