vscode-extensions-open-in-browser icon indicating copy to clipboard operation
vscode-extensions-open-in-browser copied to clipboard

"Open in default Browser" doesn't work under linux KDE

Open pgrycz opened this issue 6 years ago • 11 comments

With any browser set as default under linux with KDE desktop environment the option "open in default browser" doesn't work and each time it needs to be run via "open in other browsers" and choose the target browser. Under linux with Gnome desktop environment it works without any issues.

pgrycz avatar Nov 07 '18 08:11 pgrycz

It also doesn't work on Ubuntu 18.04.

GauravWalia19 avatar Feb 04 '19 17:02 GauravWalia19

It also doesn't work on Ubuntu 18.04.

as I remember using Ubuntu 18.04/18.10 or more precisely linux + gnome everything worked well and Chrome was recognised as it should, maybe check if Chrome is set as default web browser in Ubuntu system settings? I just tries KDE Neon, so KDE based on Ubuntu and Manjaro KDE, so Arch based linux and both have the issue with 'Open in default browser' addon for VSCode if You want Chrome, it works with Firefox and probably with Opera but I haven't install Opera so not sure, sure that with Chrome it does not work giving this error message:

Open browser failed!! Please check if you have installed the browser correctly!

even if I add this option in json settings: "open-in-browser.default": "google-chrome" and whatever "chrome", "google-chrome", "google-chrome-stable" or "/usr/bin/[chrome_executable_filename_here]"

pgrycz avatar Mar 24 '19 21:03 pgrycz

@pgrycz Same thing here, setting it to stable doesn't make it work at all.

Ubuntu 18.04 here.

ghost avatar Mar 29 '19 13:03 ghost

@pgrycz Same thing here, setting it to stable doesn't make it work at all.

Ubuntu 18.04 here.

I've managed to workaround with addon below while waiting for a fix to this https://marketplace.visualstudio.com/items?itemName=D1n910.fast-open-html-in-browser

pgrycz avatar Mar 29 '19 16:03 pgrycz

Have the same problem on ArchLinux.

FreeHarry avatar Sep 20 '19 16:09 FreeHarry

The problem may be in the path, how vscode determines my chrome browser path. If this plugin can set the absolute path of the application, for example /opt/google/chrome/google-chrome. This will solve most problems

mengminggo avatar Feb 06 '20 13:02 mengminggo

The start command of Google Chrome in manjaro is google-chrome-stable, so you need to edit the file~/.vscode-oss/extensions/techer.open-in-browser-2.0.0/out/config.js, and change the google-chrome to google-chrome-stable in line 12 around.

vicjax avatar Jun 08 '20 15:06 vicjax

I just had this issue on Arch Linux and found this issue. I got it working a little by going to settings and searching for "open-in-browser" and then setting "set default browser" to firefox. I tried brave, which is what I want, but it doesn't work. The extension says it uses xdg-open and when I use xdg-open on the CLI to open the file it works fine in brave so something is buggy here.

image

ElijahLynn avatar Dec 18 '22 23:12 ElijahLynn

I've managed to workaround with addon below while waiting for a fix to this https://marketplace.visualstudio.com/items?itemName=D1n910.fast-open-html-in-browser

This URL link is broken when I click on it, it goes to https://github.com/SudoKillMe/vscode-extensions-open-in-browser/issues/url.

Here is the working hyperlink https://marketplace.visualstudio.com/items?itemName=D1n910.fast-open-html-in-browser.

ElijahLynn avatar Dec 19 '22 00:12 ElijahLynn

Here is the working hyperlink https://marketplace.visualstudio.com/items?itemName=D1n910.fast-open-html-in-browser.

This works out of the box for me on Arch Linux, although I did have to "disable" this extension that we are commenting on now. Then a ctrl + 1 works fast to open in Brave. However, if I right click it in the file tree, then it doesn't work and says it doesn't work with non-html files. But it is a .html file. At any rate that is for that extensions issue queue, I'm just saying there is an alternative for now until this issue is resolved.

ElijahLynn avatar Dec 19 '22 00:12 ElijahLynn

I just realized my issue is an issue specifically with Brave as all the browsers are hardcoded, it appears. Moving my Brave related comments to this issue > https://github.com/SudoKillMe/vscode-extensions-open-in-browser/issues/82#issuecomment-1356911546.

ElijahLynn avatar Dec 19 '22 00:12 ElijahLynn