Sublime Forum

Firefox 64bit not called "View in Browser Plug-in" [resolved]

#1

Hello,

I’ve got an issue with the “View in Browser Plug-in”.
It fails to open Firefox, but will open Internet Explorer using CTRL+ALT+I

Setup is Windows 7 64Bit, Sublime Text Sublime Text Build 3207 x64, and Firefox 60.7.0esr (64-bit).
Running the consol output gives the following error.

[code]Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 1088, in run_ return self.run(edit) File "C:\Users\Robert\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py", line 238, in run File "C:\Users\Robert\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py", line 191, in openBrowser File "./python3.3/subprocess.py", line 819, in __init__ File "./python3.3/subprocess.py", line 1110, in _execute_child FileNotFoundError: [WinError 2] The system cannot find the file specified[/code]

So checking the default config for “View in Browser” shows the following.

[code]}, "nt": { "win32": { "firefox": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -new-tab", "iexplore": "C:\\Program Files\\Internet Explorer\\iexplore.exe", "chrome": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "chrome64": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "yandex": "%Local AppData%\\Yandex\\YandexBrowser\\browser.exe" } },[/code]

So the issue I have is
How to change the path from
C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab"
to
C:\Program Files\Mozilla Firefox\firefox.exe -new-tab"
As I seem to be unable to edit this file (or even find it externally) from within ST3.

Any help or ideas most welcome.

0 Likes

#2

Posted too soon !

Installed the Package Resource Viewer https://packagecontrol.io/packages/PackageResourceViewer.
Used this to edit the View In Browser.sublime-package\ViewInBrowserCommand.py file.

All now working as designed.

0 Likes

#3

What you did is fine, but you should also be able to make a file called View in Browser.sublime-settings in the Packages > User folder, with this content:

{
    "nt": {
        "win32": {
            "firefox": "C:\\Program Files\\Mozilla Firefox\\firefox.exe -new-tab"
        }
    }
}

and optionally any other settings you want to override. See also.

2 Likes