I have a remote machine running Debian 8 (Jessie) with lightdm installed. I want it to start in no-GUI mode, but I don't want to remove all X-related stuff to still be able to run it though SSH with the -X parameter. So how to disable X server autostart without removing it?I tried systemctl stop lightdm, it stops the lightdm, but it runs again after reboot. I also tried systemctl disable lightdm, but it basically does nothing. It renames lightdm's scripts in /etc/rc*.d directories, but it still starts after reboot, so what am I doing wrong? And I can't just update-rc.d lightdm stop, because it's deprecated and doesn't work.
How to disable X server autostart in Debian Jessie?
debian;systemd;init;x server;lightdm
The disable didn't work because the Debian /etc/X11/default-display-manager logic is winding up overriding it.In order to make text boot the default under systemd (regardless of which distro, really):systemctl set-default multi-user.targetTo change back to booting to the GUI,systemctl set-default graphical.targetI confirmed those work on my Jessie VM.PS: You don't actually need the X server on your machine to run X clients over ssh. The X server is only needed where the display (monitor) is.