to stop lightdm in debian jessie:

# systemctl set-default multi-user.target
Created symlink from /etc/systemd/system/default.target to /lib/systemd/system/multi-user.target.

to go back to the graphical target:

# systemctl set-default graphical.target

to stop systemd from killing user processes:

set KillUserProcesses=no in /etc/systemd/logind.conf

Advertisements