Sunday, May 5, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 83588  / 2 Years ago, thu, october 6, 2022, 2:54:03

When in GUI mode, is there a CLI commands that kills the GUI and drops me into the console?



When in CLI mode, is there a CLI command that drops me into the GUI?



I found startx, but this drop me into the GUI without the unity interface, how do I launch anything?



I found service lightdm start which drops me into the GUI with the unity interface.



I found service lightdm stop which drops me into a blank black screen with no CLI input capability.



I found the Ctl + Alt + F* sends me back between console and GUI, but it does not kill the GUI. I want to kill the GUI if I don't want to use it anymore.


More From » command-line

 Answers
4

To go in tty1 and stop the GUI, run from terminal:



sudo xdotool key Ctrl+Alt+F1 && sudo service lightdm stop


You can test now in the tty1 the fact that the GUI is stopped using:



sudo service lightdm status


Note: xdotool is not installed by default in Ubuntu, so you must to install it first using sudo apt-get install xdotool command.



To start the GUI again from tty1, you can run (as you said):



sudo service lightdm start


If you want also to close (exit) tty1 session, you can use:



sudo service lightdm start && logout

[#26472] Friday, October 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
adedes

Total Points: 454
Total Questions: 114
Total Answers: 111

Location: Turks and Caicos Islands
Member since Fri, May 8, 2020
4 Years ago
;