updating browsers effect: is it possible to keep the settings

Technical issues/questions of an intermediate or advanced nature.
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

updating browsers effect: is it possible to keep the settings

Post#1 by francois » 02 Mar 2023, 12:40

For reasons of security, we are asked to update browsers like firefox, google-chrome-stable, and others regularly.

Each time that I upgrade the browser, I loose the settings. Instead of reinstalling anew, is it possible to keep the settings of the previous browser version? I am interested in doing so with firefox and google-chrome-stable.

Any enlightning suggestion will be appreciated.

Thanks.
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Contributor
Contributor
Posts: 8359
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

updating browsers effect: is it possible to keep the settings

Post#2 by Ed_P » 02 Mar 2023, 16:12

I can relate. What I did with my Firefox 110 update is start the new release then exit it and edit the /home/guest/.mozilla/firefox/profiles.ini's Install*'s Default= name to be equal to Profile0's Path='s name. When I restarted Firefox I selected the 1st setup option and was done. My favorites, extensions, cache sizes, etc were all there.

Code: Select all

[Install7930325786C2BC47]
Default=ple67xm3.default-release
Locked=1
 :
 :
 :
[Profile0]
Name=default-release
IsRelative=1
Path=ple67xm3.default-release
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

updating browsers effect: is it possible to keep the settings

Post#3 by francois » 03 Mar 2023, 09:40

Great!

Do you have the answer for google-chrome stable?
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Contributor
Contributor
Posts: 8359
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

updating browsers effect: is it possible to keep the settings

Post#4 by Ed_P » 03 Mar 2023, 15:22

francois wrote:
03 Mar 2023, 09:40
Do you have the answer for google-chrome stable?
Have never used chrome.

Added in 1 hour 35 minutes 30 seconds:
This will help you with the Firefox updates. :D

Code: Select all

#!/bin/sh
# Upgrade to Firefox 110

FOLDER=`cat /etc/porteus-version`
FOLDER=${FOLDER##*v}
FOLDER=${FOLDER:0:3}
FOLDER="porteus$FOLDER"
PSW=toor
OLD=94
NEW=110

if [ $FOLDER == "porteus4.0" ]; then PSW=guest; fi

if [ -e /mnt/live/memory/images/firefox-$OLD*.xzm ]; then
   echo Deactivating $OLD
   echo $PSW | sudo -S deactivate /mnt/$DRV/$FOLDER/Modules/firefox-*.xzm  > /dev/null 2>&1 &
   sleep 2
   cp /home/guest/.mozilla/firefox/profiles.ini /home/guest/.mozilla/firefox/profiles$OLD.ini
   cp /home/guest/.mozilla/firefox/installs.ini /home/guest/.mozilla/firefox/installs$OLD.ini
fi
if [ ! -e /mnt/live$NEW/memory/images/firefox-*.xzm ]; then
   echo Activating $NEW
   echo $PSW | sudo -S activate /mnt/$DRV/porteus5.0/Optional/firefox-*.xzm  > /dev/null 2>&1 &
   sleep 2
fi

nohup firefox > /dev/null 2>&1 & 
disown
sleep 2 

ls -lgt --color=never --group-directories-first /home/guest/.mozilla/firefox/

echo
echo -e "\033[1;31m Close Firefox & edit profiles.ini's Install*'s Default= name"
echo -e " to be equal to Profile0's Path='s name. \033[0m" 
sleep 3
xed /home/guest/.mozilla/firefox/profiles.ini
read

echo -e "\033[1;31m When Firefox restarts select the 1st setup option. \033[0m"
echo -e "\033[1m Check for Extensions: "
echo -e " favicon-customizer, StopAll Ads & Emoji Cheatsheet \033[0m"
echo
echo -e "\033[1;31m And if successful copy the new Firefox to the /Modules folder. \033[0m"
sleep 7
nohup firefox > /dev/null 2>&1 & 
disown
sleep 2
exit
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

updating browsers effect: is it possible to keep the settings

Post#5 by francois » 05 Mar 2023, 02:51

Google-chrome-stable:
If you are synced withe your email account, the updated version will automatically boot all the information under the google-chrome-stable browser. You can also select which information will be synced.
https://chrome.google.com/sync?hl=en-US
https://workona.com/blog/how-to-restore-tabs-chrome/

I did not noticed much as I used firefox more often in these last years.
Prendre son temps, profiter de celui qui passe.

Testuser
Samurai
Samurai
Posts: 137
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

updating browsers effect: is it possible to keep the settings

Post#6 by Testuser » 06 Mar 2023, 18:36

Hi Francois,

I always have a separate settings xzm module for my firefox or librewolf browser, so i only need to create updated browser module only.

Create a module of the settings files located in /home/guest/.librewolf - here librewolf is my browse (see for firefox which has same setup).

prefs.js - browser preference settings file.

extensions - This folder has all added extensions.

datareporting folder - This will be created always used for telemetry and home calling, so I removed all permission of this folder, so that no file will be created in this and is sent to the Owner of program.

places.sqlite - This is exact copy of your bookmarks.

As shown in the screenshot I kept rest of the files because removing them will always load a fresh browser without my custom settings.

Hope this helps you. :)

https://ibb.co/pzkKS30

