bedrocklinux / bedrocklinux-userland

This tracks development for the things such as scripts and (defaults for) config files for Bedrock Linux
https://bedrocklinux.org
GNU General Public License v2.0
609 stars 64 forks source link

.desktop files sychronization #82

Closed raphael-costa closed 6 years ago

raphael-costa commented 6 years ago

EDIT: NVM. Fail. I didn't know about /bedrock/brpath/applications. Sorry for the inconvenience.

paradigm commented 6 years ago

Ideally, .desktop sharing should "just work" such that most users shouldn't have to learn about /bedrock/brpath/applications for it. I'm certainly willing to pretend this issue was not created if that's what you'd prefer, but if you don't mind I'm curious about what happened that made you think it wasn't working in the first place. Maybe there's room for improvement here.

raphael-costa commented 6 years ago

I just ran pacman -S wireshark-gtk, I'm on Debian running KDE, Wireshark returns no results on either krunner (ALT+F2) or the basic launcher (Super key). To make a test, I ran apt-get install transmission-gtk, transmission shows on both krunner and the launcher but still no Wireshark.

EDIT: Wait... something is weird. I thought I'd get the desktop file after logging out but that didn't work, I rebooted my computer and I'm still not seeing wireshark, pacman -Ql wireshark-gtk indicates it should be there... and it's on /bedrock/brpath/applications

paradigm commented 6 years ago

Apologies for the delay; missed your response. I need to get much more diligent about watching Bedrock's github activity. I've been getting a lot of github messages in the last handful of months and yours got lost in them. I'll have to either be more diligent about reading them or make a habit of checking Bedrock's github issues more periodically.

Getting around to this now that I saw your message, I installed KDE from Debian and wireshark-gtk from Arch:

brc stretch apt install kde-standard && pacman -S wireshark-gtk

Confirmed things are what we expect:

$ brw startkde
stretch
$ brw wireshark-gtk
$ grep Exec /bedrock/brpath/applications/wireshark-gtk.desktop 
TryExec=/bedrock/bin/brc arch wireshark-gtk
Exec=/bedrock/bin/brc arch wireshark-gtk %f

I run startx startkde, hit alt-f2 to get what I assume is krunner, and type wireshark-gtk, and it doesn't show up. This is good - I can reproduce. I already had Arch's smplayer installed and, to my surprise, it showed up! In fact, everything I had installed going far enough back worked.

I created a new user, launched krunner, and voilà - there is wireshark. Looking at the new user's files I found ~/.cache/menus which appears to include mentions of various .desktop files. My guess for what's happening is krunner caches the available .desktop files. It's using some technique (presumably inotify) to learn about new .desktop files and re-cache when which doesn't work with /bedrock/brpath.

The work around for the time being is to remove ~/.cache/menus if something you expect to be there is missing. Might have to restart whatever application launcher as well, depending on how it works.

Some quick poking around and it doesn't look like the technologies I'm using for /bedrock/brpath support inotify. This might have to be an open, known-issue. I'll see about adding mention of this to the documentation.

Again, apologies for the delay.

raphael-costa commented 6 years ago

To be honest, I switched to Windows 10 because of WSL... =P