Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 13161  / 2 Years ago, mon, march 7, 2022, 10:50:00

Is it possible to kill the GUI and end up with a CLI since the GUI runs on the top of the shell?



I have check the question below
How to kill and to start the X server?



Magic keys restarted the GUI and I ended up with the login menu but not a CLI
I am using Ubuntu 12.04 , I dont want to use virtual terminal I just want to prove to myself that the GUI runs on top of the shell and I can always exit the GUI to the shell



Thanks


More From » xorg

 Answers
4

To shut down your X session type in the command line:



sudo service lightdm stop


So you will end up in the virtual terminal #7. You then can hit Ctrl+Alt+F1 - Ctrl+Alt+F6 to get a login prompt. For terminal #7 (Ctrl+Alt+F7) there is no tty started because it's meant for the x server.



Edit:



If you want to end of in a shell, then create a file called /etc/init/tty7.conf with content:



# tty7 - getty
#
# This service maintains a getty on tty7 from the point the system is
# started until it is shut down again.

start on runlevel [23] and not-container

stop on runlevel [!23]

respawn
exec /sbin/getty -8 38400 tty7


After creating this file reboot the system, and then when you perform sudo service lightdm stop you will end up in a login shell.


[#28502] Monday, March 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mugustered

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
1 Year ago
;