When starting a screen session on a systemd system and leaving the system, the screen session gets closed. You find several stuff on the net, but I didn't find any solution. Please fix the package or at the necessary explanaitions and workarouds to the wiki.
Justin, could you look at: http://pkgs.fedoraproject.org/cgit/screen.git/tree/screen.spec#n105 ?
I doubt that would make a difference. I allready have this dir. But will test it anyways.
It's most likely 'KillUserProcesses=yes' in default logind config. You can either disable that (uncomment the thing in /etc/systemd/logind.conf), or make screen leave the user's cgroup. Not sure if the latter if possible without root privileges :).
(In reply to Michał Górny from comment #3) > It's most likely 'KillUserProcesses=yes' in default logind config. You can > either disable that (uncomment the thing in /etc/systemd/logind.conf), or > make screen leave the user's cgroup. Not sure if the latter if possible > without root privileges :). I tested it with [Login] KillUserProcesses=no KillExcludeUsers=root justin but it didn't work. And manually hacking the cgroups cannot be the solution.
But does the session get closed on your logout or after some random time, or...?
Lennart looks to suggest the usage of pam_systemd: http://comments.gmane.org/gmane.comp.sysutils.systemd.devel/2379 This also have showed me that this can be configured (for the case of leaving commands running via ssh, that is not your case but can affect others) in unit file: http://patches.openembedded.org/patch/49233/
(In reply to Michał Górny from comment #5) > But does the session get closed on your logout or after some random time, > or...? When I close the ssh session it is gone.
Yes, do you have pam_systemd in /etc/pam.d/system-login?
(In reply to Michał Górny from comment #8) > Yes, do you have pam_systemd in /etc/pam.d/system-login? $ grep systemd /etc/pam.d/system-login -session optional pam_systemd.so
(In reply to Pacho Ramos from comment #6) > http://patches.openembedded.org/patch/49233/ this patch doesn't help here.
Were you able to solve this? :/
(In reply to Pacho Ramos from comment #11) > Were you able to solve this? :/ no. Perhaps we should check with fedora and opensuse, how they do the trick.
I already searched but only found the links I already posted :(
I can't reproduce this. How fast screen session gets closed?
(In reply to Justin Lecher from comment #9) > (In reply to Michał Górny from comment #8) > > Yes, do you have pam_systemd in /etc/pam.d/system-login? > > $ grep systemd /etc/pam.d/system-login > -session optional pam_systemd.so Check the full chain please: $ grep session /etc/pam.d/sshd session include system-remote-login $ grep session /etc/pam.d/system-remote-login session include system-login $ grep 'session.*systemd' /etc/pam.d/system-login -session optional pam_systemd.so
I tried it again and now it works here.