Biont/sway-launcher-desktop

application does not detach from launcher terminal

s-hamann opened this issue · 2 comments

When I start an application using sway-launcher-desktop, the terminal that runs sway-launcher-desktop.sh stays open until the application terminates. Apparently, the application does not detach from the terminal, thus keeping it open.

The behaviour is identical for sway-launcher-desktop-1.1.0 and latest master.

I use Sway and my terminal is kitty. Relevant parts of my Sway configuration:

set $term kitty
set $menu $term --class=launcher -e env TERMINAL_COMMAND='$term -e' sway-launcher-desktop.sh
bindsym $mod+r exec $menu

I tried adding --detach to $TERMINAL_COMMAND, which makes kitty detach from the controlling terminal. This works fine when I start applications that run in a terminal, but of course not for graphical applications that are launched directly.

Am I doing something wrong here?

Biont commented

@s-hamann Thanks for the report. I installed kitty and was able to reproduce the problem. It looks like we have to discard all output in addition to setsid to make this work on your environment. Can you please check with the current master again?

Yes, it works now. Thank you for the quick fix!