Changing profile directory

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

Moderators: trava90, satrow

User avatar
gracious1
Astronaut
Astronaut
Posts: 510
Joined: Sun May 15, 2016 5:00 am
Location: suddenly cold upstate NY
Contact:

Changing profile directory

Postby gracious1 » Sat Oct 21, 2017 1:47 pm

This is a question not about how to create new profiles and switch between profiles. Rather, what I would like to know is how to get Pale Moon to open profiles located in a different directory, and only that directory.

I have both stable and unstable versions of Pale Moon installed (in /usr/lib and /opt, respectively). I have things set so that when I run either one, the Profile Manager is automatically invoked so that I may select the right profile. Both versions can see all the profiles in ~/.moonchild productions/pale moon. What I would like to do, however, is to have the unstable version open profiles in a different directory, namely ~/.moonchild productions/pm-unstable.

Is this possible? :eh:

I searched for an answer on this forum, and found threads like [Solved]How To Create A New Profile In Linux Pale Moon — which gave me a lot of insight into profiles.ini and how to hack it if for some reason I didn't want to use the Profile Manager :mrgreen: , but it doesn't tell me exactly what I want to know.

So, I can create a new profile in a different directory, which I did with unstable PM and uncreatively called NewProfile. But then unstable PM can still see all my other profiles, and stable PM can see NewProfile in the other directory (~/.moonchild productions/pm-unstable).

Is there a way to make it so that they can only see one or the other directory? I want the stable release to see only what is in ~/.moonchild productions/pale moon and the unstable version to see only what it is in ~/.moonchild productions/pm-unstable . Is this doable?

Thanks. :geek:
Image
Fall is slipping away…

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

Re: Changing profile directory

Postby Walter Dnes » Sat Oct 21, 2017 7:00 pm

Short of tweaking the source code or the build you cannot change the fact that it looks for its profile in

Code: Select all

$HOME/.moonchild productions/pale moon

But you can easily tweak the $HOME variable. Here's the setup
    mkdir $HOME/exp (This creates a pseudo-HOME dir fpr the test version)
    create a bash script named "pmt" in your path with the following commands. Replace "path-to-test-version-palemoon" with the actual path

    Code: Select all

    #!/bin/bash
    HOME="${HOME}/exp"
    path-to-test-version-palemoon -new-instance -p "${1}"

    launch with the command pmt or pmt profilename
    Profiles will go into $HOME/exp/,moonchild productions
If you select a non-existant profile, you'll end up in the profile-manager dialogue. Be careful not to accept
Default User as a profile name. Launching it with the script would require exact matching upper/lowercase and escaping the embedded space. Keep all profile names as one word, all lowercase.

User avatar
gracious1
Astronaut
Astronaut
Posts: 510
Joined: Sun May 15, 2016 5:00 am
Location: suddenly cold upstate NY
Contact:

Re: Changing profile directory

Postby gracious1 » Sun Oct 22, 2017 3:50 am

Thanks, Watler Dnes! I just have a couple of questions before I start.

Walter Dnes wrote:

Code: Select all

#!/bin/bash
HOME="${HOME}/exp"
path-to-test-version-palemoon -new-instance -p "${1}"

Is there a reason to prefer --new-instance over --no-remote ? I have modified my pm-unstable.desktop launcher, for example, to this:

Code: Select all

Exec=/opt/palemoon-unstable/palemoon -P --no-remote

Should I have used --new-instance instead?


WalterDnes wrote:Keep all profile names as one word, all lowercase.

I never use spaces in names in Linux or UNIX if I can help it. Causes all sorts of headaches. :coffee: :sick:

But as for all lowercase, I assume you are suggesting this as best practice to prevent typos? I have some profiles named with all caps (e.g. SEPTIMUS) and some with mixed (e.g. Saratoga), and so far I have not had any problems. I have no problems remembering when writing scripts, aliases, etc. that it's "SEPTIMUS" and not "septimus" or "Septimus".
Image
Fall is slipping away…

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

Re: Changing profile directory

Postby Walter Dnes » Sun Oct 22, 2017 9:19 am

