electron: [Bug]: shell.openExternal not work at ubuntu21.04
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
13.1.6
What operating system are you using?
Ubuntu
Operating System Version
ubuntu21.04
What arch are you using?
x64
Last Known Working Electron version
15.2.0
Expected Behavior
run shell.openExternal(url) open a file
Actual Behavior
run shell.openExternal(url) log ` xdg-open - opens a file or URL in the user’s preferred application
Synopsis
xdg-open { file | URL }
xdg-open { --help | --manual | --version }
Use ‘man xdg-open’ or ‘xdg-open --manual’ for additional info. `
then nothing happen
but its work when I use childProcess.exec('xdg-open ’ + url)
url is a file path
Testcase Gist URL
No response
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (6 by maintainers)
Commits related to this issue
- [desktop] Add note about xdg-open bug on Ubuntu Ref: https://github.com/electron/electron/issues/31485 — committed to ente-io/ente by mnvr 3 years ago
- [desktop] Add note about xdg-open bug on Ubuntu (#1756) Was able to reproduce the issue in Ubuntu 24.04 LTS Ref: https://github.com/electron/electron/issues/31485 — committed to ente-io/ente by mnvr 3 years ago
This issue is still present in electron v21.0.1.
Was able to reproduce the issue in Ubuntu 24.04 LTS (using latest Electron 30.0.6)
I am having the same problem with electron
v17.3.1. Here’s a gist, generated by electron fiddle.https://gist.github.com/5fb97f76b4a83861673125a921ab88be
It creates the following output when run on Ubuntu 21.10:
Changing the argument from
"/home"to"file:///home"results in the expected behavior.This issue is still present in Electron v25.3.0 and v26.0.0-beta5 on Ubuntu 23.04.