I want to open a specific URL in chrome via terminal in windows. I can open chrome via terminal by going to the directory where chrome is installed and calling chrome.exe in the terminal. And it opens a new window in Chrome.
But, how to open a URL in chrome through terminal, via some passed arguments in terminal??
I'm trying to open an iMacro from the mac terminal. I have the following:
open -a Firefox imacros://run/?m=#Current.iim
This however tries to read the link as a file on my computer. Is there anyway to say that this is a link and not a file. If I run imacros://run/?m=#Current.iim right on the browser it works fine.
In Behat testing you have an context to "show last response" of a step in test scenario. This fires up a browser window with static html of last response. But running this on mac os returns an error:
sh: x-www-browser: command not found
Any idea how to setup this command to a specific browser (e.g. chrome)?
So, in a terminal on my Mac, (OSX 10.5.8), I type:
open -a Firefox
and Firefox opens up.
When I type:
open -a opera
Opera opens up. Is this what you were looking for?
If you want the default browser to open up a web page for you, you can type:
open http://foobar.com
Reference for the more general solution.
CHEERS
Try AppleScript to control the browser, using the osascript command line tool. man osascript
More here: https://stackoverflow.com/a/7276138
I have installed Firefox on my Server (running Debian 6.0) but when I try to launch it I get the following message:
Error: no display specified
After googling I installed xvfb and now I have this error;
Xlib: extension "RANDR" missing on display ":99.0".
and it freezes.
Can anybody help me?
Update: I'm now able to run Firefox, but I don't want it to open up a local window but everything should be done on the server side. It should just open up, play a macro (made with iMacros) and then shut down. The opening and the closing will be handled by a script.
Thanks
You are connecting with SSH to that Debian machine? Then call next time the ssh-command with -X as argument, this will pass the correct display options to the server.
Launch this from your box's xterm:
ssh -X debian-server dbus-launch firefox
I have written some software that makes use of the -app command line option in Firefox to launch XUL applications in Firefox's embedded copy of XULRunner. This all worked fine in Firefox 3.x, however when I try with Firefox 4, Firefox either crashes or does nothing (depending on if it is on Mac or Windows).
I have tried a number of other command line options and many of them seem to be variously broken. (such as -v to print the version information, which crashes on OSX)
Does anyone know if there are already registered bugs about this? Was the removal of -app intentional or was it an oversight? Is there any way to work around this problem?
The -app is maintained in firefox 4 and should work.
I do not know if there is a bug for windows and mac os, but I'm using it on linux for several apps, and it works well (my firefox version is Mozilla Firefox 4.0.1)
Just wanted to bump this - as on Firefox 7, -app does not seem to be there:
$ uname -s -r
Linux 2.6.38-11-generic
$ firefox --version
Mozilla Firefox 7.0.1
$ firefox --help
Usage: firefox [ options ... ] [URL]
where options include:
X11 options
--display=DISPLAY X display to use
--sync Make X calls synchronous
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or -help Print this message.
-v or -version Print Firefox version.
-P <profile> Start with <profile>.
-migration Start with migration wizard.
-ProfileManager Start with ProfileManager.
-no-remote Open new instance, not a new window in running instance.
-UILocale <locale> Start with <locale> resources as UI Locale.
-safe-mode Disables extensions and themes for this session.
-jsconsole Open the Error console.
-browser Open a browser window.
-new-window <url> Open <url> in a new window.
-new-tab <url> Open <url> in a new tab.
-preferences Open Preferences dialog.
-search <term> Search <term> with your default search engine.
-private Enable private browsing mode.
-private-toggle Toggle private browsing mode.
-setDefaultBrowser Set this app as the default browser.
-g or --debug Start within debugger
-d or --debugger Specify debugger to start with (eg, gdb or valgrind)
-a or --debugger-args Specify arguments for debugger
I too would love to know when and why it was removed, but I simply cannot find any info online (see also Single-file app with xulrunner - possible?) ...
PS: Just filed a bug here: Bug #880596 in firefox (Ubuntu): “Option '-app' missing from Firefox above version 3” - I thought it would be automatically copied to mozilla's bugzilla (seeing bugs like Bug #207454), but unfortunately, it wasn't so... - bugzilla bug needs to be copied and added manually, it's there now...
I also experienced problems using the -app switch. I'm using Firefox 10, but I have an idea this problem goes right back to FF 4.
The firefox binary, when run with the -help option, does not show list the -app option, which caused me much confusion, but I believe its still there.
The problem for me, instead, was to do with this change in Firefox 4, requiring a chrome manifest file in the application root. Since FF 4, only a single (root) chrome manifest is read, so you must create one with the following line, (or lines, if you want to have multiple manifests).
manifest chrome/chrome.manifest
Then launch the application the usual way
firefox -app path/to/application.ini -jsconsole
(For debugging use the -jsconsole option).
Another note, (you didn't mention having tried this, but I did and it was wrong) -- don't use the -no-remote option. I tried this with the intent of starting a new process for my XUL application separate from already running firefox instances. However, the -app option will create a new process for your application even if firefox instances are already running, so there is no need.
See also this question for more info about the chrome manifest issue.