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

AppImage immediately crashes on fedora with sway #135

Closed
skewballfox opened this issue Jul 27, 2022 · 9 comments · Fixed by #351
Closed

AppImage immediately crashes on fedora with sway #135

skewballfox opened this issue Jul 27, 2022 · 9 comments · Fixed by #351
Labels
bug Something isn't working linux

Comments

@skewballfox
Copy link

skewballfox commented Jul 27, 2022

not sure which is the culprit so I added both. I'm assuming that since spyglass app is trying to register a shortcut, this has to do with the window manager I am using. I'm guessing you are trying to communicate with some settings daemon which doesn't exist.

upon launching the app image, an grey X window appears with the text "search" and this text displays to stdout:

2022-07-27T17:01:08.719480Z  INFO tokio-runtime-worker spyglass_app: checking for update...    
2022-07-27T17:01:09.429989Z  INFO                 main spyglass_app: Registering CmdOrCtrl+Shift+/ as shortcut

afterwords the window crashes, the commandline seems to hang, no system tray icon appears.

about my system:
OS: fedora 36
kernel: 5.18.13-200.fc36.x86_64
window manager: sway 1.7
app image version: spyglass_22.7.4_amd64.AppImage

@a5huynh a5huynh added bug Something isn't working linux labels Jul 27, 2022
@a5huynh
Copy link
Collaborator

a5huynh commented Jul 27, 2022

@skewballfox would you be able to test it on a different window manager (something like Gnome would be perfect)? Just so I can narrow down the issue to either Fedora or the window manager itself.

Thanks!

@skewballfox
Copy link
Author

I can't. This system was installed from a net installer and is missing most of the dependencies, I'm also launching my WM from bash_profile rather than using a login manager.

I can install it from source if there is some debug info that might provide

@a5huynh
Copy link
Collaborator

a5huynh commented Jul 28, 2022

@skewballfox Gotcha! One thing we can try before going in to the dev build would be to install some of the dependencies for Fedora required by tauri.

There 3 libraries it would expect are: libwebkit2gtk-4.0-37, libgtk-3-0, and libappindicator3-1

If the app still has trouble launching, I can walk you through a development build to see where it's going wrong

@skewballfox
Copy link
Author

skewballfox commented Jul 29, 2022 via email

@skewballfox
Copy link
Author

so after running cargo tauri dev I see the error message that is happening client side after the displayed output:

2022-07-29T18:53:06.419521Z  INFO tokio-runtime-worker spyglass_app: checking for update...    
2022-07-29T18:53:07.515085Z  INFO main spyglass_app: Registering CmdOrCtrl+Shift+/ as shortcut    
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  12
  Current serial number in output stream:  12

@a5huynh
Copy link
Collaborator

a5huynh commented Jul 31, 2022

Thanks for digging into this @skewballfox , I'll report this issue upstream. Seems like tauri is unable to register a global shortcut w/ sway.

Just curious, would running the application w/ superuser rights make that error go away?

@skewballfox
Copy link
Author

skewballfox commented Aug 8, 2022

Just curious, would running the application w/ superuser rights make that error go away?

Just looking at that error code, No. X11 and Wayland have very different architectures: under X applications had direct access to keyboard input(like all input, not just the input to their respective window). This was part of the reason why wayland was adopted, because of the inherent security risk of that design feature

BTW, looks like this is already reported upstream:
tauri-apps/tauri#3578

@skewballfox
Copy link
Author

skewballfox commented Aug 8, 2022

Is there a way to tell tauri to run a wayland session, rather than an X session?

Also, is there a way to interact with spyglass via the command-line? The reason I'm asking is because with sway, generally you create the keybindings in the config. Having a way to call the running application directly via a CLI would be an easy way to get around global shortcut setting being unavailable for the foreseeable future in wayland

@LoganDark
Copy link

LoganDark commented Aug 10, 2022

Is there a way to tell tauri to run a wayland session, rather than an X session?

Tauri uses (a fork of) Winit for window handling so just set the environment variable WINIT_UNIX_BACKEND=wayland

EDIT: nevermind it looks like they stripped out that feature (I cannot find any alternative, it looks like it's impossible to specify the backend now as a user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants