desktop icon indicating copy to clipboard operation
desktop copied to clipboard

moving profile directory makes it non-functional (has fix!)

Open aforthwith opened this issue 1 month ago • 1 comments

Preliminary Checks

  • [x] I have read and understood the important section above.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

I'm on Fedora Atomic linux using Flatpak version of Zen that I installed about a week ago. I like to use separate profiles and desktop shortcuts for my faux-PWA's. Here's an example of one:

[Desktop Entry]
Name=Proton
Comment=Proton Mail services in a Zen container
Exec=flatpak run app.zen_browser.zen --profile /home/fwo3/.zen-profiles/proton --no-remote --container-name "Proton"
Icon=protonmail
Terminal=false
Type=Application
Categories=Network;Email;
StartupWMClass=zen-alpha
Keywords=proton;mail;email;

I wanted to clean up my user root's dotfiles, so I moved the profile directory from ~/.zen-profiles/proton to ~/.local/state/browser-profiles/zen/proton and updated the Exec line accordingly:

Exec=flatpak run app.zen_browser.zen --profile /home/fwo3/.local/state/browser-profiles/zen/proton --no-remote --container-name "Proton"

I also updated my Flatpak filesystem override to the new location.

I noticed that when I launched the 'Proton' desktop shortcut, the browser opened, even remembered my tabs and their titles and icons, but no page loaded, even if I made a new tab. Non-functional. Moving it back to its old location and reverting the desktop shortcut didn't fix the issue either.

A workaround exists!

On a whim I did some ripgrepping for the old path and found two places it was hard coded: pkcs11.txt and extensions.json.

I ran a search and replace: find . -type f -exec grep -l "\.zen-profiles" {} \; | xargs sed -i 's/\.zen-profiles/.local\/state\/browser-profiles\/zen/g' and relaunched the shortcut and voila! Profile saved and disaster averted!

I was unable to reproduce this on Firefox.

Expected behavior

Launching the desktop shortcut would open the browser profile and it would work as before.

Actual behavior

I noticed that when I launched the 'Proton' desktop shortcut, the browser opened, even remembered my tabs and their titles and icons, but no page loaded, even if I made a new tab. Non-functional. Moving it back to its old location and reverting the desktop shortcut didn't fix the issue either.

Steps to reproduce

  • Install Zen via Flatpak
  • Set a Flatpak filesystem override for access to a directory i.e. flatpak override --user app.zen_browser.zen --filesystem=/home/fwo3/.zen-profiles
  • Launch Zen with the --profile flag pointing to a child of that directory. It'll create a profile for you there. (EDIT: I tried this again and I immediately get a missing profile error. I must have created the profile somehow and I don't remember how)
  • Open a tab and visit a page.
  • Close it.
  • Move the directory containing the newly created profile
  • Set another Flatpak filesystem override for access to the parent directory of the new location.
  • Launch Zen with the --profile flag pointing to where you moved the profile to
  • The browser will open, but the page will not load. And no other URL will load either.
  • The profile remains non-functional even when moving back to the old location.

Screenshots and videos

No response

Version

1.178b

What platform are you seeing the problem on?

Linux (Flatpak)

What component is this issue related to?

Other

Relevant log output if applicable


aforthwith avatar Nov 26 '25 04:11 aforthwith

This may be (or was) a Firefox problem too. Not sure why I wasn't able to reproduce it.

Bug filed seven years ago:

https://bugzilla.mozilla.org/show_bug.cgi?id=1429838

More discussion:

https://support.mozilla.org/mk/questions/1471372 https://www.reddit.com/r/firefox/comments/vzb4sm/can_you_duplicate_a_firefox_profile_by_making_a/

aforthwith avatar Nov 26 '25 05:11 aforthwith