On 20/04/2026 17:05, Bruno Haible via GNU coreutils Bug Reports wrote:
For years, I've used 'nohup' to execute some task in the background, letting me log off from the machine and look for the result a while later.This does not work in Fedora 44 (beta), with coreutils 9.11 installed from source, in two specific desktop environments. How to reproduce: Create this script: ================== nh ================== #!/bin/sh sleep 60; echo done > $HOME/nh.out ======================================== $ chmod a+x nh The steps are: 1. Log into the machine via the login manager. 2. Start a terminal. 3. Execute the command nohup ./nh & 4. Terminate the terminal by typing Ctrl-D. 5. Log out within fewer than 30 seconds. 6. A few minutes later, look whether nh.out was created (e.g. via an ssh session). Results: Desktop: GNOME Terminal: ptyxis-agent nh.out created? yes Desktop: KDE Terminal: konsole nh.out created? yes Desktop: MATE Terminal: mate-terminal nh.out created? yes Desktop: Xfce Terminal: xfce4-terminal nh.out created? yes Desktop: LXDE Terminal: lxterminal nh.out created? no Desktop: LXQt Terminal: qterminal nh.out created? no In these two desktop environments, the 'nh.out' file was not created (although there is more than 9 GB room on the disk, as shown by "df"). Bruno
Well nohup, just ignores SIGHUP, so the issue must be something specific to LX killing things. I presume this issue is not specific to v9.11 of nohup? A quick search suggests lxsession is not as well integrated as the others with systemd. The others auto manage graphical and user slices, whereas one needs to do this manually with lxsession. Something like: # keep [email protected] alive after the session ends loginctl enable-linger $USER # start the process in [email protected] instead of session-N.scope # as logind kills everything in session-N.scope on logout systemd-run --user --scope nohup your_command & cheers, Padraig
