You are not logged in.

#1 2013-11-17 13:19:28

pschyska
Member
Registered: 2013-09-16
Posts: 7

slim/awesome: How to kill remaining user processes?

Hey,

I'm using slim to login to awesome. When I "quit" awesome, the X Server will restart (at least that what it looks like), and the slim login screen will appear again.

However, not all of my users processes are killed, namely offlineimap and ssh-agent.
ssh-agent is started from .xinitrc like this:

eval `ssh-agent -s`

and offlineimap ist started with the "runonce" method from http://awesome.naquadah.org/wiki/Autostart#PID_way

All other processes of the user seem to be gone though. Loginctl still lists the session.

I tried KillUserProcesses=1 in /etc/systemd/logind.conf but nothing changed.

Thanks, Paul

Offline

#2 2013-11-18 00:03:05

ajbibb
Member
Registered: 2012-02-12
Posts: 142

Re: slim/awesome: How to kill remaining user processes?

This forum thread may be of some assistance: https://bbs.archlinux.org/viewtopic.php?id=151099

And more specifically the

ExecStop=/bin/kill -TERM -${MAINPID}

workaroud as described in the bug report in the last post of the thread: https://bugs.archlinux.org/task/32380#comment103886

The symptoms are not exact with what you are having, but the problem of SLIM not being able to shut down all processes does seem to match.  I'm using I3 with SLIM on two systems; one i686, and one x86_64.  I was having the slow shutdown, process won't end problem on the i686 system and the workaround in the bug report seemed to fix it.  I say seemed as I've only had it applied for the past 4 hours or so, but so far it seems to be killing all the stray processes when I do turn the machine off.

[edit] fixed capital letter where it did not belong.

Last edited by ajbibb (2013-11-18 00:05:02)

Offline

#3 2013-11-18 09:12:56

pschyska
Member
Registered: 2013-09-16
Posts: 7

Re: slim/awesome: How to kill remaining user processes?

Hey, thanks a ton for the pointers!

However, it did not solve my problem. I tried both

ExecStop=/bin/kill -TERM -${MAINPID}

and also

ExecStop=/usr/bin/killall /usr/bin/slim
KillMode=none

Are you sure stop slim.service is even called with a normal quit from awesome?

I think I'm gonna try another DM to see if it's slim related at all.

(edit) I quickly tried LXDM, and it doesn't show that problem. offlineimap and ssh-agent processes are gone after logout. I might switch permanently, I don't care that much for my DM :-P

Last edited by pschyska (2013-11-18 09:16:54)

Offline

#4 2013-11-18 11:43:41

dreadkopp
Member
Registered: 2013-11-13
Posts: 6

Re: slim/awesome: How to kill remaining user processes?

try this:

ps aux | grep <username> | awk -F arne '{print $2}' | awk '{print $1}' > /tmp/processes ; sudo kill $(cat /tmp/processes) ; rm /tmp/precesses

Last edited by dreadkopp (2013-11-18 11:44:49)

Offline

#5 2013-11-18 12:44:22

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: slim/awesome: How to kill remaining user processes?

You could try a loginctl command:

loginctl terminate-session

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#6 2013-11-19 18:25:34

pschyska
Member
Registered: 2013-09-16
Posts: 7

Re: slim/awesome: How to kill remaining user processes?

dreadkopp wrote:

try this:

ps aux | grep <username> | awk -F arne '{print $2}' | awk '{print $1}' > /tmp/processes ; sudo kill $(cat /tmp/processes) ; rm /tmp/precesses

Hey, this will kill all user processes, even when I'm logged in on another VTY or via ssh or sth right?
I don't really like that solution. I just want this particular session to end.

progandy wrote:

You could try a loginctl command:

loginctl terminate-session

Yeah that's what I tried first, I'm getting

Failed to issue method call: Input/Output Error

in console and

Failed to issue method call: Invalid Argument
Failed to stop unit session-2.scope: Input/output error

in journal when I try for example to kill-session 2. The same happens with loginctl kill-user username.

With LXDM I don't get that problem, but I need the  KillUserProcesses=1 in /etc/systemd/logind.conf still.

Cheers

Offline

#7 2013-11-21 14:52:12

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: slim/awesome: How to kill remaining user processes?

I have noticed the same problem with awesome, and I am not using Slim.

Tim

Offline

Board footer

Powered by FluxBB