Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在ubuntu gnome 16.04下无法使用 #3

Open
vgxl opened this issue May 13, 2016 · 2 comments
Open

在ubuntu gnome 16.04下无法使用 #3

vgxl opened this issue May 13, 2016 · 2 comments

Comments

@vgxl
Copy link

vgxl commented May 13, 2016

正常使用下没有反应,调试模式下会用编辑器打开文件。我加了个操作系统的判断,当判断os.platform() == 'linux'时调用open(file:///${file},'x-www-browser');就行了。望修正。
PS:在我的系统上如果安装了chrome,不管是不是默认浏览器,都会用其打开。若是卸载了就会用firefox打开了。
PPS:我生成了vsix文件在windows10上分别设置了IE、edge、chrome为默认浏览器,没发现影响正常使用。
PPPS:这是我第一次在github些issues,不知道对您有没有帮助。(我有点小紧张~_~)

@hellopao
Copy link
Owner

@queerkid 没在ubuntu上测试过,打开浏览器我是调用的open这个库,其实就是根据不同操作系统调用不同的命令。

你如果测试没问题觉得ok就提个pr

@hellopao
Copy link
Owner

@queerkid

"use strict";
const open = require('open');
const path = require('path');
const file = path.join(__dirname,'index.html');
open(`file:///${file}`);

我在centos上测试是没问题的,你可以写个这样的脚本在ubuntu上跑一下,看能不能打开。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants