Snapd not returning desktop file for Skype

Snapd doesn’t seem to recognise the .desktop file for the skype snap. This is causing GNOME Software to attempt to launch it in a terminal (by running gnome-terminal -x /snap/bin/skype), and that for some reason doesn’t work.

Two questions:

  • Why is snapd not recognising this .desktop file?
  • Why is the snap binary not working from a terminal?

What snapd is returning (should have "desktop-file": "/var/lib/snapd/desktop/applications/skype_skypeforlinux.desktop" in the apps entry):

$ curl --unix-socket /run/snapd.socket http://localhost/v2/snaps/skype | jq .
{
  "type": "sync",
  "status-code": 200,
  "status": "OK",
  "result": {
    "id": "QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV",
    "title": "Skype",
    "summary": "One Skype for all your devices. New features. New look. All Skype.",
    "description": "Skype keeps the world talking. Say “hello” with an instant message, voice or video call – all for free, no matter what device they use Skype on. Skype is available on phones, tablets, PCs, Macs and Linux.\n\n• Video calls – Don’t just hear the cheers, see it! Get together with 1 or 24 of your friends and family on a video call. Watch your everyone’s smiles and cries when you tell them “We’re engaged!!!\" \n\n• Chat – Reach people instantly. Send messages to your friends, liven up conversations with emoticons and Mojis, or create a group chat to make weekend plans with up to 300 people.\n\n• Share – Do more together. Easily share your screen, photos, videos, documents, and files with your family and friends. Unlike email, Skype will transfer up to 300MB per file.\n\nVoice calls – Camera shy? Make voice calls to anyone on Skype. You can also call mobile and landlines at low rates.",
    "installed-size": 109228032,
    "name": "skype",
    "developer": "skype",
    "status": "active",
    "type": "app",
    "version": "8.16.0.4",
    "channel": "stable",
    "tracking-channel": "stable",
    "ignore-validation": false,
    "revision": "16",
    "confinement": "classic",
    "private": false,
    "devmode": false,
    "jailmode": false,
    "apps": [
      {
        "snap": "skype",
        "name": "skype"
      }
    ],
    "contact": "https://www.skype.com/",
    "install-date": "2018-02-21T20:15:21+13:00"
  }
}
3 Likes

It looks like the skype snap needs a small tweak. The name of the desktop file should be meta/gui/skype.desktop (corresponding to the app name skype that is used). I think we should have snapcraft and/or snap warn about this, i.e. if there is a mismatch.

3 Likes

Note that telegram-desktop also has this issue - the file is telegramdesktop.desktop (missing the ‘-’)

I exposed this issue already long time ago, as the app package should be called with a different id than the desktop-id.

See https://github.com/3v1n0/telegram-snap/issues/5#issuecomment-379101700

However at this point while changing the desktop-id would be wrong (as other things like appstream and launcher integration depend on it), I think renaming the snap or adding an alias for telegramdesktop could be an option.