-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[bug] Links with target=_blank and shell::open do not work from AppImage on Linux #6172
Comments
For others facing this same issue, I was facing this same problem and found a workaround, at least for the I ended up calling Here's roughly what I did:
|
Please provide a full information of |
I should also note that the above repro works fine on my KDE. |
Hey @amrbashir, this is on the latest Ubuntu. I use this box for testing linux/Ubuntu so it is not modified outside of the base install. From
Here are the details from
Hope that helps track it down! |
The thing is you say that Could you guys try using |
@amrbashir It's very strange. This issue was 100% reproducible on another machine, but with my new Linux machine the reproduction repo does not showcase the issue. |
The two system had the same distro or different ones? in case they were different, which one had the issue? |
Exact same distribution (Ubuntu 22 LTS x64), exact same output from |
I was testing my app, and faced similar problems with ubuntu 22 - open url doesn't work, open file path works win10, win11, ubuntu20 - open works as expected I'm using tauri v1.3.0, AppImage build on ubuntu 20 After some exploring I've settled on using https://crates.io/crates/open directly: pub fn open_path(path: String) {
// `open` required to run in separate thread, to avoid blocking on some
// platforms (eg Fedora38 blocks)
std::thread::spawn(|| {
for mut cmd in open::commands(path) {
// required to set path to good one to use `open` on Ubuntu 22
// (otherwise can be permission error)
cmd.current_dir(std::env::temp_dir());
if cmd.status().is_ok() {
break;
};
}
});
} btw https://crates.io/crates/open docs do say:
|
I just created a Tauri 2 React app in WSL2 and ran the desktop version without issue, except this one. Turns out that xdg-open does not automatically use the Windows browser, but you can install a WSL browser or xdg-open workaround like this one: https://github.com/cpbotha/xdg-open-wsl (untested).
|
Describe the bug
When running a Tauri app on Linux using an AppImage, target=_blank links do not work, and shell::open does not work either.
Reproduction
Minimal reproduction repo: https://github.com/0rvar/tauri-appimage-repro
Create a link with target=_blank, or use shell::open with an URL. Then run the tauri app as an AppImage. It will silently fail to open the link when clicked, and silently fail to open the browser with the URL from shell::open.
Expected behavior
The browser should open with the URL
Platform and versions
Linux, AppImage. See reproduction repo above
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: