! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Programms (binaries or scripts) are not being killed during logout
Status:
RESOLVED: MOVED
Product:
Xfce4-session
Component:
General

Comments

Description Maurizio Galli 2019-05-07 05:15:53 CEST
It can be reproduced in both Xfce 4.12 and 4.13 with a "forever" script:


Autostart-file in XFCE: ~/.config/autostart/autorun.xxx.desktop 

[Desktop Entry]
Comment[de_DE]=
Comment=
Exec=/home/<user>/forEver.sh
GenericName[de_DE]=
GenericName=
Icon=system-run
MimeType=
Name[de_DE]=
Name=
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

####

File forEver.sh : 

#!/bin/bash
while true 
do
<executable binary or script> 
done

##########

After logout from XFCE this <executable binary or script>  is still running.
For test: i used xclock as <executable binary or script>



Original bug report: https://bugzilla.suse.com/show_bug.cgi?id=1133876
Comment 1 Theo Linkspfeifer editbugs 2019-05-07 10:06:52 CEST
Does this still happen after setting "KillUserProcesses=yes" in the /etc/systemd/logind.conf file?
Comment 2 Maurizio Galli 2019-05-08 05:46:14 CEST
yes
Comment 3 Maurizio Galli 2019-05-08 05:48:33 CEST
(In reply to Theo Linkspfeifer from comment #1)
> Does this still happen after setting "KillUserProcesses=yes" in the
> /etc/systemd/logind.conf file?

Sorry forget my previous comment as I forgot to restart. 

After setting "KillUserProcesses=yes" it does NOT happen.
Comment 4 Theo Linkspfeifer editbugs 2019-05-08 11:07:36 CEST
There is no bug in xfce4-session then. The systemd package provided by your distribution was most likely built with --without-kill-user-processes so that user processes keep running when the user logs out.

https://www.freedesktop.org/software/systemd/man/logind.conf.html
Comment 5 Maurizio Galli 2019-05-08 11:24:34 CEST
so xfce4-session doesn't handle this directly but lets systemd take care of it by design?
Comment 6 Theo Linkspfeifer editbugs 2019-05-09 11:16:35 CEST
I am not the maintainer of xfce4-session, so I cannot say if there is something that can or should be changed. Apparently, not everyone uses the default value for KillUserProcesses, or logind to manage their user session.

Previous reports: bug 8482 and bug 13445
Comment 7 Andre Miranda editbugs 2019-05-13 18:38:37 CEST
(In reply to Maurizio Galli from comment #5)
> so xfce4-session doesn't handle this directly but lets systemd take care of
> it by design?

(In reply to Theo Linkspfeifer from comment #6)
> I am not the maintainer of xfce4-session, so I cannot say if there is
> something that can or should be changed.

AFAIK Xfce is supposed to work on non-systemd environments, so I guess this might be a valid bug.
Comment 8 Maurizio Galli 2019-05-13 19:21:20 CEST
(In reply to Theo Linkspfeifer from comment #6)
> I am not the maintainer of xfce4-session, so I cannot say if there is
> something that can or should be changed. Apparently, not everyone uses the
> default value for KillUserProcesses, or logind to manage their user session.
> 
> Previous reports: bug 8482 and bug 13445

 "KillUserProcesses=yes"  in logind has some side effects, reason why it is by default disabled in openSUSE and other distros. Some side effects are also reported by the systemd man:
"Note that setting KillUserProcesses=yes will break tools like screen(1) and tmux(1), unless they are moved out of the session scope. See example in systemd-run(1)."
Comment 9 Theo Linkspfeifer editbugs 2019-06-19 11:28:14 CEST
*** Bug 8482 has been marked as a duplicate of this bug. ***
Comment 10 Theo Linkspfeifer editbugs 2019-06-19 11:28:30 CEST
*** Bug 13445 has been marked as a duplicate of this bug. ***
Comment 11 Theo Linkspfeifer editbugs 2020-04-29 12:36:25 CEST
Reference for a bug fix:
https://github.com/mate-desktop/mate-session-manager/pull/184
Comment 12 Git Bot editbugs 2020-05-26 00:50:04 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-session/-/issues/53.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15368

Reported by:
Maurizio Galli
Reported on: 2019-05-07
Last modified on: 2020-05-26
Duplicates (2):
  • 8482 script launch by "application autostart" do not get killed when logout
  • 13445 Not all processes get terminated on logout

People

Assignee:
Xfce Bug Triage
CC List:
6 users

Version

Version:
4.12.0

Attachments

Additional information