OpenVoiceOS / ovos-skill-homescreen

Provides the resting screen for OVOS
Apache License 2.0
2 stars 7 forks source link

Apps icons missing in the launch bar (Mycroft 2) #110

Closed dgorczyca closed 2 weeks ago

dgorczyca commented 2 months ago

Hi there, I am not seeing any icons when I tap home screen bottom tab. It brings app an empty tray. Looking at the code, I am a bit surprised with where it searches for programs: https://github.com/OpenVoiceOS/skill-ovos-homescreen/blob/c2ac6bdd210b4c57d3d2f42802e8b0d8df9b747d/__init__.py#L502

/usr/share/applications/", 
"/usr/local/share/applications/",
f"/home/{localuser}/.local/share/applications/

I installed a program using pip earlier and it seems to sit in the .venvs/ovos/lib/python3.11/site-packages/skill_ovos_youtube_music So the code above would never pick this app. Is that on purpose? there seem to be few other apps in the same site-packages folder. In any case the display shows me zero apps, this is the content of where it looks for icons:

(ovos) dawid@raspberrypi:~ $ ls -la /usr/share/applications/
total 172
drwxr-xr-x   2 root root  4096 Jun 30 15:23 .
drwxr-xr-x 161 root root  4096 Jun 30 15:23 ..
-rwxr-xr-x   1 root root   109 Jun 30 15:21 ai.ovos.gui-app.desktop
-rw-r--r--   1 root root   227 Sep 14  2022 geoclue-demo-agent.desktop
-rw-r--r--   1 root root  1018 Feb  5  2023 google-maps-geo-handler.desktop
-rw-r--r--   1 root root  2546 Feb 26  2023 htop.desktop
-rw-r--r--   1 root root  2074 Feb  5  2023 kcm_trash.desktop
-rw-r--r--   1 root root  9595 May  9  2023 kdesystemsettings.desktop
-rw-r--r--   1 root root  1878 Feb  5  2023 ktelnetservice5.desktop
-rw-r--r--   1 root root  1090 Feb  5  2023 openstreetmap-geo-handler.desktop
-rw-r--r--   1 root root  5995 Feb 25  2023 org.kde.kdeconnect.app.desktop
-rw-r--r--   1 root root  1457 Mar  1  2023 org.kde.kdeconnect.daemon.desktop
-rw-r--r--   1 root root  1353 Feb 25  2023 org.kde.kdeconnect.handler.desktop
-rw-r--r--   1 root root  4716 Feb 25  2023 org.kde.kdeconnect.nonplasma.desktop
-rw-r--r--   1 root root  8937 Feb 25  2023 org.kde.kdeconnect_open.desktop
-rw-r--r--   1 root root  5058 Feb 25  2023 org.kde.kdeconnect-settings.desktop
-rw-r--r--   1 root root  3700 Feb 25  2023 org.kde.kdeconnect.sms.desktop
-rw-r--r--   1 root root   835 Feb  5  2023 org.kde.kded5.desktop
-rw-r--r--   1 root root  6894 Feb 25  2023 org.kde.keditbookmarks.desktop
-rw-r--r--   1 root root  1491 Feb  5  2023 org.kde.kwalletd5.desktop
-rwxr-xr-x   1 root root    98 Jun 30 15:21 ovos-shell.desktop
-rw-r--r--   1 root root   224 May  2 12:59 python3.11.desktop
-rw-r--r--   1 root root  1012 Feb  5  2023 qwant-maps-geo-handler.desktop
-rw-r--r--   1 root root 19050 May  9  2023 systemsettings.desktop
-rw-r--r--   1 root root  5604 May  4  2023 vim.desktop
-rw-r--r--   1 root root 14904 Jun 18 23:20 vlc.desktop
-rw-r--r--   1 root root  1003 Feb  5  2023 wheelmap-geo-handler.desktop

I would happily contribute with a PR if someone explains to me how is that meant to work, any docs would be welcome

JarbasAl commented 2 months ago

hello, that is meant for skills that expose functionality via GUI, such as opening the media player

these apps are parsed from regular .desktop files, this is legacy behaviour and something we just did for compat with plasma-bigscreen, this will likely change in the future to be more streamlined

the navbar is empty because skills for the most part dont provide a GUI launcher, they are voice apps, not QT apps. only OCP, local media skill and HA plugin provide GUI launchers i believe, and both OCP and HA are on the road to deprecation/heavy refactoring

I believe the .desktop files need to be manually placed there for now, maybe we could make the relevant repos create them on setup.py when installed?

JarbasAl commented 2 months ago

an example .desktop file: https://github.com/OpenVoiceOS/skill-ovos-local-media/blob/dev/res/desktop/skill-ovos-local-media.desktop handled by the skill here

if you copy the file over to ~/.local/share/applications/skill-ovos-local-media.desktop it should populate the app drawer

dgorczyca commented 2 months ago

Thank you for prompt reply @JarbasAl. I understand, this particular app I installed (skill_ovos_youtube_music) would be a good example of the app that could benefit from this feature as it is meant to have GUI functionality. Unfortunately I've discovered that the app itself seems very buggy. Let me try to work out whether it's easily fixable, see the screenshot - plus it doesn't actually play music...

Also the homescreen app seems to be throwing few errors in the logs, I will try to understand those too. I am only beginning my journey with OVOS, hopefully I can contribute to the good work done so far.

You used a lot of terminology there - OCP, HA, QT, not sure whether I should read up somewhere to understand those abbreviations?

dgorczyca commented 2 months ago

Oh and the screenshot I mentioned up there... IMG_20240915_232131_787

JarbasAl commented 2 months ago

in your screenshot seems you are missing a icon theme, the text render bug is known and only happens sometime, unfortunately we lost our main GUI dev, so most of the GUI interface really needs some love!

as for terminology

our docs are here https://openvoiceos.github.io/ovos-technical-manual