You are not logged in.
Hi,
What is the fastest and cleanest way to enable/disable the Command Line Interface on startup? I got my bunsenlabs server configuration dialed in and wanted to disable the GUI for personal reasons. I prefer to not completely remove the packages.
Thanks,
BBH
Offline
sudo systemctl isolate multi-user.target
to get to CLI
sudo systemctl isolate graphical.target
to get to GUI
sudo systemctl set-default multi-user.target
to boot to CLi by default
Last edited by el_koraco (2016-02-22 21:38:44)
Offline
addition:
if you like it that way (booting into cli, starting gui only when needed)
you won't really be needing your display manager, you can start X manually (startx); then only the last (of the previous three) commands is relevant.
Offline
addition:
if you like it that way (booting into cli, starting gui only when needed)
you won't really be needing your display manager, you can start X manually (startx); then only the last (of the previous three) commands is relevant.
Hmm if one were to do this...but use startx without a dm, how would you then return to the cli only session? Would you have to manually stop X from running? Or would the systemctl isolates still work?
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
would the systemctl isolates still work?
`systemctl isolate multi-user.target` works for me when not using a display manager.
Also, bl-exit still works without a display manager 8)
Offline
Hmm if one were to do this...but use startx without a dm, how would you then return to the cli only session?
killall openbox ]:D
Offline
Horizon_Brave wrote:Hmm if one were to do this...but use startx without a dm, how would you then return to the cli only session?
killall openbox ]:D
Well, it's not like SIGTERM is generally a bad thing. SIGTERM := Please exit gracefully, and I don't want to repeat myself.
Offline
Horizon_Brave wrote:Hmm if one were to do this...but use startx without a dm, how would you then return to the cli only session?
killall openbox ]:D
Ahh, so basically once you startx, the main way to return to the cli is to kill whatever desktop/window manager is in use right? And if you're running with a display manager such as LightDM, you would kill the DM instead correct? Why is there no "clean" script to stop whatever window manager/DM is in use...like a "Stopx" script?
Last edited by Horizon_Brave (2016-02-22 16:46:29)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
... Why is there no "clean" script to stop whatever window manager/DM is in use...like a "Stopx" script?
Go to TTY1 and do
sudo systemctl stop lightdm.service
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^ in spectrwm shift+super+Q is the shortcut to close the wm. (dropping back to CLI).
I guess 'stopx' would be exactly that, Stop X, rather than shut down the wm (each of which will have different ways of doing things).
I presume there will be a stopOpenbox command somewhere, you just need to add it to a shortcut key combo. Or, kill openbox would suffice.
Edit: holy crap, this is my first post here! How unsocial of me...
Last edited by mf_social (2016-02-22 16:55:07)
Offline
Horizon_Brave wrote:... Why is there no "clean" script to stop whatever window manager/DM is in use...like a "Stopx" script?
Go to TTY1 and do
sudo systemctl stop lightdm.service
hmm Actually I found something interesting with this...
Okay, I booted up BL, it prompts me to login with lightdm. I get into Openbox etc..
I then run
sudo systemctl stop lightdm.service
This kills the graphical session. No big surprise there. But the "problem" is that is at least for me, it drops you to a black screen. It's just a black cursor that is unresponsive.The only way I get back to the openbox session, is to switch to a new tty, like tty2 or 3, and then switch back to tty1. So if I do the systemctl stop lightdm, my session ends and 'freezes' at a prompt. THen I have to do ctl+alt+f2 to switch to another tty, then switch back to tty1. Once I do this, I'm back at my openbox session as if nothing happened. But I don't think that I should have to switch TTY's. If I use the systemctl command to stop lightdm.service, it should kill lightdm, but should it really send me to an unresponsive prompt? I'd expect to either be brought to a cli login prompt, or a cli prompt with me still logged in..
I'm using virtualbox so I'm not sure if this is a bug for V.Box or something larger
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Did you log in on tty1 first, then run the command?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
sudo systemctl isolate multi-user.target
to get to CLI
sudo systemctl isolate graphical.target
to get to GUI
sudo systemctl set-default multi.user-target
to boot to CLi by default
When I do:
sudo systemctl set-default multi.user-target
To try to get CLI to launch up on default.
I received this message after executing the command:
Failed to set default target: No such file or directory
^^^ I tried it in TTY1. Same deal.
sudo systemctl isolate multi-user.target
Took away the GUI that's for sure but I'm stuck on a black screen that looks like this:
_
sudo systemctl isolate graphical.target
Works like a charm when I'm in TTY1 trying to get back to GUI!
Still trying to have it go to CLI without having to press ctrl+alt+f1 at logon (lightdm).
#FirstWorldProblems
Last edited by BigBrownHawk (2016-02-22 20:22:01)
Offline
When I do:
sudo systemctl set-default multi.user-target
To try to get CLI to launch up on default.
I received this message after executing the command:Failed to set default target: No such file or directory
^^^ I tried it in TTY1. Same deal.
There is a typo in your command -- you have a dash where there should be a dot and vice-versa:
systemctl set-default multi-user.target
I'm stuck on a black screen
You're still on TTY7 but there is no X server running, you need to switch to another TTY with <Ctrl>+<Alt>+F{1..6}
Offline
Did you log in on tty1 first, then run the command?
actually.... I goof'd you're right, I was logged into TTY 7 as per normal graphical boot...le sigh!
Last edited by Horizon_Brave (2016-02-22 20:35:56)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
BigBrownHawk wrote:When I do:
sudo systemctl set-default multi.user-target
To try to get CLI to launch up on default.
I received this message after executing the command:Failed to set default target: No such file or directory
^^^ I tried it in TTY1. Same deal.
There is a typo in your command -- you have a dash where there should be a dot and vice-versa:
systemctl set-default multi-user.target
BigBrownHawk wrote:I'm stuck on a black screen
You're still on TTY7 but there is no X server running, you need to switch to another TTY with <Ctrl>+<Alt>+F{1..6}
Good catch on the typo! Can you edit el_koraco's post to save people some trouble thanks.
Offline
I edited it myself
Offline
Why is there no "clean" script to stop whatever window manager/DM is in use?
openbox --exit
but then again, as nobody said, killall isn't really "dirty", either.
unless you have miltiple Xsessions running, but that, too, is easily solved.
Offline