graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
912 stars 88 forks source link

Support multiple/custom profiles for e.g. Firefox #359

Open rieje opened 1 year ago

rieje commented 1 year ago

Very excited to come across this plugin as that's what I've been looking for my in Firefox using multiple profiles. However, I don't have profiles saved to ~/.mozilla and instead they are in ~/.firejail. I assume PSD just looks at the default profile location for each browser. In my case, I have e.g.:

~/.firejail/firefox-school/.mozilla/firefox
~/.firejail/firefox-work/.mozilla/firefox
~/.firejail/firefox-shopping/.mozilla/firefox
~/.firejail/firefox-travel/.mozilla/firefox

etc. where each of those directories has a folder called main and a profiles.ini with e.g.

[Profile0]
Name=main
IsRelative=1
Path=main
Default=1

To go into more details: I use a Firefox wrapper to start Firefox using Firejail for those persistent profiles. Firejail with persistent profiles simply treats e.g. ~/.firejail/firefox-school/ as the new $HOME for sandboxing purposes so it should not conflict with PSD--it only houses the necessities like .mozilla, .cache, .local, etc. specific to that Firefox profile instance.

I attempted a very basic tweak to see if I can get PSD to see the profiles with psd parse in this file by modifying the condition:

if [[ -d "$HOME"/.mozilla/firefox ]]  || [[ -d "$HOME"/.firejail/firefox-school/.mozilla/firefox ]]; then

but it still only detects the default non-sandboxed Firefox ~/.mozilla which I never use.

debnath-d commented 9 months ago

I would also like to see support for custom profile paths

debnath-d commented 9 months ago

I was wrong. It already detects custom profile paths mentioned in ~/.mozilla/firefox/profiles.ini