-
Notifications
You must be signed in to change notification settings - Fork 70
Home
Open With looks for entries in the Windows registry, under the key HKEY_KEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet
. It also looks for the presence of Microsoft Edge (Windows 10) in C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
(or if C:\Windows
isn't your Windows directory, the corresponding place in your Windows directory).
Open With looks for .app
files in your local applications directory. The browsers it looks for are: Camino, Google Chrome, Chromium, Firefox, Flock, Opera, Safari, and SeaMonkey.
Open With looks for google-chrome.desktop
, chromium-browser.desktop
, firefox.desktop
, opera.desktop
, and seamonkey.desktop
in these locations: ~/.local/share/applications
, /usr/local/share/applications/
, and /usr/share/applications/
.
This is quite straight-forward. Click the Add
button in the Open With options. On Windows, you're looking for a .exe
or a .bat
. On OS X it's a .app
. On Linux, you want a .desktop
or an executable.
You can duplicate an existing browser entry by clicking on it, and then clicking Duplicate
.
If you add %s
to the arguments for a browser, it will be replaced by the URL you're opening.
Windows note: If you're messing about with cmd.exe
, you're gonna have a bad time if the URL you're opening has an ampersand (&
) in it. This is because of some idiotic decision probably made in the '80s when DOS was being written. You can try to hack around it by adding a space and some quotes: "%s "
.
There are a lot of command-line arguments for Chromium/Chrome. You might want to add --incognito
or, if you want to debug Chrome using the Firefox developer tools, add --remote-debugging-port=9222
.
It's a little complicated to run more than one Firefox at once. You'll need separate profiles, and you'll want to add -P {other profile name}
or --profile {location}
, as well as --no-remote
to the arguments. Even then all your problems aren't solved, but it is a start. Hopefully this situation will improve.
I often get asked how to make Explorer open links in a new tab instead of a new window. I don't know. IE seems to do as it pleases.
Generally, when you add quotes in a parameter, they're not there to be passed to the program. They're there to tell Open With (or Bash, or Windows command prompt) how to parse what you've entered. To see how Open With will split up a string, open the Browser Console and type something like this: OpenWithCore.splitArgs('foo bar "quoted string"')
, which would display: Array [ "foo", "bar", "quoted string" ]
If you need a quote to be passed to a program (because programs are stupid), you can escape it, like this: \"
. (From v6.3 onwards.)
(You can change almost all of these using the Open With options tab. Do that instead.)
Firstly, some context. Each browser entry has a "key name" used for settings in about:config
. For auto-detected browsers, the key name is auto.
followed by the name of the file detected (firefox.exe
in Windows, firefox
in OS X, firefox.desktop
in Linux). Edge is a special flower and has the key name auto.msedge
. Manually added entries have a 8-character generated key name prefixed by manual.
, for example manual.zvsOKR6Y
. You'll see the manual entries in about:config
already. Some manual entries might not have a generated key name if you had an older version of Open With.
To set extra properties on a browser entry, add pref entries named extensions.openwith.{key name}.{pref}
. Valid prefs are:
-
icon
(string) The icon for the entry as a URL, usually afile://
URL. -
keyinfo
(string) The keyboard shortcut. Open With is fussy about the format. Use the options tab instead. -
name
(string) Name to display for the entry. -
hidden
(boolean, for automatic entries only) Whether this entry is hidden, obviously. -
usefilepath
(boolean, for manual entries only) If the URL to be opened is afile://
URL, pass the path to the file instead of a URL. Only really useful if you're trying to do something quite unusual.
This is a new feature in v6.3. A future version will have some UI to make it more useful.
The openwith:
URL scheme is registered with the browser. This means you can save URLs that open in other browsers. They have the form openwith:browser.identifier:https://foo.com/
, where browser.identifier
is the identifier used to set prefs, e.g. auto.chromium
or manual.2wLQck1O
.
If you hold Ctrl
while you click on a browser's icon, Open With will not pass the current page's URL to the new browser, and your home page in that browser will open. Obviously this doesn't work when using a keyboard shortcut.