Open ghost opened 5 years ago
We are using open
under the hood for opening those applications. I think open
itself is using xdg-open
if no better solution is found (https://github.com/pwnall/node-open/blob/2d20d7c8946b2da243a59d9c727953bf06d77611/lib/open.js#L50), maybe the version of xdg-open
that it's using is not up to date or something?
What is your use case?
I don't know what's the expected behaviour, but to be able to open pdf, i needed to add this to my settings.json :
"openInApplication.applications": {
"xlsx": "libreoffice",
"xlsm": "libreoffice",
"pdf": "evince",
"adoc": "google-chrome",
"html": "google-chrome"
},
But i don't think this association is necessary, since in my terminal i can type:
xdg-open test.html
-> google-chrome is launched
xdg-open test.pdf
-> evince is launched
So i think it would be nice to see the extension using the system default application if the association is defined.
I hope this is more comprehensible
Isn't this already the case? What happens if you don't have any explicit association for the pdf
extension and you trigger Open in Default Application
from the context menu?
Nothing happens without explicit association.
Then that's a bug 🤔
How can I help you to get more information about the bug ? Nothing shows up on the dev console.
I'm on elementary os juno (a distribution based on ubuntu 18.04).
It's probably a bug in our open
dependency. You can try replacing it with the more modern opn
library instead, if that doesn't work either the problem is probably in the library itself.
Ok, i'll make a pull request if i get any result.
@pomdtr Ok, let me also know if that doesn't work, so that I can start thinking about another possible solution.
Hi @fabiospampinato ,
I've installed this app just like others folks on Linux (AMD64, Linux Arch, Current) and I can confirm same behavior. Linux Gnome/gtk users have xdg-open shell utility to open default applications, usually located at: /usr/bin/xdg-open
, they don't have 'open'.
I've tried to create a soft link as well as a dummy shell script named open
and saved as /usr/bin/open
with these contents:
#!/usr/bin/env sh
/usr/bin/xdg-open "$1"
in order to simulate possible MacOS env but it doesn't work.
This dummy scripts works fine entering open somefile.pdf
from terminal and default app is selected (evince in my case, like many others) but it doesn't work from your vscode plugin.
Are there other tests you'd like to have from it ?
Dirty hacks like :
// Open in applications plugin
"openInApplication.applications": {
"*": "/usr/bin/xdg-open"
},
won't work so I'll manually insert file extensions as suggested from other users
Can anybody check if this is fixed in v2 of the extension?
Thanks for your extension
On linux systems, any file can be open with the system default application using the command
xdg-open
For example in Fedora,
xdg-open example.pdf
will use evince to open example.pdfMaybe this behavior could be enabled with a settings ?