You are not logged in.

#1 2012-08-16 07:36:34

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

[SOLVED] tmux and systemd - tmux killed on logout

Hey guys.

Since switching to systemd, tmux-sessions get killed whenever I log out/get disconnected from SSH. I've tried multiple solutions, but none of those did work:

- set KillUserProcesses=no explicitly in /etc/systemd/logind.conf
- patch tmux for pam support [0]
- enable pam_systemd.so in sshd and system-login [1]

However, none of those potential fixes did work, tmux still gets killed on logout/disconnect. Anybody experienced similar issues and has a working solution?


[0] http://sourceforge.net/mailarchive/foru … tmux-users
[1] http://lists.freedesktop.org/archives/s … 02624.html

Last edited by pks (2012-08-16 08:41:48)

Offline

#2 2012-08-16 07:50:28

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] tmux and systemd - tmux killed on logout

Try KillUserProcesses=0

This is confusing, the manpage of systemd-logind.conf talks about a "boolean", says that it defaults to no, but then indicates later, that such vars are to be set with 0 or 1.

http://0pointer.de/public/systemd-man/s … .conf.html

Offline

#3 2012-08-16 08:16:30

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: [SOLVED] tmux and systemd - tmux killed on logout

You're right with KillUserProcesses. It only talks about KillUserProcesses=no or KillUserProcesses=1, not about =0. Arch's default logind.conf has a #KillUserProcesses=no, though. Quite confusing, but I bet systemd understands both syntaxes.

I just found my problem: I've set UsePam=no in sshd_config. Enabling PAM fixed tmux. Thanks for your help smile

Offline

#4 2012-08-16 08:27:05

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] tmux and systemd - tmux killed on logout

So did you set it to "yes", true or 1? :-P

Don't forget to mark the topic as solved.

Offline

#5 2012-08-16 08:42:53

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: [SOLVED] tmux and systemd - tmux killed on logout

None of those, I tried it with 0 and no, as I wanted to have it disabled wink

Offline

Board footer

Powered by FluxBB