Re: disable GUI/X?
On 19/06/24 at 04:24, David Chmelik wrote: How can I disable GUI/X for next boot? I just want to run it when I decide as startx/startxfce/etc. When I occasionally need to boot in the CLI instead of the GUI I boot the system in "recovery mode", it's an option of the GRUB's menu shown at boot time in "Advanced options for Debian" menu. Then, after given the root's password, I switch to multi-user target with the command: ~# systemctl isolate multi-user.target When you end jobs with the CLI you can switch to the GUI with "startx". To enable "recovery mode" in GRUB you need to edit /etc/default/grub file and comment out the line: #GRUB_DISABLE_RECOVERY="true" It's a default setting, so it should be already comment out. Cheers, -- Franco Martelli
Re: disable GUI/X?
David Chmelik wrote: > On Wed, 19 Jun 2024 08:47:58 +0200, tomas wrote: > > On Wed, Jun 19, 2024 at 04:39:50AM -, David Chmelik wrote: > >> On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: > >> > David Chmelik composed on 2024-06-19 02:24 (UTC): > >> > > >> >> How can I disable GUI/X for next boot? I just want to run it when I > >> >> decide as startx/startxfce/etc. > >> > > >> > # systemctl get-default [...] > > > >> What about in the case I use SysVInit so don't have systemctl? sudo update-rc.d lightdm disable
Re: disable GUI/X?
David Chmelik composed on 2024-06-19 08:40 (UTC): > On Wed, 19 Jun 2024 01:06:04 -0400, Felix Miata wrote: >> Slackware uses 4 instead of 5 but otherwise is the same, and still >> focused on SysV. > That's what I wish I could've set in Debian. Ask in a Devuan forum. By now I would suppose they would have something simple to correlate to appending a 3. Could it possibly have switched available levels to 0 1 2 3 5 6 by now? Another thought: depending on what is desired from running the special boot, many systems' graphics for X will be unable to start if KMS is disabled. One could boot with nomodeset, i915.modeset=0, radeon.modeset=0, amdgpu.modeset=0, etc. appended to bootloader's linu line. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata
Re: disable GUI/X?
El Wed, 19 Jun 2024 08:47:58 +0200 va escriure el següent: > On Wed, Jun 19, 2024 at 04:39:50AM -, David Chmelik wrote: > > On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: > > > > > David Chmelik composed on 2024-06-19 02:24 (UTC): > > > > > >> How can I disable GUI/X for next boot? I just want to run it > > >> when I decide as startx/startxfce/etc. > > > > > > # systemctl get-default [...] > > > What about in the case I use SysVInit so don't have systemctl? > > Then you have an /etc/init.d/xdm (or gdm, or..., depending on your > display manager). And, if you don't feel like managing it manually, > you have update-rc.d, which comes with a manual page. > > Cheers Just mv softlinks in /etc/rc*.d/ that begins with uppercase to lowercase. In my case, S04lightdm -> s04ligthdm. But many time ago I removed completely lightdm and any session manager. If I want X session, I start with xfce4-session, in my case. Thus, I run X without root privileges.
Re: disable GUI/X?
Just remove any login-manager like gdm, kdm, sddm and lightdm. For testing purposes, you can eaily remove the binaries below /usr/bin/ to somewhere, for example to /root/. Then reboot and it will not boot into X. Startx will work. And if this is not what you want, just move the binaries back to /usr/bin/, reboot and X is starting at boot again. Hope this helps. Best Hans > >>> # systemctl get-default # reports bootup state # systemctl set-default > >>> graphical.target sets GUI as default state # systemctl set-default > >>> multi-user.target brings system up without GUI running > >>> > >>> For a single boot to finish at multi-user, simply append 3 to the end > >>> of the (usually wrapped) linu line after striking E key at the default > >>> Grub menu selection. If already using multi-user.target default, > >>> append 5 to linu line to get a full GUI boot.
Re: disable GUI/X?
On Wed, 19 Jun 2024 08:47:58 +0200, tomas wrote: > On Wed, Jun 19, 2024 at 04:39:50AM -, David Chmelik wrote: >> On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: >> > David Chmelik composed on 2024-06-19 02:24 (UTC): >> > >> >> How can I disable GUI/X for next boot? I just want to run it when I >> >> decide as startx/startxfce/etc. >> > >> > # systemctl get-default [...] > >> What about in the case I use SysVInit so don't have systemctl? > > Then you have an /etc/init.d/xdm (or gdm, or..., depending on your > display manager). I know... and? Set them non-executable like in /etc/rc* on older OS? > And, if you don't feel like managing it manually, you have update-rc.d, > which comes with a manual page. [...] I prefer manually, but if multiple steps, am interested in update-rc.d.
Re: disable GUI/X?
On Tue, 18 Jun 2024 22:54:00 -0400, Greg Wooledge wrote: > On Tue, Jun 18, 2024 at 22:39:15 -0400, Felix Miata wrote: >> David Chmelik composed on 2024-06-19 02:24 (UTC): >> > How can I disable GUI/X for next boot? I just want to run it when I >> > decide as startx/startxfce/etc. >> >> # systemctl get-default # reports bootup state # systemctl set-default >> graphical.target sets GUI as default state # systemctl set-default >> multi-user.target brings system up without GUI running >> >> For a single boot to finish at multi-user, simply append 3 to the end >> of the (usually wrapped) linu line after striking E key at the default >> Grub menu selection. If already using multi-user.target default, append >> 5 to linu line to get a full GUI boot. > > Or if you *never* want to use a graphical display manager for login, > just remove the display manager package, whichever one it is. I don't, but except for few days/weeks, won't be the only person using this desktop... that's why I said 'disable' rather than 'remove'.
Re: disable GUI/X?
On Wed, 19 Jun 2024 01:06:04 -0400, Felix Miata wrote: > David Chmelik composed on 2024-06-19 04:39 (UTC): >> On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: >>> David Chmelik composed on 2024-06-19 02:24 (UTC): How can I disable GUI/X for next boot? I just want to run it when I decide as startx/startxfce/etc. >>> >>> # systemctl get-default # reports bootup state # systemctl set-default >>> graphical.target sets GUI as default state # systemctl set-default >>> multi-user.target brings system up without GUI running >>> >>> For a single boot to finish at multi-user, simply append 3 to the end >>> of the (usually wrapped) linu line after striking E key at the default >>> Grub menu selection. If already using multi-user.target default, >>> append 5 to linu line to get a full GUI boot. > >> What about in the case I use SysVInit so don't have systemctl? > > One way, rather extreme but effective, would be to find a distribution > neither systemd nor Debian based. I used them more than 5/9 my life (since 1997): *BSD UNIX & Slackware GNU/ Linux (also Debian sometime 1998-2002, and since 2020 on servers that only run inside OpenVZ) but desktop broke so am temporarily using family spare (not reinstalling... not powerful enough to do much extra... generally not building software/packages, and users don't want operating systems even more difficult when returned). Of course, these older ones are superior due to being strictly UNIX[-like]. I know, but doesn't help meantime. > Many have or had more than Debian's two sustaining runlevels. E.g. > Fedora, Mageia and openSUSE and those much like them before systemd > existed are where those numbers 3 & 5 came from. Whereas in Debian there > were only 1/S and 2 for sustaining runlevels, for simply single and > everything, the others had more granularity: RedHat/Fedora is originator of systemd and those use it, which none originated runlevels. Debian is older than all those. > Slackware uses 4 instead of 5 but otherwise is the same, and still > focused on SysV. That's what I wish I could've set in Debian. > I never did learn any easy way to do as requested in Debian prior to > systemd. I didn't use it much then either. For me, systemd has mostly > been an advantage over SysV tradition. Hasn't for me: a mess (could do paragraph rant why but maybe pointless). Debian documentation says SysVInit is still mostly 'supported'.
Re: disable GUI/X?
On Wed, Jun 19, 2024 at 04:39:50AM -, David Chmelik wrote: > On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: > > > David Chmelik composed on 2024-06-19 02:24 (UTC): > > > >> How can I disable GUI/X for next boot? I just want to run it when I > >> decide as startx/startxfce/etc. > > > > # systemctl get-default [...] > What about in the case I use SysVInit so don't have systemctl? Then you have an /etc/init.d/xdm (or gdm, or..., depending on your display manager). And, if you don't feel like managing it manually, you have update-rc.d, which comes with a manual page. Cheers -- t signature.asc Description: PGP signature
Re: disable GUI/X?
David Chmelik composed on 2024-06-19 04:39 (UTC): > On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: >> David Chmelik composed on 2024-06-19 02:24 (UTC): >>> How can I disable GUI/X for next boot? I just want to run it when I >>> decide as startx/startxfce/etc. >> # systemctl get-default # reports bootup state # systemctl set-default >> graphical.target sets GUI as default state # systemctl set-default >> multi-user.target brings system up without GUI running >> For a single boot to finish at multi-user, simply append 3 to the end of >> the (usually wrapped) linu line after striking E key at the default Grub >> menu selection. If already using multi-user.target default, append 5 to >> linu line to get a full GUI boot. > What about in the case I use SysVInit so don't have systemctl? One way, rather extreme but effective, would be to find a distribution neither systemd nor Debian based. Many have or had more than Debian's two sustaining runlevels. E.g. Fedora, Mageia and openSUSE and those much like them before systemd existed are where those numbers 3 & 5 came from. Whereas in Debian there were only 1/S and 2 for sustaining runlevels, for simply single and everything, the others had more granularity: 1/S-single/recovery 2-multiuser with partial networking 3-full multiuser (everything except X) 4-unused 5-full multiuser plus X Slackware uses 4 instead of 5 but otherwise is the same, and still focused on SysV. I never did learn any easy way to do as requested in Debian prior to systemd. I didn't use it much then either. For me, systemd has mostly been an advantage over SysV tradition. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata
Re: disable GUI/X?
On Tue, 18 Jun 2024 22:39:15 -0400, Felix Miata wrote: > David Chmelik composed on 2024-06-19 02:24 (UTC): > >> How can I disable GUI/X for next boot? I just want to run it when I >> decide as startx/startxfce/etc. > > # systemctl get-default # reports bootup state # systemctl set-default > graphical.target sets GUI as default state # systemctl set-default > multi-user.target brings system up without GUI running > > For a single boot to finish at multi-user, simply append 3 to the end of > the (usually wrapped) linu line after striking E key at the default Grub > menu selection. If already using multi-user.target default, append 5 to > linu line to get a full GUI boot. What about in the case I use SysVInit so don't have systemctl?
Re: disable GUI/X?
On Tue, Jun 18, 2024 at 22:39:15 -0400, Felix Miata wrote: > David Chmelik composed on 2024-06-19 02:24 (UTC): > > > How can I disable GUI/X for next boot? I just want to run it when I > > decide as startx/startxfce/etc. > > # systemctl get-default # reports bootup state > # systemctl set-default graphical.target sets GUI as default state > # systemctl set-default multi-user.target brings system up without GUI running > > For a single boot to finish at multi-user, simply append 3 to the end of the > (usually wrapped) linu line after striking E key at the default Grub menu > selection. If already using multi-user.target default, append 5 to linu line > to > get a full GUI boot. Or if you *never* want to use a graphical display manager for login, just remove the display manager package, whichever one it is.
Re: disable GUI/X?
David Chmelik composed on 2024-06-19 02:24 (UTC): > How can I disable GUI/X for next boot? I just want to run it when I > decide as startx/startxfce/etc. # systemctl get-default # reports bootup state # systemctl set-default graphical.target sets GUI as default state # systemctl set-default multi-user.target brings system up without GUI running For a single boot to finish at multi-user, simply append 3 to the end of the (usually wrapped) linu line after striking E key at the default Grub menu selection. If already using multi-user.target default, append 5 to linu line to get a full GUI boot. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata