Page MenuHomeLubuntu Development

Ensure applications in Snap packages show up in the lxqt-panel menu
Closed, ResolvedPublic

Description

Current situation:
More and more apps are available only as snaps. For example, chromium is available only as snap from 19.10 onwards. But there are other more or less useful snaps such as anbox.

Unfortunately, the panel in Lubuntu does not list the snaps in the application menu.

The *.desktop files of snaps are located in /var/lib/snapd/desktop/applications. I guess, that the panel is not looking for them, because the path is not specified.

Todo:
Fix it for Lubuntu 20.04.
Evaluate, if this can and should be SRUed to 19.10.

Event Timeline

apt-ghetto triaged this task as Unbreak Now! priority.Dec 24 2019, 7:44 AM
apt-ghetto created this task.
apt-ghetto added a parent task: T100: Lubuntu 20.04.
kc2bez added a subscriber: kc2bez.Jan 3 2020, 8:58 AM

I am confused. Are you indicating that snaps that you install do not show in the menu? The ones I have installed do show up. I can also drag them to the quick launch on the panel.

hmollercl added a subscriber: hmollercl.EditedJan 3 2020, 9:50 AM

I installed Spotify as snap and it appears in the menu. Also Remmina and OpenRa, all in 20.04. But Remmina put yhe .desktop in the normal /usr/share/applications

On Lubuntu 20.04

Installed anbox with snap:

/var/lib/snapd/desktop/applications/anbox_appmgr.desktop
[Desktop Entry]
X-SnapInstanceName=anbox
Name=Anbox Application Manager
GenericName=Anbox Application Manager
Version=1.0
Type=Application
Icon=/snap/anbox/158/meta/gui/icon.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/anbox_appmgr.desktop /snap/bin/anbox.appmgr %U
Terminal=false

Installed chromium with snap:

/var/lib/snapd/desktop/applications/anbox_appmgr.desktop
[Desktop Entry]
X-SnapInstanceName=chromium
Version=1.0
Name=Chromium Web Browser
Name[ast]=Restolador web Chromium
Name[bg]=Уеб четец Chromium
Name[bn]=ক্রোমিয়াম ওয়েব ব্রাউজার
Name[bs]=Chromium web preglednik
Name[ca]=Navegador web Chromium
Name[ca@valencia]=Navegador web Chromium
Name[da]=Chromium netbrowser
Name[de]=Chromium-Webbrowser
Name[en_AU]=Chromium Web Browser
Name[eo]=Kromiumo retfoliumilo
Name[es]=Navegador web Chromium
Name[et]=Chromiumi veebibrauser
Name[eu]=Chromium web-nabigatzailea
Name[fi]=Chromium-selain
Name[fr]=Navigateur Web Chromium
Name[gl]=Navegador web Chromium
Name[he]=דפדפן האינטרנט כרומיום
Name[hr]=Chromium web preglednik
Name[hu]=Chromium webböngésző
Name[hy]=Chromium ոստայն զննարկիչ
Name[ia]=Navigator del web Chromium
Name[id]=Peramban Web Chromium
Name[it]=Browser web Chromium
Name[ja]=Chromium ウェブ・ブラウザ
Name[ka]=ვებ ბრაუზერი Chromium
Name[ko]=Chromium 웹 브라우저
Name[kw]=Peurel wias Chromium
Name[ms]=Pelayar Web Chromium
Name[nb]=Chromium nettleser
Name[nl]=Chromium webbrowser
Name[pt_BR]=Navegador de Internet Chromium
Name[ro]=Navigator Internet Chromium
Name[ru]=Веб-браузер Chromium
Name[sl]=Chromium spletni brskalnik
Name[sv]=Webbläsaren Chromium
Name[ug]=Chromium توركۆرگۈ
Name[vi]=Trình duyệt Web Chromium
Name[zh_CN]=Chromium 网页浏览器
Name[zh_HK]=Chromium 網頁瀏覽器
Name[zh_TW]=Chromium 網頁瀏覽器
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[ast]=Restolador web
GenericName[bg]=Уеб браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[ca@valencia]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_AU]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[eo]=Retfoliumilo
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[eu]=Web-nabigatzailea
GenericName[fi]=WWW-selain
GenericName[fil]=Web Browser
GenericName[fr]=Navigateur Web
GenericName[gl]=Navegador web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[hy]=Ոստայն զննարկիչ
GenericName[ia]=Navigator del Web
GenericName[id]=Peramban Web
GenericName[it]=Browser web
GenericName[ja]=ウェブ・ブラウザ
GenericName[ka]=ვებ ბრაუზერი
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[kw]=Peurel wias
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[ms]=Pelayar Web
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador web
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sr]=Интернет прегледник
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[te]=మహాతల అన్వేషి
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[ug]=توركۆرگۈ
GenericName[uk]=Навігатор Тенет
GenericName[vi]=Bộ duyệt Web
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[ast]=Accesu a Internet
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটে প্রবেশ করুন
Comment[bs]=Pristup internetu
Comment[ca]=Accediu a Internet
Comment[ca@valencia]=Accediu a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_AU]=Access the Internet
Comment[en_GB]=Access the Internet
Comment[eo]=Akiri interreton
Comment[es]=Acceda a Internet
Comment[et]=Pääs Internetti
Comment[eu]=Sartu Internetera
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gl]=Acceda a Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה לאינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristupite Internetu
Comment[hu]=Az internet elérése
Comment[hy]=Մուտք համացանց
Comment[ia]=Accede a le Interrete
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[ka]=ინტერნეტში შესვლა
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=인터넷에 연결합니다
Comment[kw]=Hedhes an Kesrosweyth
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[ms]=Mengakses Internet
Comment[nb]=Bruk internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesați Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Surfa på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[ug]=ئىنتېرنېت زىيارىتى
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium %U
Terminal=false
Type=Application
Icon=/snap/chromium/971/chromium.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
StartupWMClass=chromium
Actions=NewWindow;Incognito;TempProfile;

[Desktop Action NewWindow]
Name=Open a New Window
Name[ast]=Abrir una Ventana Nueva
Name[bg]=Отваряне на Нов прозорец
Name[bn]=একটি নতুন উইন্ডো খুলুন
Name[bs]=Otvori novi prozor
Name[ca]=Obre una finestra nova
Name[ca@valencia]=Obri una finestra nova
Name[da]=Åbn et nyt vindue
Name[de]=Ein neues Fenster öffnen
Name[en_AU]=Open a New Window
Name[eo]=Malfermi novan fenestron
Name[es]=Abrir una ventana nueva
Name[et]=Ava uus aken
Name[eu]=Ireki leiho berria
Name[fi]=Avaa uusi ikkuna
Name[fr]=Ouvrir une nouvelle fenêtre
Name[gl]=Abrir unha nova xanela
Name[he]=פתיחת חלון חדש
Name[hy]=Բացել նոր պատուհան
Name[ia]=Aperi un nove fenestra
Name[it]=Apri una nuova finestra
Name[ja]=新しいウィンドウを開く
Name[ka]=ახალი ფანჯრის გახსნა
Name[kw]=Egery fenester noweth
Name[ms]=Buka Tetingkap Baru
Name[nb]=Åpne et nytt vindu
Name[nl]=Nieuw venster openen
Name[pt_BR]=Abre uma nova janela
Name[ro]=Deschide o fereastră nouă
Name[ru]=Открыть новое окно
Name[sl]=Odpri novo okno
Name[sv]=Öppna ett nytt fönster
Name[ug]=يېڭى كۆزنەك ئاچ
Name[uk]=Відкрити нове вікно
Name[vi]=Mở cửa sổ mới
Name[zh_CN]=打开新窗口
Name[zh_TW]=開啟新視窗
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium

[Desktop Action Incognito]
Name=Open a New Window in incognito mode
Name[ast]=Abrir una ventana nueva en mou incógnitu
Name[bg]=Отваряне на нов прозорец в режим \"инкогнито\"
Name[bn]=একটি নতুন উইন্ডো খুলুন ইনকোগনিটো অবস্থায়
Name[bs]=Otvori novi prozor u privatnom modu
Name[ca]=Obre una finestra nova en mode d'incògnit
Name[ca@valencia]=Obri una finestra nova en mode d'incògnit
Name[de]=Ein neues Fenster im Inkognito-Modus öffnen
Name[en_AU]=Open a New Window in incognito mode
Name[eo]=Malfermi novan fenestron nekoniĝeble
Name[es]=Abrir una ventana nueva en modo incógnito
Name[et]=Ava uus aken tundmatus olekus
Name[eu]=Ireki leiho berria isileko moduan
Name[fi]=Avaa uusi ikkuna incognito-tilassa
Name[fr]=Ouvrir une nouvelle fenêtre en mode navigation privée
Name[gl]=Abrir unha nova xanela en modo de incógnito
Name[he]=פתיחת חלון חדש במצב גלישה בסתר
Name[hy]=Բացել նոր պատուհան ծպտյալ աշխատակերպում
Name[ia]=Aperi un nove fenestra in modo incognite
Name[it]=Apri una nuova finestra in modalità incognito
Name[ja]=新しいシークレット ウィンドウを開く
Name[ka]=ახალი ფანჯრის ინკოგნიტოდ გახსნა
Name[kw]=Egry fenester noweth en modh privedh
Name[ms]=Buka Tetingkap Baru dalam mod menyamar
Name[nl]=Nieuw venster openen in incognito-modus
Name[pt_BR]=Abrir uma nova janela em modo anônimo
Name[ro]=Deschide o fereastră nouă în mod incognito
Name[ru]=Открыть новое окно в режиме инкогнито
Name[sl]=Odpri novo okno v načinu brez beleženja
Name[sv]=Öppna ett nytt inkognitofönster
Name[ug]=يوشۇرۇن ھالەتتە يېڭى كۆزنەك ئاچ
Name[uk]=Відкрити нове вікно у приватному режимі
Name[vi]=Mở cửa sổ mới trong chế độ ẩn danh
Name[zh_CN]=以隐身模式打开新窗口
Name[zh_TW]=以匿名模式開啟新視窗
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium --incognito

[Desktop Action TempProfile]
Name=Open a New Window with a temporary profile
Name[ast]=Abrir una ventana nueva con perfil temporal
Name[bg]=Отваряне на Нов прозорец с временен профил
Name[bn]=সাময়িক প্রোফাইল সহ একটি নতুন উইন্ডো খুলুন
Name[bs]=Otvori novi prozor pomoću privremenog profila
Name[ca]=Obre una finestra nova amb un perfil temporal
Name[ca@valencia]=Obri una finestra nova amb un perfil temporal
Name[de]=Ein neues Fenster mit einem temporären Profil öffnen
Name[en_AU]=Open a New Window with a temporary profile
Name[eo]=Malfermi novan fenestron portempe
Name[es]=Abrir una ventana nueva con perfil temporal
Name[et]=Ava uus aken ajutise profiiliga
Name[eu]=Ireki leiho berria behin-behineko profil batekin
Name[fi]=Avaa uusi ikkuna käyttäen väliaikaista profiilia
Name[fr]=Ouvrir une nouvelle fenêtre avec un profil temporaire
Name[gl]=Abrir unha nova xanela con perfil temporal
Name[he]=פתיחת חלון חדש עם פרופיל זמני
Name[hy]=Բացել նոր պատուհան ժամանակավոր հատկագրով
Name[ia]=Aperi un nove fenestra con un profilo provisori
Name[it]=Apri una nuova finestra con un profilo temporaneo
Name[ja]=一時プロファイルで新しいウィンドウを開く
Name[ka]=ახალი ფანჯრის გახსნა დროებით პროფილში
Name[kw]=Egery fenester noweth gen profil dres prys
Name[ms]=Buka Tetingkap Baru dengan profil sementara
Name[nb]=Åpne et nytt vindu med en midlertidig profil
Name[nl]=Nieuw venster openen met een tijdelijk profiel
Name[pt_BR]=Abrir uma nova janela com um perfil temporário
Name[ro]=Deschide o fereastră nouă cu un profil temporar
Name[ru]=Открыть новое окно с временным профилем
Name[sl]=Odpri novo okno z začasnim profilom
Name[sv]=Öppna ett nytt fönster med temporär profil
Name[ug]=ۋاقىتلىق سەپلىمە ھۆججەت بىلەن يېڭى كۆزنەك ئاچ
Name[vi]=Mở cửa sổ mới với hồ sơ tạm
Name[zh_CN]=以临时配置文件打开新窗口
Name[zh_TW]=以暫時性個人身分開啟新視窗
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium --temp-profile
wxl added a subscriber: wxl.EditedJan 3 2020, 12:51 PM

I installed chromium as a snap in 19.10 and 20.04 and it did not initially show up in the menu, but did after I logged out and back in again. This is probably a problem with snaps.

However, I'm confused about the mention of the "panel" here?

In T139#2836, @wxl wrote:

I installed chromium as a snap in 19.10 and 20.04 and it did not initially show up in the menu, but did after I logged out and back in again. This is probably a problem with snaps.

In my installation, it does not show up.

However, I'm confused about the mention of the "panel" here?

I did not find a better name. In which package is the application menu?

wxl added a comment.Jan 3 2020, 1:15 PM

In my installation, it does not show up.

Even with a logout or a restart? What about on a fresh install?

In which package is the application menu?

Oh, it's lxqt-panel alright, but I guess it also includes the system tray, the quick launch, and the actual panel itself. So I could imagine you meaning other things by saying you wanted applications to show up "on the panel." It's clear now.

wxl renamed this task from Add snaps to the panel to Ensure applications in Snap packages show up in the lxqt-panel menu.Jan 3 2020, 1:16 PM

Hey guys,

I'm also trying to reproduce this. Just out of curiosity, I checked the Spotify snap that has always worked on my base Ubuntu installation and things seem fine. When doing the fresh installation, I never needed to restart or logout/login to see it working as expected in the application drawer.

I created a VM with Lubuntu 19.10 and installed the same snap. After running snap install spotify, it does not show up. As suggested by wxl, after logout/login it works.

Desktop file of snap:

:~$ cat /var/lib/snapd/desktop/applications/spotify_spotify.desktop 
[Desktop Entry]                                                                                                                                                                                                                                                                          
X-SnapInstanceName=spotify                                                                                                                                                                                                                                                               
Type=Application                                                                                                                                                                                                                                                                         
Name=Spotify                                                                                                                                                                                                                                                                             
GenericName=Music Player                                                                                                                                                                                                                                                                 
Icon=/snap/spotify/36/usr/share/spotify/icons/spotify-linux-128.png                                                                                                                                                                                                                      
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify %U                                                                                                                                                                         
Terminal=false                                                                                                                                                                                                                                                                           
MimeType=x-scheme-handler/spotify;                                                                                                                                                                                                                                                       
Categories=Audio;Music;Player;AudioVideo;                                                                                                                                                                                                                                                
StartupWMClass=spotify
In T139#2836, @wxl wrote:

I installed chromium as a snap in 19.10 and 20.04 and it did not initially show up in the menu, but did after I logged out and back in again. This is probably a problem with snaps.

Although I'm not the most experienced person with snaps, this makes me say its actually not an issue with snaps 🤔

wxl added a comment.Jan 3 2020, 5:43 PM

@gsilvapt Good job! So now the next question is whether or not this is actually a problem with LXQt or a problem with Lubuntu (or rather LXQt but specifically in combination to the rest of our system). To test this, it would be best to check and see what happens in Debian, since it's going to be the closest to what we have. Using Debian testing or stable would be the best bet with the LXQt desktop environment installed. Probably best to check them both.

If it's a problem there, then we have a very good candidate for an upstream bug report. They might scoff at Snaps but seeing that even the RiseupVPN is being distributed by Snaps (and not AppImages or Flatpaks, mind you), I think it's fair to say that they're going to be hard to ignore.

If it's NOT a problem in Debian, then we have a much thornier issue. At that point we might want to check all of the other flavors to ensure that it's not affecting any other desktop environment. I'd start with Kubuntu given they're Qt-centric, too.

Is that something you'd want to follow up on?

A thought: perhaps it's a "first run" sort of thing. Like XDG variables aren't set correctly to point at the odd location for the Desktop Entries until the first Snap is installed?

In T139#2842, @wxl wrote:

@gsilvapt Good job! So now the next question is whether or not this is actually a problem with LXQt or a problem with Lubuntu (or rather LXQt but specifically in combination to the rest of our system). To test this, it would be best to check and see what happens in Debian, since it's going to be the closest to what we have. Using Debian testing or stable would be the best bet with the LXQt desktop environment installed. Probably best to check them both.

I can try spinning a Debian VM with LXQt (shouldn't be too hard to install) and see what happens. Considering all mentioned distros come from debian, I'd say this might be related with LXQt. Take Ubuntu as an example - it just works out of the box.

In T139#2842, @wxl wrote:

If it's a problem there, then we have a very good candidate for an upstream bug report. They might scoff at Snaps but seeing that even the RiseupVPN is being distributed by Snaps (and not AppImages or Flatpaks, mind you), I think it's fair to say that they're going to be hard to ignore.

If it's NOT a problem in Debian, then we have a much thornier issue. At that point we might want to check all of the other flavors to ensure that it's not affecting any other desktop environment. I'd start with Kubuntu given they're Qt-centric, too.

Is that something you'd want to follow up on?

I might need some guidance after the tests but sure, why not? :)

In T139#2842, @wxl wrote:

A thought: perhaps it's a "first run" sort of thing. Like XDG variables aren't set correctly to point at the odd location for the Desktop Entries until the first Snap is installed?

Can these be enforced by DE? Just to rule out the possibility of being something related with LXQt.

kc2bez added a comment.Jan 3 2020, 6:01 PM

I believe I know why a logout/login is necessary for Lubuntu and not Ubuntu. Ubuntu comes installed with snaps, in particular, the core snap. After that is installed you don't have to logout/login to have snaps show in the menu.

wxl added a comment.Jan 3 2020, 6:02 PM
In T139#2843, @gsilvapt wrote:

Considering all mentioned distros come from debian, I'd say this might be related with LXQt. Take Ubuntu as an example - it just works out of the box.

I think you're right, but sometimes upstream can be a bit snarky, so it's good to make sure to check of all the boxes before creating upstream issues. Also, I'll mention as well: Snaps are supposed to work on any distro, so you could see what the results in other LXQt distros, too.

I might need some guidance after the tests but sure, why not? :)

I certainly wouldn't send you into the lion pit (upstream issues) without a little help. :)

Can these be enforced by DE? Just to rule out the possibility of being something related with LXQt.

To be fair, *any* application can change the variables. Few mess with XDG variables. LXQt tends to function in a way that it reads them but doesn't write them.

kc2bez added a comment.Jan 3 2020, 6:05 PM
In T139#2846, @wxl wrote:

@kc2bez do you mean this core snap?

Yes, I think that is the one. It probably doesn't matter which one but since practically every snap relies on that one it seems like the one to install first.

wxl added a comment.Jan 3 2020, 6:07 PM

Could someone fire up a VM and try installing the core snap first and then some other one and make sure it works?

Then comes the next question: if it does, how the heck do we seed a snap or make it a meta depend?????????????

kc2bez added a comment.Jan 3 2020, 6:10 PM
In T139#2848, @wxl wrote:

Then comes the next question: if it does, how the heck do we seed a snap or make it a meta depend?????????????

There must be a way, Budgie has a snap for their welcome, Ubuntu has galculator (maybe others too), and I think Mate has something, all installed out of the gate.

gsilvapt added a comment.EditedJan 3 2020, 7:03 PM
In T139#2848, @wxl wrote:

Could someone fire up a VM and try installing the core snap first and then some other one and make sure it works?

Then comes the next question: if it does, how the heck do we seed a snap or make it a meta depend?????????????

Sorry to say but not, it does not work. It might have to do with snap initialization you guys mentioned that I didn't know about but makes sense. I'm actually inclined into that train of thought.

Another test we could run is clean Debian (testing or not testing) and check if works. If it does, then try installing LXQt on the same environment (but fresh) and check if snaps work. However, with my experience with Ubuntu and what you guys mentioned about pre-installed snaps, I don't think there's a need for that because we already have an answer but I'll let you guys decide :)

