graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.

Home Page:https://wiki.archlinux.org/index.php/Profile-sync-daemon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support multiple/custom profiles for e.g. Firefox

rieje opened this issue · comments

commented

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.

I would also like to see support for custom profile paths

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