Biont/sway-launcher-desktop

Opening programs in Xwayland

Kabouik opened this issue · 3 comments

I recently switched to Sway and Wayland and one thing I noticed is sway-launcher-desktop now cannot open new windows for programs that would run in Xwayland, instead the launcher just silently fails. I was already using sway-launcher-desktop with urxvt before moving to Wayland, and those programs used to open correctly when I was still using Xorg. Is there anything that can be done about it?

Biont commented

Hm, I don't recall ever having an issue with something like this. It sounds kind of strange to be honest, since I cannot (yet) imagine what the launcher could be doing to mess things up here. Do you see anything significant in the log output?

There is no logs at all when the issue occurs, tested both urxvt and foot as terminals.

However, these two terminals have a server/client feature that reduces the loading size of client windows, and this is one I am using. My issue seems to occur only when I try to use a client to run the script, such as:

for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 40 ppt 55 ppt, border pixel 2, move position center
bindsym $mod+m exec TERMINAL_COMMAND=footclient footclient ´-a launcher ~/.config/sway-launcher-desktop/sway-launcher-desktop.sh 3>> /tmp/sway-launcher-desktop.log

# Or the urxvt equivalent

Somehow, if I change the second footclient for just foot, this seems to work, at the cost of just slightly longer startup time.

I didn't investigate the code within sway-launcher-desktop.sh but it is not clear to me what could interact with whether the script runs in a client terminal or not, but that was apparently the culprit in my case.