Where/How is Homepage URL stored in Mozilla Firefox 0.9?
Okay, I worked up a nice little script to circumvent the profiles hassle when trying to run multiple instances of firefox 0.9.
My script does one of these four things: If firefox isn't running at all and a URL isn't supplied, launch a new instance If firefox isn't running at all and a URL is supplied, launch a new instance that opens the URL If firefox is running and a URL is supplied, open URL in a new tab If firefox is running and a URL isn't supplied, open a new tab that's blank the last condition is the tricky one. I don't want it to open blank. I would rather have it open up the home page. I have scoured the 'net and can't find the command that will accomplish this or the location (either file or variable) that stores what the homepage URL is. Any help? *Note: for the homepage, I tried $home. This doesn't work. Just remove it (be sure to leave the comma), if you just want it to open blank.* Code:
#!/bin/sh |
|
I missed that. It's a good link and it works for mozilla, but it won't work for firefox. I extracted the comm.jar in firefox/chrome and then went into the content directory, but right away you'll notice that there is no navigator folder or navigator.js.
Whatever causes mozilla to open up a new tab isn't there... good idea, though |
Okay, I did some snooping to try and figure out where Firefox puts the homepage. It stores it in ~/.mozilla/firefox/{profile_name}.ima/prefs.js
Since I use the default profile, I did some scripting and came up with this. It may not work for everyone, but it works for me: Code:
#!/bin/sh |
You're right, it won't work for everyone because the "default.ima" folder is random. For instance, here it is named "default.6ss". Would be nice if you could have the script guess the ending
|
This'll do the trick:
I have really gotten to like the grep cut combo, but it seems a little clunky... Modifications in bold Code:
# firefox.sh |
Odd, the last script does not work. the grep by itself works and extracts default.6ss from the ini file, but the full path to the prefs file is missing the $PROFILEPATH subdir...the script thinks my prefs.js file is located at "/home/axion/.mozilla/firefox//prefs.js"...default6ss is not added for some reason, though the same grep works outside of the script...
|
a tiny improvement
This should work for you, it may be inefficient (2 cut's :P) but it works
Code:
# firefox.sh |
All times are GMT -5. The time now is 05:01 PM. |