Shell script to open a web page in mozilla firefox
Hey all,
I was wondering if a web page could be opened in Mozilla Firefox using a shell script!..I haven't given it a try as yet...I will also try and if I find a a solution I'll definitely put it up....Till then if someone finds a solution or knows it already can also put it up here....
Till then,
Cheers!!!
Thanx,
Shreerang Patwaardhan.
The better way to do this, assuming you had in mind a graphical *nix environment running gnome or kde (really just guessing here) would be to invoke xdg-open awesomeness. I only recently started using this, so let me know if I'm horribly wrong. There are other multi protocol handlers out there, so look up what your intended platform may already be using, or have available.
On my Linux machines running Gnome I use xdg-open to handle everything run via cron, etc. Simply run xdg-open "protocol://url.goes.here" which looks up the list of preferred handlers for that protocol in the currently running environment. If the protocol is http, and FireFox is your default browser... BOOM! FireFox opens at your URL. Or if the browser is already open, it should simply open in a new tab or window depending on the browser default settings.