Gnome3 on Ubuntu 17.04 doesn't find snap desktop files

Bug #1681547 reported by Jamie Strandboge
56
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Undecided
Unassigned

Bug Description

I started playing with gnome3/wayland and noticed that gnome3 can't find the snap from the dash (or the icons when run from Alt+F2). I think it isn't picking up /var/lib/snapd/desktop/applications/. While patching gnome3 to look there is certainly doable, I wonder if perhaps we should rethink that location since all DEs will (presumably) have to be patched otherwise....

Tags: wayland
description: updated
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Talk about timing, I was just looking into this to, I already logged out but it seems when wayland is used, XDG_DATA_DIRS is not correctly set as apparently it is set in an X related env /etc/X11/Xsession.d/65snappy

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Yes, looks like it. I wonder how we can do that in a better way?

Changed in snappy:
status: New → Triaged
Revision history for this message
Oliver Grawert (ogra) wrote :

well, the variable is properly set in a 17.04 ubuntu-gnome install here. i can find the snapcraft-forum and telegram-sergiuens snaps in the dash search, but while telegram also shows the icon in the sidebar when running and allows me to pin it, snapcraft-forum does not.

ogra@gnome-vm:~$ env|grep DATA
XDG_DATA_DIRS=/usr/share/gnome:/home/ogra/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

what's the status of this bug? GNOME wayland is likely to be the default session this cycle in Ubuntu and currently that bug makes snaps not available to users from the desktop shell

tags: added: wayland
Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

Current status:

PR with fix is merged, but it still isn't included in the latest bugfix release. Anyone got any idea when this will be released?

For the impatient; workaround is to edit `/etc/profile.d/apps-bin-path.sh` and change the contents to this: https://github.com/sergiusens/snappy/blob/4217778762768fa2fb773bd82fc3239eb06a79ab/data/env/snapd.sh.in

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in snappy:
status: Triaged → Fix Released
Revision history for this message
Owais Lone (loneowais) wrote :

I am still facing this issue on latest 18.04 and always faced this on 17.10. Has the fix been released or am I witnessing a completely different issue?

Revision history for this message
Luis Alberto Pabón (copong) wrote :

I'm encountering the same issue with a fully up to date 17.10. Copying the .desktop files from their default location to my local profile works around this, but obviously these files need to be deleted manually upon snap uninstall.

Revision history for this message
Swoorup Joshi (swoorup) wrote :

This issue still exist on 18.04 when using wayland. `snap` applications are not listed under applications and cannot issue snap app commands on the terminal. I am using zsh. However this works fine under X11.

I have posted the findings below:

```bash
➜ ~ snap --version
snap 2.32.5+18.04
snapd 2.32.5+18.04
series 16
ubuntu 18.04
kernel 4.15.0-15-generic
➜ ~ uname -a
Linux swoorup-W35xSS-370SS 4.15.0-15-generic #16-Ubuntu SMP Wed Apr 4 13:58:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
➜ ~ lsb_release -r
Release: 18.04
➜ ~ env | grep DATA
XDG_DATA_DIRS=/home/swoorup/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
➜ ~ firefox
zsh: command not found: firefox
➜ ~ snap list
Name Version Rev Tracking Developer Notes
atom 1.26.0 148 stable snapcrafters classic
core 16-2.32.3 4407 stable canonical core
discord 0.0.4 52 stable snapcrafters -
firefox 59.0.2-1 71 stable mozilla -
intellij-idea-community 2018.1.1 43 stable jetbrains classic
mailspring 1.2.1 209 stable foundry376 -
pycharm-community 2018.1.1 58 stable jetbrains classic
spotify 1.0.77.338.g758ebd78-41 13 stable spotify -
telegram-desktop 1.2.17 142 stable 3v1n0 -
tusk 0.10.1 15 stable klauscfhq -
vlc 3.0.1-4-g14a4897 190 stable videolan -
vscode 1.20.1-1518535978 27 stable flexiondotorg classic
webstorm 2018.1.1 22 stable jetbrains classic
```

Let me know if you need additional information.

Changed in snappy:
assignee: nobody → Swoorup Joshi (swoorup)
assignee: Swoorup Joshi (swoorup) → nobody
Revision history for this message
Swoorup Joshi (swoorup) wrote :

Can this be reopened?

Revision history for this message
Michael Stucki (mstucki) wrote :

Looks like this problem still exists with Ubuntu 18.04. For more details and a workaround, see https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1640514 comments #18 and #19.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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