How do I keep stdin open when launching an executable via a Desktop Entry File (i.e. .desktop)?
1
vote
1
answer
632
views
I have a desktop application that relies on stdin.
If I run it in the terminal, it runs great and quits when stdin closes (CTRL+D). I also have a systemd activation socket set up which can launch this application. In this case, stdin is connected to the socket and when that socket is closed, the application closes.
But when I launch this via
/usr/share/applications/*.desktop
in gnome, stdin is closed and so the application closes immediately. I see stdin is linked to /proc/12345/fd/0 -> /dev/null
.
Is there a way to launch an application via the desktop environment so that stdin is open (even if it doesn't have anything writing to it)?
Asked by Stewart
(15651 rep)
Apr 29, 2021, 02:08 PM
Last activity: Jan 13, 2023, 04:58 AM
Last activity: Jan 13, 2023, 04:58 AM