gracious1 wrote:Is there a reason to prefer --new-instance over --no-remote ? I have modified my pm-unstable.desktop launcher, for example, to this:

Code: Select all

Exec=/opt/palemoon-unstable/palemoon -P --no-remote

Should I have used --new-instance instead?


They're the same according to palemoon --help. "--new-instance" was more explicit for what I wanted when I set up my program launcher. Whatever works for you.

Code: Select all

  --no-remote                         Do not accept or send remote commands; implies --new-instance.
  --new-instance                      Open new instance, not a new window in running instance.


gracious1 wrote:But as for all lowercase, I assume you are suggesting this as best practice to prevent typos? I have some profiles named with all caps (e.g. SEPTIMUS) and some with mixed (e.g. Saratoga), and so far I have not had any problems. I have no problems remembering when writing scripts, aliases, etc. that it's "SEPTIMUS" and not "septimus" or "Septimus".

That's correct. I prefer to avoid moving around the keyboard to get at the {SHIFT} key, let alone remembering which characters to uppercase.

User avatar
gracious1
Astronaut
Astronaut
Posts: 510
Joined: Sun May 15, 2016 5:00 am
Location: suddenly cold upstate NY
Contact:

Re: Changing profile directory

Postby gracious1 » Sun Oct 22, 2017 11:29 pm

Thanks. I have another question. Is there a way to use the browser UI to migrate selected profiles from the original directory to my new experimental directory?

Otherwise, I can see only moving (well, actually copying) profile folders...

Code: Select all

cd ~/.moon*/pale*
cp profile1 profile2 profile3 ~/exp/.moon*/pale*

... and then editing the new profiles.ini using the original profiles.ini as a template.
(I already created a profiles.ini in the experimental directory when I tested the script you gave me before.)

Seems like much of this could be a script somehow..... :think: (I'd need help with that!)

Then I would have to be sure use Profile Manager in the stable Pale Moon to remove the profiles from the original directory. (Better 'cp' than 'mv' because then I would have to edit the original profiles.ini. Probably the less manual editing the better. :shifty: )

But actually, I am sure there is a way to import the profiles directly? :geek:
Image
Fall is slipping away…

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

Re: Changing profile directory

Postby Walter Dnes » Sun Oct 22, 2017 11:37 pm

See post https://forum.palemoon.org/viewtopic.php?f=37&t=15728#p114266 for detailed instructions on how to do "brain surgery" on Pale Moon profiles on linux.

User avatar
adesh
Lunatic
Lunatic
Posts: 323
Joined: Tue Jun 06, 2017 7:38 am

Re: Changing profile directory

Postby adesh » Sat Nov 11, 2017 2:08 pm

This thread has gone silent, but the best (opinion) solution has not come yet. So, here it is - use --profile switch with a path.

Code: Select all

palemoon --no-remote --profile /media/my_usb_drive/top_secret_profile

Code: Select all

mkdir /tmp/test
palemoon --no-remote --profile /tmp/test

Please note that for this to work, the given path must exist. After launch, if the directory is pristine, it will be populated properly by the browser. Using this method, profile directory will also serve as the cache directory, i.e. you will see "cache2" folder inside it.

User avatar
gracious1
Astronaut
Astronaut
Posts: 510
Joined: Sun May 15, 2016 5:00 am
Location: suddenly cold upstate NY
Contact:

Re: Changing profile directory

Postby gracious1 » Sat Nov 11, 2017 11:59 pm

adesh wrote:This thread has gone silent, but the best (opinion) solution has not come yet.


It went silent, I suppose, because I didn't respond to the previous solution after using it in practice for a while. What happened when I used it is that I discovered an effect that was less desirable. Once you've created a new $HOME directory, there are consequences, such as, for example, "bookmarked" places broken, having to re-create paths to directories Downloads, Pictures, and other issues that arose. So when I began to use it, it became very complicated. So I sort of put the whole project on hold.

I think this profile switch is more what I was looking for. We'll see how it goes. ;)
Image
Fall is slipping away…


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 6 guests