Valid desktop file without Exec key are rejected
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
Desktop files can have a missing Exec key and still be valid:
- applications can be dbus activated
- applications can be started by a systemd user unit.
Under those conditions, we still want them to have a desktop file for the Shell to match a desktop entry with the application GUI.
The typical use case is our prompting-client service, spawing a GUI when a snapd prompt is requested. This GUI has an associated icon and entry shown, but shouldn’t be started directly (it has NoDisplay=true). The Shell accepts it without Exec line. `desktop-file-validate` also raises no errors, but snapcraft rejects it due to this line: https://github.com/canonical/snapcraft/blob/2f1cc3677b329921f8a16a66615cf7b7de495515/snapcraft_legacy/internal/meta/desktop.py#L56
I think snapcraft should validate the desktop file using desktop-file-validate directly to not encode this kind of knowledge.
### To Reproduce
* Ship a desktop file in `meta/gui` that don’t have a `Exec` entry.
* Build the snap with `snapcraft`
### Environment
* Snapcraft using LXD
* Ubuntu questing (development version)
### snapcraft.yaml
```yaml
Irrelevant for this bug report.
```
### Relevant log output
```shell
$ snapcraft
Running snapcraft without a command will not be possible in future releases. Use 'snapcraft pack' instead.
Pulling prompting-clienterror: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
Failed to generate desktop file 'usr/share/applications/prompting-client-daemon.desktop': missing 'Exec' key
Failed to execute pack in instance.
Recommended resolution: Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
$ desktop-file-validate snap/gui/prompting-client.desktop
-> no warning, no error
```
### Additional context
_No response_
Evaluation history
No evaluation history available.