This tip is for people like me who works on several computers with a simple user account.
I use to make several ssh to several computers with the same user. As my /home dir is shared and that all Firefox profiles are in ~/.mozilla/firefox, if you try to launch Firefox on both computers ... you can't
Here a simple example to better understand what I'm speaking about:
user@machineA $ firefox /my/local/pageA.html
user@machineB $ firefox /my/local/pageB.html
I don't care if I've got both pages on the same window, but pageB.html is on computer B not on computer A.
Conclusion: Firefox doesn't find pageB.html (normal)
The solution is in the Firefox profile management. You just need to have a profile per computer.
$ firefox -CreateProfile profileA --no-remote $ firefox -CreateProfile profileB --no-remote
user@machineA $ firefox -P profileA --no-remote /my/local/pageA.html user@machineB $ firefox -P profileB --no-remote /my/local/pageB.html
Now, you've got two Firefox instance launched and you can open both pages.
To automate all this, just add the following lines to your .bashrc:
#If the profile doesn't existe create it. if [[ $(ls ~/.mozilla/firefox | grep profile$(hostname) | wc -l ) -eq 0 ]] then firefox -CreateProfile profile$(hostname) --no-remote fi #create an alias to launch firefox with the good profile alias firefox="firefox -P profile$(hostname) --no-remote"
Enjoy !!
Commentaires
Poster un nouveau commentaire