srevinsaju / Firefox-Appimage

Mozilla Firefox Stable AppImages by Continuous Integration
MIT License
136 stars 14 forks source link

New profile is created every time the AppImage runs #5

Closed Anarch157a closed 4 years ago

Anarch157a commented 4 years ago

Hi,

I was testing this Firefox AppImage and I noticed that every time I run it, Firefox says that a new profile was created. Seems it's not recognizing that it already ran.

Seems that newer versions of Firefox create a compatibility.ini file on the profile, and in this file it records the directory the software was installed. Since AppImage mounts the image in different directories every time, Firefox gest confused and creates a new profile. Example of the . ini file:

[Compatibility]
LastVersion=81.0.2_20201012085804/20201012085804
LastOSABI=Linux_x86_64-gcc3
LastPlatformDir=/tmp/.mount_FirefoZ5YjrJ
LastAppDir=/tmp/.mount_FirefoZ5YjrJ/browser
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Anarch157a commented 4 years ago

More information here: https://www.ghacks.net/2019/05/27/how-to-fix-firefox-starting-with-a-blank-user-profile/

gHacks Technology News
How to fix Firefox starting with a blank user profile - gHacks Tech News
Find out how to repair the Firefox installation if the browser loads a blank profile without any user data (bookmarks, tabs) on start.
Anarch157a commented 4 years ago

I figured it out.

If you run Firefox.AppImage with the parameters --no-remote --profile <some-directory> then it will not create a new profile, but the directory must already exist.

So, it would be a case of adding a script to test if the directory exists and create it if it doesn't, then start with the above parameters. It would be recommended to test the command line parameters to check for the existence of a --profile or --ProfileManager in the parameters, and then use the user provided ones if they're there.

hbarsaiyan commented 4 years ago

I believe this is relevant here https://github.com/AppImage/pkg2appimage/commit/c9b09eb557b6b0b4d914ecb82998148f38880d1d

srevinsaju commented 4 years ago

Thanks a lot @hbarsaiyan :tada: Thats the right thing that would solve the problem :smile:

srevinsaju commented 4 years ago

@hbarsaiyan @Anarch157a I pushed a fix. Can you test the changes?

srevinsaju commented 4 years ago

@cmatomic can you backport bb09decf67a540e8f5f0af2059836e99b5c4ef49 255af70738f32ef90bc8884e7db39cb08e3c81d4 c6bcb7a26c32e2218e8fe3ce4eb591afb0343624 to your fork?

hbarsaiyan commented 4 years ago

@hbarsaiyan @Anarch157a I pushed a fix. Can you test the changes?

can confirm it's working fine now

srevinsaju commented 4 years ago

Thanks for testing @hbarsaiyan