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

dmenu won't open #5112

Open
fuzunspm opened this issue Mar 15, 2020 · 7 comments
Open

dmenu won't open #5112

fuzunspm opened this issue Mar 15, 2020 · 7 comments
Labels
client-compat Compatibility issues with a particular application xwayland X11-related issues

Comments

@fuzunspm
Copy link

fuzunspm commented Mar 15, 2020

dmenu won't open on system startup. If i wait for 5 minutes or open any xwayland app(emacs, brave..) then it opens as long as xwayland app stays open.
It produces this error when executed from terminal

╰─$ dmenu_path | dmenu | xargs swaymsg exec --
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  1 (X_CreateWindow)
  Value in failed request:  0x0
  Serial number of failed request:  91
  Current serial number in output stream:  94
Error: Invalid exec command (expected at least 1 argument, got 0)

sway version 1.4

sway log

@whtv
Copy link

whtv commented Mar 27, 2020

Not a solution but bemenu is native wayland and can be configured to look/behave pretty much exactly like dmenu.

@Xyene Xyene added client-compat Compatibility issues with a particular application xwayland X11-related issues labels Apr 29, 2020
@mobuchowski
Copy link

I have the same issue.

@primeos
Copy link
Contributor

primeos commented May 6, 2021

Using dmenu (like in the default configuration) obviously also breaks with xwayland disable.
(But that's only a minor inconvenience, I've simply switched to bemenu since then.)

Maybe it's time to reconsider whether to use dmenu in the default configuration?

sway/config.in

Line 21 in f9a5c18

set $menu dmenu_path | dmenu | xargs swaymsg exec --

Alternatives are listed here (I'd say we should pick one that supports Wayland natively):

Not sure though if there would be a consensus, if something like set $menu bemenu-run --no-exec | xargs swaymsg exec -- could be considered compatible enough / a drop-in replacement, and if changing the default would be worth it (downstream packagers would have to adapt the default dependencies, it could temporarily break user setups, and we'd have to find an alternative that is stable and well maintained).


dmenu won't open on system startup. If i wait for 5 minutes or open any xwayland app(emacs, brave..) then it opens as long as xwayland app stays open.

I haven't tested it but adding xwayland force to ones Sway configuration might be a workaround. From man 5 sway:

Enables or disables Xwayland support, which allows X11 applications to be used. enable will lazily load Xwayland so Xwayland will not be launched until the first client attempts to connect. In some cases, such as slower machines, it may be desirable to have Xwayland started immediately by using force instead of enable.

@emersion
Copy link
Member

emersion commented May 7, 2021

I don't personally like bemenu, because its codebase is kind of a mess and it has dynamically loadable backends which make everything more complicated.

@primeos
Copy link
Contributor

primeos commented May 15, 2021

@emersion ok, that makes sense, thanks for the reply. I assume you don't like the other ones either (AFAIK you use https://git.sr.ht/~emersion/dotfiles/tree/master/item/bin/menu)? I briefly looked at the rest of the alternatives from the two lists above and it looks like they all have some issues (look too different, too complex, too many dependencies, etc. - https://github.com/nyyManni/dmenu-wayland might have potential but I guess a dependency on glib-2.0 and gobject-2.0 is also not ideal(?)).

Maybe it's time to reconsider whether to use dmenu in the default configuration?

So I guess it's best to stick with dmenu (at least for now)?

@emersion
Copy link
Member

Yeah, I'm personally using a terminal + fzf as my menu. Probably not something most users will want.

fuzzel looks like it could be a good alternative, but is focused on the launcher aspect (with things like .desktop file parsing, icons and such) and has (IMHO) an ugly default style (that could maybe be improved).

@ear7h
Copy link

ear7h commented Dec 13, 2022

I ran into this today, ended up fixing it by specifying a monitor to dmenu like:

... | dmenu -m 0 | ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-compat Compatibility issues with a particular application xwayland X11-related issues
Development

No branches or pull requests

7 participants