Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-04-26 12:41:13

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Prozesses are after leaving of XFCE still activ

im using an own autostart-entry

~/.config/autostart/autorun.halt.desktop

  [Desktop Entry]
  Comment[de_DE]=
  Comment=
  Exec=/global/system/autorun.halt
  GenericName[de_DE]=
  ...
  ...

it works fine!
-------------------------
contens of /global/system/autorun.halt :

  /usr/bin/firefox &
  /usr/bin/thunderbird &
  ...
  /global/system/XrunForEver.tclsh  /home/halt/.RC/raiserc

----------------------------

XrunForEver.tclsh reads alle lines (Path and Command ) of file  /home/halt/.RC/raiserc
and executs this command (tcl-code  eval exec $line & )

this works fine without problems!

However, after leaving the xfce-session (logout),  all prozesses, startet by eval exec $line & , are still running.

This can i find by login as root in a konsole

who
   root
ps -Af | grep halt
  halt     21985    1  0 12:34 ?        00:00:00 /bin/bash ............
  halt     21991    1  0 12:34 ?        00:00:00 /bin/bash ............

Why this prozesses are not terminated?

Offline

#2 2019-04-26 15:17:14

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,696

Re: Prozesses are after leaving of XFCE still activ

Hello and welcome.

If you are using a distro that uses systemd and that distro builds systemd with "--without-kill-user-processes", then have a read through Kill user processes on logout and this explanation (if you are interested in the inner workings as to why).

tl;dr, set "KillUserProcesses=yes" in /etc/systemd/logind.conf.

Offline

#3 2019-04-26 15:39:58

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

the related line in /etc/systemd/logind.conf was a comment

#KillUserProcesses=no

a new line:

KillUserProcesses=yes

and reboot  has no effekt for the problem.
Im using openSuSE Leap 15.0

I think this is an critical security problem. Not for me at home, but for professional users.

Offline

#4 2019-04-27 02:48:12

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,696

Re: Prozesses are after leaving of XFCE still activ

Does openSuse use systemd? How is it configured?
Setting the same for me in Arch Linux kills all user processes on exit. Perhaps you should follow up at the opensuse forums?
I don't think this is an Xfce issue.

Offline

#5 2019-04-27 09:23:35

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

Yes, openSuSE use systemd. In the next days i try to run the programms in a virtual machine with Mint as operating system. it will take any time.
May by, my  username is the reasion for this problem to.
Since 1985 i work with unix and later linux (soloaris, hp-unix ..) and allways my username was "halt" (this is my famaly-name).
In XFCE this name will be not shown in the login-menu.   
only after
   systemctl mask accounts-daemon
   systemctl stop accounts-daemon
my the name "halt" can be selected to login.

Thank you for answers
Günter

Offline

#6 2019-04-29 10:35:33

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

Now i know, XFCE is not the causer.

The same problem takes place at openSuSE-KDE and Linux-Mint-XFCE.
May by, independent from windowmanager and a distribution.

"Single-Programms" startet by "autostart" will by terminated successful.

A script, running as loop and starting an other programm will be not killed after logout.

Start the following script as autostart-programm:

#!/bin/bash
while true
do
/usr/bin/xclock
done

#
After logout xclock ist still running!

Offline

#7 2019-04-29 10:42:44

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,696

Re: Prozesses are after leaving of XFCE still activ

KillUserProcesses=yes should take care of that. Can you post back the contents of your /etc/systemd/logind.conf file?

Offline

#8 2019-04-29 12:03:47

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

>>>>>>>>> /etc/systemd/logind.conf   of openSuSE Leap15.0
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
# vv-- this line line i have inserted after your comment #2 from 2019-04-26
KillUserProcesses=yes
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=no
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

>>>>>>>>>>>>
in all of may Linux-Systems (openSuSE , Manjao-virtual, Mint-vitual )  i find #KillUserProcesses=no as comment.

Offline

#9 2019-04-29 14:03:37

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,696

Re: Prozesses are after leaving of XFCE still activ

guenterhalt wrote:

in all of may Linux-Systems (openSuSE , Manjao-virtual, Mint-vitual )  i find #KillUserProcesses=no as comment.

The comment means it is the default.

#KillExcludeUsers=root

If you are running as root, note that the above line will exclude root processes from the kill list. Note: I am not sure of the effects of removing root from this list, as many other processes run as root. Best option is to not log in as root.

Offline

#10 2019-04-29 14:47:37

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

As root? No no never as working user, only for adminisitration, -> su root ; command ; logout.   

I check the proceses as root on a konsole, not on grafical system!
The not killed processes shows may name resp. may user-id (1000 )
who shows only "root" no other users!

I am not a beginner!
Since 1994 i use linux at home and worked  as linux-system-administrator (without systemd) in a company too.
Now i am old age pensioner (since 10 years). Linux is may hobby.
I can life with the described effect, the "linux-world"  too?

Offline

#11 2019-04-29 15:07:34

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,696

Re: Prozesses are after leaving of XFCE still activ

[I check the proceses as root on a konsole, not on grafical system!

Sorry, I mis-read your first post about root.

I'm not sure why those processes are not being killed on exit. I don't have an openSuse system available to test. Perhaps you could follow up at the opensuse forums?

Offline

#12 2019-04-29 18:09:40

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

"I don't have an openSuse system available to test." -> o.k.

It is not necessary!  I mentioned already, it  takes place in Manjaro-Linux and in Linux-Mint too. Manjaro and Mint in a virtual
I am sure, it can be reproduced in all distributions.

All not killed processes are direct-kinds of process-id "1"  (systemd), not kinds of xfce4 or other sub-processes.
Thanks. Günter

Canada?   Are you involved in flooding?
Sorry for may english, never i learning it in a school.

Offline

#13 2019-05-04 20:25:19

guenterhalt
Member
Registered: 2019-04-26
Posts: 8

Re: Prozesses are after leaving of XFCE still activ

the openSuSE´-Team worked now on this problem

see -> https://bugzilla.suse.com/show_bug.cgi?id=1133876

Offline

Board footer

Powered by FluxBB