Coming Close to Pale Moon as Read-Only?

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

Makberto
Newbie
Newbie
Posts: 6
Joined: Sun Jan 03, 2016 4:37 am
Location: Transoceanic

Coming Close to Pale Moon as Read-Only?

Postby Makberto » Sat Sep 23, 2017 9:06 am

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 (:

distantpluto
Apollo supporter
Apollo supporter
Posts: 31
Joined: Thu Dec 17, 2015 6:28 pm
Location: UK

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

Postby distantpluto » Sat Sep 23, 2017 1:47 pm

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.

Walter Dnes
Lunatic
Lunatic
Posts: 369
Joined: Thu Jul 30, 2015 8:29 pm
Location: Vaughan, ON, Canada

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

Postby Walter Dnes » Tue Sep 26, 2017 9:16 pm

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.

Makberto
Newbie
Newbie
Posts: 6
Joined: Sun Jan 03, 2016 4:37 am
Location: Transoceanic

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

Postby Makberto » Sat Sep 30, 2017 10:01 am

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
Lunatic
Lunatic
Posts: 369
Joined: Thu Jul 30, 2015 8:29 pm
Location: Vaughan, ON, Canada

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

Postby Walter Dnes » Sat Sep 30, 2017 4:29 pm

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


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 8 guests