vim-preview icon indicating copy to clipboard operation
vim-preview copied to clipboard

Use xdg-open for Linux

Open darvelo opened this issue 11 years ago • 3 comments

For some crazy reason, when running this plugin with the default hotkey I get this message in GNOME:

Iceweasel is already running, but is not responding.

I get this error sometimes with other things, and according to a poster on the Debian forums:

This bug is, IMO, the single worst/most pernicious bug in the entire Linux world. But it's clearly not going to be fixed. Which sucks.

For this reason I choose to use xdg-open from terminal to open urls. It chooses the system- or user-configured default browser, just like open on Mac.

If I manually do:

 let g:PreviewBrowsers = "xdg-open"

Then it works like a charm. But maybe this could do better with official support? I dunno. In any case, it may help people who have the same mysterious error.

darvelo avatar Apr 09 '14 05:04 darvelo

We already use open as default for Mac. It's possible to make the same with xdg-open for linux. Don't you know do other Linux distros use xdg-open? (like Red Hat for example)

greyblake avatar Apr 09 '14 12:04 greyblake

xdg-open is part of a standard developed in part by Red Hat as part of the freedesktop.org project. The first official version of xdg-utils was released in 2006, and is in common use. Here's the Arch linux article for xdg-open. I haven't personally used any Linux besides Debian, but I know xdg-open is at least available on Debian, Ubuntu, Arch, and Fedora. On Debian it was installed by default.

darvelo avatar Apr 09 '14 20:04 darvelo

Another vote for xdg-open usage; my default browser on Ubuntu is Chrome, but this plugin starts Firefox.

Valloric avatar Feb 23 '15 18:02 Valloric