How to automatically change Firefox Sync Device name

I rely heavily on having several Firefox Profiles and spinning up a new one with my default settings as fast as possible is paramount. (see links below for reference)

As part of that I am trying to automate the naming of the Firefox Sync devices so they match with the KDE Plasma Activity name and as such the Firefox Profile.

I got so far that for this is handled by in about:config. But regardless whether I change it in user.js or prefs.js it always gets overridden again by the default.

How can I make a persistent change?

Blog explaining the issue and the 0.1 version of the solution:

Code repository to the solution, which is at 0.3 now and much improved:

I tried the following and it did not work:

  1. close Firefox (the Profile in question)
  2. edit user.js and add a custom name to
  3. start Firefox (with the Profile in question) again

Results (after waiting and syncing several times, just in case):

  • in about:preferences?entrypoint=fxa_discoverability_native#sync I see my custom name – :smile: :+1:
  • I can even see it changed accordingly in prefs.js:smile: :+1:
  • but everywhere else – from other Profiles’ Account/Sync menus, to – it still shows the default name – :sob: :-1: