Page 1 of 2
Browser Update - Firefox
Posted: 20 Jan 2021, 21:39
by Ed_P
When the Firefox update module runs it creates a profile folder and adds it's name to the .mozilla/firefox/ installs.ini and profiles.ini. But all the current Firefox bookmarks and settings are in the old Firefox's profile folder. To keep my bookmarks/Favorites and settings I edit the installs.ini and profiles.ini files and point the new Default names to the old Firefox's profile folder.
Should I copy the files from the new Firefox profile folder to the old Firefox's folder? Or should I copy all the files from the old Firefox folder to the new Firefox profile folder and not edit the installs.ini and profiles.ini files?
Or should the Browser Selection and Update Tool do that automatically for Firefox Updates?

Browser Update - Firefox
Posted: 25 Jan 2021, 17:24
by Ed_P
I'm the only one who uses Firefox!!

Browser Update - Firefox
Posted: 25 Jan 2021, 18:04
by AcnapyxoB
Answer to your question lies in this question!
If it works according to your method, it doesn't matter which way you choose.
The newer Firefox will looks for ********.default-release profile.
Browser Update - Firefox
Posted: 25 Jan 2021, 18:15
by AcnapyxoB
Ed_P wrote: ↑25 Jan 2021, 17:24
I'm the only one who uses Firefox!!
You are not the only one. I'm uing it from the time when it was a Phoenix, then a Firebird until it becomes Firefox
"While talking about the wolf he is in the pen" there is new 85.0 release: https://download-installer.cdn.mozilla. ... ases/85.0/
Browser Update - Firefox
Posted: 25 Jan 2021, 18:25
by Ed_P
My path is Mosaic > Netscape > Firefox.
So, how do you do the updates and keep your settings and bookmarks
AcnapyxoB?

Browser Update - Firefox
Posted: 25 Jan 2021, 18:42
by AcnapyxoB
Ed_P wrote: ↑25 Jan 2021, 18:25
So, how do you do the updates and keep your settings and bookmarks AcnapyxoB?
The update has nothing to do with the settings and profile

Firefox is in:
/usr/lib64/firefox (64bit),
/usr/lib/firefox (32bit)
and the profile is in: /
home/USER_NAME/.mozilla/firefox/PROFILENAME.default-release
https://support.mozilla.org/en-US/kb/pr ... -user-data
Browser Update - Firefox
Posted: 26 Jan 2021, 01:30
by Ed_P
My profile.ini file is in the /home/guest/.mozilla/firefox/ folder. And each firefox update adds a new name for the profile.ini and a new default folder. But my settings and bookmarks are in the /home/guest/.mozilla/firefox/dsxquimp.default folder and when the update release starts they aren't present.
My profile.ini file:
Code: Select all
[Install8EE4439F9AB0F49E]
Default=dxsqumip.default
Locked=1
[Profile3]
Name=default-esr-2
IsRelative=1
Path=g89thxoy.default-esr-2
[Profile2]
Name=default-esr-1
IsRelative=1
Path=zz7u6zk6.default-esr-1
[Profile1]
Name=default-esr
IsRelative=1
Path=h11c8gy9.default-esr
[Profile0]
Name=default
IsRelative=1
Path=dxsqumip.default
Default=1
[Install84C7E5489A661753]
Default=dxsqumip.default
Locked=1
[General]
StartWithLastProfile=1
Version=2
[InstallBF30F23273C142F6]
Default=dxsqumip.default
Locked=1
[Install93951F1802389310]
Default=dxsqumip.default
Locked=1
Unless I edit the Default name to be dxsquimp.default my bookmarks and etc are not picked up.
If I were to keep the new Default folder's name I need to copy my dxsquimp.default files into the update's new Default's folder.
I don't know which approach is better and why the Browser Update doesn't do it automatically.
Browser Update - Firefox
Posted: 26 Jan 2021, 06:04
by AcnapyxoB
Ed_P why don't you try this:
Backup existing profiles!
Copy in advance key4.db and logins.json (login passwords) from your current profile.
Export bookmarks Ctrl+Shift+O / Import and Backup / Backup
Delete existing profiles and start new fresh Firefox.
Copy/Paste key4.db and logins.json inside the new created profile and import (previously saved) bookmarks Ctrl+Shift+O / Import and Backup / Restore.
Wait for the next Firefox update to check is it OK!
Browser Update - Firefox
Posted: 26 Jan 2021, 07:02
by Ed_P
Backup/Import of the bookmarks looses all the associated favicons connected to the bookmarks. Deleting my existing profile folder looses all my addon Extensions.
I run a script that backs up all my Poeteus settings and customizations to a xzm module which allows me to run a customized Porteus in a safe mode, no changes saved. In my script this is the code I use to backup my Firefox system.
Code: Select all
# -- Browser files - Firefox --
FFPATH=`grep "Path=" /home/guest/.mozilla/firefox/profiles.ini|tail -n1`; FFPATH=${FFPATH:5}
cp -a --parents /home/guest/.mozilla/firefox/*.ini /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/addonStartup.json.lz4 /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/addons.json /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/content-prefs.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/cookies.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/favicons.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/formhistory.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/key?.db /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/logins.json /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/permissions.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/places.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/prefs.js /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/search.json.mozlz4 /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/webappsstore.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/xulstore.json /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/Alternate*.txt /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/Security*.txt /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/SiteSecurity*.txt /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/TRRBlack*.txt /tmp/mod/
if [ -d /home/guest/.mozilla/firefox/$FFPATH/browser-extension-data/ ]; then
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/extensions/* /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/$FFPATH/extension*.json /tmp/mod/
fi
The files backed up are found to have been changed after I have added or changed something in Firefox then run a changes.sh script that does a "
sudo -S find /mnt/live/memory/changes -iname "*" -mmin -$X" with
$X usually set to 1.
BTW I boot the Porteus systems as ISOs and for updating with the changes=EXIT cheatcode option.
Browser Update - Firefox
Posted: 13 Mar 2021, 17:12
by Ed_P
Adding a path to the name of my existing firefox profile to the bottom of the new firefox profiles.ini's Profile entry results in Firefox prompting me to select which profile to use when restarting it. I select my existing profile, firefox then updates the profiles.ini to use it for the new Profile which seems to solve my problem. Deleting the profiles.ini's new Profile's path line and replacing it with the one for my existing profile works also but having firefox make the change may result in changes less obvious that are important to keep.
But a new problem has shown up. The firefox updates when initially run after being activated creates a new /home/guest/.cache/mozilla/firefox/profilename-default folder. And it gets added to the save.dat file when the changes=EXIT cheatcode is used. This can result in the save.dat file growing unexpectedly and becoming corrupted. When researching this problem I found 6 or 7 of these firefox .cache folders in my 96% full save.dat file.
Browser Update - Firefox
Posted: 08 May 2024, 17:15
by i3slkiller
Every time after updating Firefox module it created new clean profile, so far I marked old profile as default in "about:profiles". Over time, it was getting more and more annoying

During my fast research I found this post:
https://support.mozilla.org/en-US/questions/1418760#answer-1591862 wrote:
Issue depends exactly to the "path" in which is installed firefox binary file.
The script I used creates a package that installs it within a path containing version number of firefox:
```
/usr/lib64/firefox-115.0.2/firefox
/usr/lib64/firefox-115.0.2/firefox-bin
```
The hash as you pointed out is generated by that path.
When I upgrade that path changes, hash changes and the new firefox create a new profile linked to the new hash (and differs by the old default profile).
By reading latest-firefox.sh gist they have patched this issue, now the path contains the firefox "channel" (latest, esr, beta...). So the path should become something like:
/usr/lib64/firefox-latest/firefox
And it remains the same as far as upgrades belong to the same "channel".
If I try to upgrade to a "beta" version that path will change (/usr/lib64/firefox-beta/firefox) and a new profile will be created when FF will be restarted. I think it's a proper solution.
I made the patch of "update-firefox-live" script which changes that where firefox executables are placed in module (before was /usr/lib64/firefox-VERSION_NUMBER):
- /usr/lib64/firefox-esr for esr
- /usr/lib64/firefox-current for current
- /usr/lib64/firefox-beta for beta
Code: Select all
--- update-firefox-live 2024-05-08 18:38:07.792006582 +0200
+++ update-firefox-live.new 2024-05-08 18:46:03.700482871 +0200
@@ -218,13 +218,13 @@
dWNrRHVja0dvIgpicm93c2VyLmNhY2hlLmRpc2suY2FwYWNpdHk9MTAyNDAKYnJvd3Nlci5zaGVs
bC5jaGVja0RlZmF1bHRCcm93c2VyPWZhbHNlCmFwcC5zaGllbGQub3B0b3V0c3R1ZGllcy5lbmFi
bGVkPWZhbHNlCmJyb3dzZXIuY29tcGFjdG1vZGUuc2hvdz10cnVlCmJyb3dzZXIudGFicy5pblRp
-dGxlYmFyPTAK" | base64 -d > $TARG/usr/lib${SUFFIX}/firefox-$LATVER/distribution/distribution.ini
+dGxlYmFyPTAK" | base64 -d > $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/distribution/distribution.ini
}
disable_updates(){
echo "ewoicG9saWNpZXMiOiAKICAgewogICAgICJEaXNhYmxlQXBwVXBkYXRlIjogdHJ1ZSwKICAgICAi
RGlzYWJsZVRlbGVtZXRyeSI6IHRydWUsCiAgICAgIkRpc2FibGVQb2NrZXQiOiB0cnVlCiAgICB9
-Cn0K" | base64 -d > $TARG/usr/lib${SUFFIX}/firefox-$LATVER/distribution/policies.json
+Cn0K" | base64 -d > $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/distribution/policies.json
}
create_fake_slack(){
@@ -427,7 +427,7 @@
fi
## Create distribution directory
-mkdir -p $TARG/usr/lib${SUFFIX}/firefox-$LATVER/distribution || \
+mkdir -p $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/distribution || \
{ red "Failed to create distibution directory."; cleanup; exit 1; }
green "Decompressing firefox tarball ..."
@@ -437,18 +437,18 @@
green "Linking firefox binary ..."
cd $TARG/usr/lib${SUFFIX}
-ln -sf ./firefox-$LATVER firefox
+ln -sf ./firefox-$CHOICE1 firefox
cd -
## Create lib dir
green "Copying firefox files ..."
-cp -a firefox/* $TARG/usr/lib${SUFFIX}/firefox-$LATVER/ #|| { red "Failed to copy firefox directory."; cleanup; exit 1; }
+cp -a firefox/* $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/ #|| { red "Failed to copy firefox directory."; cleanup; exit 1; }
[ -e $TARG/usr/bin/firefox ] && unlink $TARG/usr/bin/firefox
[ ! -d $TARG/usr/bin ] && mkdir -p $TARG/usr/bin
-#ln -s /usr/lib${SUFFIX}/firefox-$LATVER/firefox $TARG/usr/bin/firefox
+#ln -s /usr/lib${SUFFIX}/firefox-$CHOICE1/firefox $TARG/usr/bin/firefox
cat > $TARG/usr/bin/firefox << EOF
#!/bin/bash
-exec env GTK_CSD=1 /usr/lib${SUFFIX}/firefox-$LATVER/firefox "\$@"
+exec env GTK_CSD=1 /usr/lib${SUFFIX}/firefox-$CHOICE1/firefox "\$@"
EOF
chmod +x $TARG/usr/bin/firefox
@@ -467,8 +467,8 @@
#chown -R 1000:1000 $TARG/home/guest
chmod 755 $TARG/usr/bin
chmod 755 $TARG/usr/lib${SUFFIX}
-chmod 755 $TARG/usr/lib${SUFFIX}/firefox-$LATVER
-chmod -R 755 $TARG/usr/lib${SUFFIX}/firefox-$LATVER/distribution
+chmod 755 $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1
+chmod -R 755 $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/distribution
mkdir -p $TARG/usr/share/applications 2>/dev/null
echo "W0Rlc2t0b3AgRW50cnldCkV4ZWM9ZmlyZWZveCAldQpJY29uPWZpcmVmb3gKVHlwZT1BcHBsaWNh
@@ -528,7 +528,7 @@
# Add home page
green "Adding home page: $HOMEPAGE"
-sed -i 's@https://forum.porteus.org@'$HOMEPAGE'@g' $TARG/usr/lib${SUFFIX}/firefox-$LATVER/distribution/distribution.ini
+sed -i 's@https://forum.porteus.org@'$HOMEPAGE'@g' $TARG/usr/lib${SUFFIX}/firefox-$CHOICE1/distribution/distribution.ini
create_fake_slack
## remove - for some locales
Of course Firefox from module created by patched script will again create new profile (I hope it will be last time

), but after next updates old selected profile should be loaded

And no, symlink (firefox -> firefox-125.0.3) won't help because it's somehow dereferenced by firefox executable.
Browser Update - Firefox
Posted: 08 May 2024, 23:18
by Ed_P
i3slkiller wrote: ↑08 May 2024, 17:15
Of course Firefox from module created by patched script will again create new profile (I hope it will be last time ), but after next updates old selected profile should be loaded
Interesting.

Nice work
i3slkiller.
And while this makes an "update" truly an update an option for a "new release" might be useful also. "new release" = new profile, all old stuff gone, fresh start module.
Added in 4 hours 4 minutes 54 seconds:
Actually for a "new release" option all a user has to do is delete the old module before doing the "update".

Browser Update - Firefox
Posted: 12 May 2024, 13:41
by Otto
I am only a user that like to experiment (Not understand programming at all).
I read your idea to keep the prev. FFprofile.
Last night I tested my own way and it works.
Before you updated it to a newer version, make a copy of 2 ff-folders:
1. /home/guest/.mozilla/ff
2. /homw/guest/.cache/mozilla/ff
After update: delete the 2 folders and replace with saved copy and reboot.
I hope you can find the better way.
No guaranty, do your own Risk.
Browser Update - Firefox
Posted: 12 May 2024, 18:23
by Ed_P
A FF install creates a new release name folder, like /home/guest/.mozzila/firefox/cuiho3hm.default-release-2, and writes that name into the /home/guest/.mozilla/firefox/installs.ini and profiles.ini files. Since both the release name folder and the ini files are in the same /home/guest/.mozzila/firefox folder your approach works.
As for the /home/guest/.cache/mozilla/ff files I don't know. I'm not that familiar with cache files/folders as I consider them to be disposable. Try doing an update where you don't restore the /.cache/mozilla/ff folder. And if that works delete the backup.
Browser Update - Firefox
Posted: 12 May 2024, 22:59
by ncmprhnsbl
update-firefox-live has been updated on the server with
i3slkiller's changes. thank you for that

and the latest firefox module on the server has been built with this script.