User avatar
Ed_P
Contributor
Contributor
Posts: 8359
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

updating browsers effect: is it possible to keep the settings

Post#7 by Ed_P » 07 Mar 2023, 01:13

Do you use a script to save your settings Testuser? :%)
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

updating browsers effect: is it possible to keep the settings

Post#8 by francois » 26 Sep 2023, 08:35

Bumping as very useful to me. :)
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

updating browsers effect: is it possible to keep the settings

Post#9 by francois » 16 Nov 2023, 08:03

Bumping. :)
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Contributor
Contributor
Posts: 8359
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

updating browsers effect: is it possible to keep the settings

Post#10 by Ed_P » 17 Nov 2023, 06:53

What I do for Firefox updates:

Before activating the update I make a backup of the /home/guest/.mozilla/firefox/installs.ini and profiles.ini files.
In the profiles.ini I make note of the Path= value in the Name=default-release Profile.

Code: Select all

[Profile1]
Name=default-release
IsRelative=1
Path=ple67xm3.default-release
After I install the new release I review the new profiles.ini and change the name of it's install's Default to be the same as previously noted.

Code: Select all

[InstallFE437B5FC261A631]
#Default=gkrgbm2v.default-release-1
Default=ple67xm3.default-release
Locked=1
There's also this posting that may help you francois: Some useful settings for Firefox (Post by Tolkem #84145)
Ed

User avatar
M. Eerie
Moderator
Moderator
Posts: 622
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

updating browsers effect: is it possible to keep the settings

Post#11 by M. Eerie » 17 Nov 2023, 09:35

Apart from Tokem's excellent contribution on custom Firefox online profile creation, and the files indicated by Testuser, there are other files that should be considered when backing up the browser profile. For example, "cert8.db" or "cert9.db", which contain the certificate store (including personal ones).

Because of this and because Mozilla updates from time to time the content included in a profile, I think it is convenient to make a backup of the entire profile folder, and for this there is the rych oneliner, or the bbprofile script.

If the profile starts to get fat (because e.g. it includes ublock-origin databases) and you don't like that, it is always good to pull another browser with an empty profile, import the relevant data as a backup and then use Tolkem's proposal to start with a preconfigured profile to the user's liking.

Doing a vaccum of sqlite3 databases and such is inefficient in my opinion, because they are going to be compressed anyway when creating the module, and if you omit them, you force the browser to recreate them again every time an extension goes live.

Just my .02$
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

updating browsers effect: is it possible to keep the settings

Post#12 by Kulle » 17 Nov 2023, 10:01

Hi all,

I use Firefox Portable.
There is a Firefox_portable folder on the USB device or hard drive.

This folder contains:
the firefox folder, the profile folder and the run script (loader.sh)

Code: Select all

#!/bin/sh
"$PWD/firefox/firefox" -no-remote -profile "$PWD/profilefolder"
Firefox always updates itself when you use it
All settings (in the profile folder) are retained.

Very comfortable, you don't have to worry about anything.
A detailed explanation (but in German):

https://wiki.ubuntuusers.de/Portable_Firefox/

However, this does not correspond to the modular concept of Porteus,
but I now use a number of programs not as xzm modules, for example Appimages

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

updating browsers effect: is it possible to keep the settings

Post#13 by rych » 18 Nov 2023, 04:09

Kulle wrote:
17 Nov 2023, 10:01
Firefox always updates itself when you use it
All settings (in the profile folder) are retained.
Indeed. I also use a portable self-updating installation of Firefox itself. People who use Firefox xzm need to regularly manually update that xzm from a server. As for the Profile folder -- I have it mounted as an xzm module at boot. The run script (loader.sh) on exit makes me a new up-to-date FirefoxProfile.xzm while saving the FirefoxProfileOld.xzm just in case to the /optional folder -- but all that is perhaps an unnecessary complication.

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

updating browsers effect: is it possible to keep the settings

Post#14 by Kulle » 18 Nov 2023, 10:19

Hi rych,
I use Firefox with a VPN addon.
The profile folder has become bigger and bigger over time
Now already 1.1 GiB

Is it possible to delete something in it ?

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

updating browsers effect: is it possible to keep the settings

Post#15 by rych » 18 Nov 2023, 16:09

Kulle wrote:
18 Nov 2023, 10:19
Now already 1.1 GiB
That's typical: my 422MB FirefoxProfile.xzm when mounted is also around 1GB. It's worth investigating. If we find out what could be discarded between restarts, in rebuilding FirefoxProfile.xzm that junk could easily be excluded. Firstly, make sure cache is not stored in the Profile. Type about:cache to find out, and maybe set the browser.cache.disk.parent_directory in about:config.

Actually, the heaviest part of my FirefoxProfile is the "storage" subfolder needed by extensions, probably Japanese dictionaries and other legit files. So I have to live with it.
Kulle wrote:
17 Nov 2023, 10:01
I now use a number of programs not as xzm modules, for example Appimages
Me too actually. AppImages and huge standalone packages that don't need to be integrated into linux usual directory tree or be part of aufs union as there will be no changes to them. I keep those compressed as .squashfs images and mount read-only just before use. On the other hand, self-updating programs too -- those better always be in the uncompressed state. Otherwise, of course, xzm modules remain Porteus' great foundation

Post Reply