How do I disable X at boot time so that the system boots in text mode?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I disable X at boot time so that the system boots in text mode?
Hi: When the booting sequence ends I find myself in the GUI, where a login prompt is presented me (Debian version 9). I would like to change this and be able to start X by myself if I like to do it. Any way to accomplish this?
I presume it is in one of the scripts started by inittab that X is called. But which one. There are plenty of them.
root@debian:/etc/rc4.d# v
total 0
lrwxrwxrwx 1 root root 17 May 30 14:57 S01anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 22 May 30 14:58 S01avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 26 May 30 14:53 S01console-setup.sh -> ../init.d/console-setup.sh
lrwxrwxrwx 1 root root 14 May 30 14:52 S01cron -> ../init.d/cron
lrwxrwxrwx 1 root root 14 May 30 14:58 S01dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 17 May 30 14:58 S01lightdm -> ../init.d/lightdm
lrwxrwxrwx 1 root root 25 May 30 14:58 S01network-manager -> ../init.d/network-manager
lrwxrwxrwx 1 root root 17 May 30 14:52 S01rsyslog -> ../init.d/rsyslog
root@debian:/etc/rc4.d#
the line containing connsole-setup.sh and the line containing lightdm look suspicious to me. I read somewhere one has to edit the /etc/default/grub file this way:
Code:
Find this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Change it to:
GRUB_CMDLINE_LINUX_DEFAULT="text"
Update GRUB:
I did it but it had no result though it too said:
Code:
For systems that use systemd
This is an additional step for systemd releases, e.g. Ubuntu 15.04, the steps above for grub are still necessary.
You need to tell systemd to not load the graphical login manager:
sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target
You will still be able to use X by typing startx after you logged in.
However, this is what I got:
Code:
root@debian:/etc/rc4.d# systemctl enable multi-user.target --force
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
instance name specified.
root@debian:/etc/rc4.d#
If that solved it, you can mark it as solved!(!!!). I answered because you profile sez Slackware. For Slackers taking the 4 out of the terminal inits in inittab seems to be the solution.
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 531
Rep:
If you just want to do it as a one-off, then pressing 'e' at grub menu, adding '3' at the end of the kernel line and then f10 will log to a console. It reverts to normal boot next time.
Runlevels 2 through 5 are identical in Debian (and correspond to multi-user mode).
A cursory search suggests that adding text as a kernel command line parameter will force a console boot in the absence of systemd but I haven't tested this (I use systemd in my Debian box).
I would like to do this as well. So what all needs editing? I don't want to issue some command that mysteriously changes something if I decide to change it all back. Also do you just start x to start gui back up? Years ago with kde I think I just typed kde and enter to start it from terminal?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.