[Nix-dev] Chromium extensions

benley at gmail.com benley at gmail.com
Wed Apr 5 00:58:27 CEST 2017


Are you talking about the desktop app launchers that show up in the
kde/gnome/whatever application menus?  Because yeah, that totally happens.
The issue is that chrome writes the app's .destop file (at
~/.local/share/applications/chrome-<extensionkey>.desktop) with the full
/nix/store path to the non-wrapped google-chrome executable, which changes
every time the derivation gets built.  If the old google-chrome executable
is still there _and_ you already have chrome running, it will dispatch the
launch to the running chrome.  If the old executable is still there but
chrome is not running, it will launch the outdated version of chrome.  If
the old executable is gone, your desktop xdg launchers are now broken.

One quick workaround is to run:

    sed -i 's%/nix/store.*/google-chrome%google-chrome-stable%'
~/.local/share/applications/chrome-*.desktop

That will fix up all the existing launchers so they should work across
Chrome updates, but newly-created ones will still get the hardcoded
/nix/store path, and I think chrome also rewrites those .desktop files from
time to time, probably when there are new versions of the extensions.

I'm not sure what the right long-term fix is for this issue.  If anybody
knows how to convince chrome to use an executable name other than its full
binary path, that would be ideal.  Otherwise, maybe a hook to run at user
login that fixes up any existing launchers?

- Ben

(sorry for sending html email - it's to avoid gmail inserting newlines in
the middle of that sed command)

On Tue, Apr 4, 2017 at 11:13 AM, Judson Lester <nyarly at gmail.com> wrote:
> I just updated to 17.03, but it seems to happen whenever I update
chromium.
>
> On Tue, Apr 4, 2017 at 6:36 AM Tomasz Czyż <tomasz.czyz at gmail.com> wrote:
>>
>> Works for me.
>>
>> What version of nix/nixos do you use?
>>
>> 2017-04-04 8:42 GMT+01:00 Judson Lester <nyarly at gmail.com>:
>>>
>>> I've found that every time I update Chromium, all my extensions get ...
>>> lost? Their icons become puzzle pieces, and their behavior is erratic.
Is
>>> there a fix for this, or an easy way to reinstall them all?
>>>
>>> Judson
>>>
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>
>>
>>
>> --
>> Tomasz Czyż
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170404/09823134/attachment.html>


More information about the nix-dev mailing list