Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
613 stars 29 forks source link

application does not detach from launcher terminal #13

Closed s-hamann closed 4 years ago

s-hamann commented 4 years ago

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 4 years ago

@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?

s-hamann commented 4 years ago

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