Airblader / i3

A fork of the i3 window manager with gaps and some other features. :warning: i3-gaps has been merged into i3.
BSD 3-Clause "New" or "Revised" License
5.87k stars 318 forks source link

(Wayland) i3-dmenu-desktop does not open desktop entries containing Path property #361

Closed b-zee closed 4 years ago

b-zee commented 4 years ago

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

When choosing 'Discord' from i3-dmenu-desktop, the tool returns [ { "success": true } ], but does not launch Discord.

Expected Behavior

Same as above, but does launch Discord.

Reproduction Instructions

Using Wayland/Sway: i3-dmenu-desktop is launched from terminal, typing in 'Discord', which will find the 'Discord' desktop entry, pressing enter. Nothing happens. (gtk-launch discord and dex /usr/share/applications/discord.desktop do work. Every other desktop entry I know of launches fine with i3-dmenu-desktop.)

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.18.1 (2020-04-22) © 2009 Michael Stapelberg and contributors
Running version: < 4.2-200

Using Discord 0.0.10. Contents of discord.desktop:

[Desktop Entry]
Name=Discord
StartupWMClass=discord
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
GenericName=Internet Messenger
Exec=/usr/bin/discord
Icon=discord
Type=Application
Categories=Network;InstantMessaging;
Path=/usr/bin
Path=/usr/bin

I have also tried with removing the last duplicate Path line.

- Linux Distribution & Version: Arch Linux with kernel 5.7.8
- Are you using a compositor (e.g., xcompmgr or compton): Sway

I'd be happy to include any log; I couldn't find how to debug the i3-dmenu-desktop tool.

Airblader commented 4 years ago

Hi!

Using Wayland/Sway

What does this have to do with i3 or specifically i3-gaps then? i3 is not intended for anything outside of X11.

b-zee commented 4 years ago

Good question. I inspected the tool i3-dmenu-desktop and didn't see anything specific to X11. You can close this issue.

Edit: I just confirmed it works fine with X11/i3. It must be specific to Sway then. I'm sorry to have bothered.

Airblader commented 4 years ago

There's nothing X specific in it, you're right. But Wayland / sway are an environment we cannot support. You'd have to reproduce it under X. I doubt that this is an issue in i3-dmenu-desktop though and rather how Discord behaves. Really all we do is execute the desktop file. If it works for other programs I'd start looking into Discord. :-)

b-zee commented 4 years ago

For the record: I've narrowed it down to desktop entries containing Path=. The message with to i3-msg seems correct though. It's still a mystery to me how the application doesn't launch on Sway. As if i3-msg "exec x && y only executes y on Sway.

Airblader commented 4 years ago

Under sway I assume i3-msg is a synonym for swaymsg, right? So it's not the original i3-msg? Playing with quoting could be an idea, or making sure the return code of x is correct.

b-zee commented 4 years ago

i3-msg is not a synonym. It executes the binary from i3. This is probably asking for problems?

Printing what gets executed is the following: exec "cd \"/usr/bin\" && /usr/bin/discord". With that I guess I can replicate the behaviour (does not launch Discord on Sway but does on i3):

$ i3-msg 'exec  "cd \"/usr/bin\" && /usr/bin/discord"'
[ { "success": true } ]

Although I'm don't know much about Perl and how the quoted string given by print STDOUT $cmd is what is passed to i3-msg. Anyhow, I guess I will just accept that something is off. I don't know enough about i3-msg and the differences between i3/X11 and Sway/Wayland to even begin thinking about reasons this can result in different behaviour.

Airblader commented 4 years ago

My guess would still be that this is rather something specific to Discord, or does it happen with other apps if the Path property is set?

b-zee commented 4 years ago

Yes, this happens with all desktop entries containing Path.