Edit: Oddly enough, I am able to start the installed application from the terminal.

wxl added a comment.Jan 3 2020, 7:05 PM

Yeah, I think working on Debian would be the next step.

gsilvapt added a comment.EditedJan 3 2020, 7:29 PM

More curious data: Fresh install, since it might not have any snaps installed, systemctl status snapd returns the following (inactive): https://paste.ubuntu.com/p/z5F8bZ24yM/

Immediately after installing the core snap, it returns that is now active - perhaps that's why we can start applications from the terminal. Things don't work regardless.

I can try Debian but doesn't Debian have snaps pre-installed? I'm about to find out anyway :D

kc2bez added a comment.Jan 3 2020, 7:32 PM
In T139#2852, @gsilvapt wrote:

More curious data: Fresh install, since it might not have any snaps installed, systemctl status snapd returns the following (inactive): https://paste.ubuntu.com/p/z5F8bZ24yM/

Immediately after installing the core snap, it returns that is now active - perhaps that's why we can start applications from the terminal.

So sounds like if we want snaps to appear "normal" we need to seed one so that the daemon starts out of the box.

gsilvapt added a comment.EditedJan 3 2020, 7:35 PM
In T139#2863, @kc2bez wrote:
In T139#2852, @gsilvapt wrote:

More curious data: Fresh install, since it might not have any snaps installed, systemctl status snapd returns the following (inactive): https://paste.ubuntu.com/p/z5F8bZ24yM/

Immediately after installing the core snap, it returns that is now active - perhaps that's why we can start applications from the terminal.

So sounds like if we want snaps to appear "normal" we need to seed one so that the daemon starts out of the box.

I'm keen on that too, yea. It seems that other distributions that come with pre-installed snaps, since it force us to restart, it will start the daemon in the first run and things might somehow sync?

I've asked on Snapcraft's forum if there's a way to achieve the same behavior without seeding a snap: https://forum.snapcraft.io/t/snapd-required-dependencies-to-start/14904

wxl added a subscriber: tsimonq2.Jan 4 2020, 12:30 AM

The core snap DOES resolve the problem if installed first. However, you need to logout and back in again after it's installed.

In other news, it turns out this is @tsimonq2's fault. Simon says this is working as intended, in an attempt to save resources. From what I can tell ~50M doesn't seem like much to worry about to have such a poor user experience when Snaps are becoming increasingly common:

● snapd.service - Snappy daemon
   Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-01-03 22:09:46 PST; 56s ago
 Main PID: 1484 (snapd)
    Tasks: 10 (limit: 1073)
   Memory: 42.5M
   CGroup: /system.slice/snapd.service
           └─1484 /usr/lib/snapd/snapd

So if we can agree to have the core snap as default (we should) we just need to figure out how to do so.

In T139#2866, @wxl wrote:

From what I can tell ~50M doesn't seem like much to worry about to have such a poor user experience when Snaps are becoming increasingly common:

Bruv 50MB is a considerable amount as compared to our current usage. (>= 10%) I'd say we give the users an option to enable snaps using the "Welcome Center" and let them know that it will cost approx 50MB.

kc2bez added a comment.Jan 4 2020, 8:06 AM

I'd say we give the users an option to enable snaps using the "Welcome Center" and let them know that it will cost approx 50MB.

Having the option to enable it in the "Welcome Center" won't be any different from the experience that is provided now. The user will still have to logout/login for the menu etc. to work properly.

In T139#2870, @kc2bez wrote:

Having the option to enable it in the "Welcome Center" won't be any different from the experience that is provided now. The user will still have to logout/login for the menu etc. to work properly.

Yeah they will have to log out and log back in. But for those who want to save those extra MBs on a very cramped system, this would be good. We are still offering them the service. Just it is their decision to enable it or not.

wxl added a comment.Jan 4 2020, 12:29 PM

One thing that's true is that once you have the core snap installed, you can't uninstall it.

In T139#2870, @kc2bez wrote:

I'd say we give the users an option to enable snaps using the "Welcome Center" and let them know that it will cost approx 50MB.

Having the option to enable it in the "Welcome Center" won't be any different from the experience that is provided now. The user will still have to logout/login for the menu etc. to work properly.

This is not true. If this is a possible scenario, then ticking this option would install the core snap during the distro installation and since you have to reboot after installing, the snap's functionality should work fine.

Not sure where this is headed but by suggestion of the people on Snapcraft's forums, I've opened a bug report: https://bugs.launchpad.net/snapd/+bug/1858303

Lets hope the devs have something to say about this behavior.

Thank you all for testing, but it is a problem, that is not really related to LXQt or Lubuntu. Meanwhile I have found out, why it does not show up in my installations of Lubuntu 19.10 and Lubuntu 20.04, on different hardware.

I have set up two virtual machines, one with Lubuntu 19.10 and the other with Lubuntu 20.04.

Installing chromium with sudo apt install chromium-browser (which will install the snap, so not every user is necessarily aware of installing a snap), succeeds and the chromium snap is shown in the application menu.

The reason, why it still does not show up in my installations, is, that I am using zsh instead of bash.

Modifying

/etc/zsh/zprofile
# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
#
# This file is sourced only for login shells (i.e. shells
# invoked with "-" as the first character of argv[0], and
# shells invoked with the -l flag.)
#
# Global Order: zshenv, zprofile, zshrc, zlogin

emulate sh -c 'source /etc/profile'

does the trick (it is rather a workaround, not a real solution, see the Launchpad bug).

When using zsh as login shell, it now sources also the file /etc/profile.d/apps-bin-path.sh and the snaps show up also in the application menu.

From my side, this task could be closed as Invalid and for other problems, we should create new tasks (for documenting purposes and it will be less confusing).

wxl added a comment.Jan 5 2020, 4:11 PM

@apt-ghetto I am confident that despite your issue surrounding zsh, something is wrong with the way Lubuntu handles Snaps until a Snap is installed and a log out and back in is completed.

The only reason it's working for you now is because once you install any Snap, you get the core Snap which then can't be uninstalled (so you can't revert the behavior that comes with it). Logging out/in after that will result in every Snap thereafter showing up in the menu just fine. So if you installed Chromium and it didn't work and you uninstalled it, but somewhere along the way logged out and back in again, every other Snap will work fine.

That said, I think we want to keep this issue as valid.

As far as taking action is concerned, we actually have a very simple solution described here which is essentially to add debian/snapd.dirs to rMETA with var/lib/snapd/desktop/appliactions in it. No additional overhead will be added until a Snap is installed.

I would also like to suggest we add a note to the documentation. It seems like the memory usage can increase over time and perhaps with more Snaps, but [it seems like something like ~50MB would be reasonable to assume out of snapd](https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1642068/comments/39).

I can take care of fixing the packaging if we all agree this is the way to go.

My 2 cents: Since this configuration does not change any resource expenditure, then I'm all up to change it accordingly.

gsilvapt added a comment.EditedJan 6 2020, 8:09 AM

Sorry for double posting but we got something interesting from upstream:
https://github.com/snapcore/snapd/pull/7956

This might fix the issue too, according to mvo. Is there a way to test this with this revision? Changes from upstream might be better suited that system modifications :)

Clone the master. Create a patch from the PR. Apply it and then build and install from it.

wxl added a comment.Jan 21 2020, 12:27 AM

A quick update: 2.43.1 has been released upstream and there's a pre-build of 2.43 in proposed. It seems our fix is tagged in both so you could probably enable proposed to see if the fix is there. Oddly, I couldn't find it in the Ubuntu changelog, which is bizarre since it comes from the repo, but whatever. At the very least, coming soon.

This could have some releations with the "redraw" of the menu. If you change a .desktop icon (directly not icon theme) or category it won't be notices untill you restart.

It looks like a new snapd landed in focal today. I am not sure if it has the fix we were looking for or not but I am thinking so. Test away folks.

wxl closed this task as Resolved.Feb 17 2020, 7:23 PM

Confirmed it's got the fix and that version is in the 20200217 ISO and
that it works perfectly. I'm calling this officially good.