Subject: Re: bug#50789: syncthing-gtk creates autostart file with wrong bin

From: John Kehayias <[email-masked]>
Date: Sat, 25 Sep 2021 00:45:33 +0000

Hi Leo, Liliana, et al,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, September 24th, 2021 at 7:15 PM, Leo Famulari wrote:

> Maybe we could make the desktop file execute a path like
>
> "$HOME/.guix-profile/bin/syncthing-gtk"?

Hmm...these are both good points. And I think I may have run into stale files produced by some programs due to this. Actually, checking now, I see the same for redshift-gtk in the autostart .desktop file it makes (a /gnu/store link). So this is perhaps more common when programs create files like this.

I think there are a few possibilities and assumptions that go with them.

1. Rely on $PATH so that it can just be Exec=syncthing-gtk This is pretty common (non-Guix, at least) I think, but is an assumption. Seems safe for a program like this, but ambiguous, especially with Guix allowing multiple of the same-named bin to be installed at the same time.

2. Something like what was suggested by Leo, but we have to consider different profiles. Is that easy to account for in a build time patch? In my case it ends up $HOME/.config/guix/profiles/desktop/desktop/bin/syncthing-gtk Though I guess this happens at install. Perhaps the Python code can be patched to make something like this, based on its runtime path.

3. Remove the ability for these types of files to be created, as Liliana suggested. I think this is drastic though, changing the expected behavior in programs and difficult to enforce evenly. The point raised is important though, that direct /gnu/store links shouldn't be used in such a way.

Perhaps there are others. What do we currently do in Guix, or what would be preferred? From a user standpoint, I'd expect creating an autostart file (for instance) to work as created and to continue to do so.

John