Coming Close to Pale Moon as Read-Only? Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Makberto

Coming Close to Pale Moon as Read-Only?

Unread post by Makberto » 2017-09-23, 09:06

Hi, e-readers!

By reading the following closed thread:

viewtopic.php?t=4320 ,

it appears to me that achieving a read-only Pale Moon can be done for the most part. Worthy of particular attention is the last post by vandidant taking about RAM. My question is, what specific functions are impossible to be run as read-only?

Cheers,

Makberto

P.S.: Although I use the Linux version most of the time, I also use the Windows version from time to time (:

User avatar
distantpluto
Fanatic
Fanatic
Posts: 115
Joined: 2015-12-17, 18:28
Location: UK

Re: Coming Close to Pale Moon as Read-Only?

Unread post by distantpluto » 2017-09-23, 13:47

I use a simple script to rsync the profile to and from /dev/shm and run it from there. I clear cache and history before closing so they're never written back to disk.

I also do this for a profile which is simply not written back at all, i.e. never changes.
Pale Moon and Epyrus on Arch Linux.

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Coming Close to Pale Moon as Read-Only?

Unread post by Walter Dnes » 2017-09-26, 21:16

Makberto wrote:it appears to me that achieving a read-only Pale Moon can be done for the most part. Worthy of particular attention is the last post by vandidant taking about RAM. My question is, what specific functions are impossible to be run as read-only?
General rule of thumb for linux...
  • The executable code, libraries, etc, are OK for read-only. They could be run from cramfs or even a CDROM, but it would probably be more sluggish, especially for a slow CDROM.
  • The user-profile-specific stuff in "$HOME/.moonchild productions/pale moon" (YES! The spaces are correct!) requires write access.
Pale Moon needs to write to "$HOME/.moonchild productions/pale moon" no if's, and's, or's, but's. There's a right way, there's a wrong way, and then there's my way. As Bill Clinton would say... "define $HOME". Let's say you have Pale Moon installed in /opt The following script would tell Pale Moon that HOME is /dev/shm, and it would happily use
"/dev/shm/.moonchild productions/pale moon"

The script is...

#!/bin/bash
HOME=/dev/shm/
/opt/palemoon/palemoon


Note that the profiles stored in ".moonchild productions" contain ALL customizations. preferences, start pages, history, saved passwords, bookmarks, etc, etc, etc. If you lose them, you're effectively running from a fresh install. If you want, you could adapt the above script to restore a previous version of the ".moonchild productions" directory. You'd have to save it after exiting Pale Moon.
There's a right way
There's a wrong way
And then there's my way

Makberto

Re: Coming Close to Pale Moon as Read-Only?

Unread post by Makberto » 2017-09-30, 10:01

Thansks to all replies!

What I did was the following: I went to about:config, changed browser.cache.disk.enable to false, and also changed browser.cache.memory.enable to true. Then, I created the entry browser.cache.memory.capacity and added the value of -1. This supposedly adjusts the memory space depending on the actual memory available. I don't know if this only works in Windows, but it doesn't appear to do any harm in Linux. Finally, I burned the PaleMoon directory to DVD (after being first on USB flash drive). As Walter says, PaleMoon works this way on DVD (or CD), although there are some minor issues with speed. One way or another, I am sure I can overcome these minor speed issues once I run PaleMoon from BD and not from DVD. And, indeed, the browser writes to "$HOME/.moonchild productions/pale moon".

Walter, I am interested in your script, but please let me ask you some questions:

1) How do I make your script work with the PaleMoon executable? Do I run your script first and then the PaleMoon executable?

2) I wouldn't like PaleMoon to think that HOME is /dev/shm but rather that HOME is/tmp. I suppose I just need to change the second line from "HOME=/dev/shm/" to "HOME=/tmp/". Am I right?

3) Taking into account that my PaleMoon will be on an optical disc that can change location (as when using a computer with multiple optical disc drives), how do I deal with the third line?

Thank you for your invaluable suppport.

Makberto

P.S.: Thank you, but I am not really interested in saving "history", "bookmarks", etc. In effect, I would like PaleMoon as if it were a LiveCD, or, as properly called, "portable live mode".

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Coming Close to Pale Moon as Read-Only?

Unread post by Walter Dnes » 2017-09-30, 16:29

Makberto wrote:Walter, I am interested in your script, but please let me ask you some questions:

1) How do I make your script work with the PaleMoon executable? Do I run your script first and then the PaleMoon executable?
The last line of the script launches Pale Moon. A note about the tarball and the resulting directory. When you extract the tarball, you get a palemoon directory and an executable named palemoon inside it. That's why the script runs "palemoon/palemoon". The "palemoon" directory is self-contained. The extraction does not splatter libraries, etc, all over your system. You can install this directory anywhere the user has read permission. The common examples are /opt and /usr/local. I choose to install in my home directory. A heavy-handed approach would be as follows. This assumes you start in your home directory...

#!/bin/bash
#
# Utterly destroy and remove directory (or file) pm
rm -rf pm
#
# Ctreat a new pm directory
mkdir pm
#
# Extract tarball into
tar -C pm -xvjf palemoon*.bz2

The command to launch Pale Moon would be $HOME/pm/palemoon/palemoon Make sure to keep a previous tarball, or another browser around for emergency use. You don't want to find yourself in a "chicken-and-egg" dilemma where you don't have a browser, but you need a browser to download the tarball. In an emergency, if you have the "wget" command, you can run...
wget --user=contrib --password=get ftp://ftp.palemoon.org/SSE-Linux/*.bz2
Save it in a script for emergency use.

EDIT Oops; that's the 32 bit SSE version. I'll try to come up with equivalant commands for the mainline versions.
Makberto wrote:2) I wouldn't like PaleMoon to think that HOME is /dev/shm but rather that HOME is/tmp. I suppose I just need to change the second line from "HOME=/dev/shm/" to "HOME=/tmp/". Am I right?
Yes.
Makberto wrote:3) Taking into account that my PaleMoon will be on an optical disc that can change location (as when using a computer with multiple optical disc drives), how do I deal with the third line?
This gets into some ugly scripting. I haven't tried it, but here's a quick-n-dirty script, assuming 3 drives. Change the drive names to match what your system gives.

Code: Select all

#!/bin/bash
HOME=/tmp/
if [[ -e /dev/cdrom0/palemoon/palemoon ]] ; then
   /dev/cdrom0/palemoon/palemoon
elif [[ -e /dev/cdrom1/palemoon/palemoon ]] ; then
   /dev/cdrom1/palemoon/palemoon
elif [[ -e /dev/cdrom2/palemoon/palemoon ]] ; then
   /dev/cdrom2/palemoon/palemoon
else
   echo "ERROR: Pale Moon not found"
fi
There's a right way
There's a wrong way
And then there's my way

Locked