LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to kill X server without being forced to log out (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-kill-x-server-without-being-forced-to-log-out-813204/)

Aggnavarius 06-09-2010 02:17 PM

How to kill X server without being forced to log out
 
Hi, I'm having trouble killing X server and keeping access to the console. I'm trying to install an Nvidia driver so that I can use OpenGL with Geant4. To install the driver, I need X server to be off.

I Googled, and found a lot of things about runlevels that no longer apply in 10.04, since inittab has been removed, and that the runlevel now defaults to 2.

I tried CTRL + ALT + Backspace, but that just boots me to the GUI login prompt. In earlier versions of Ubuntu, I would set the default runlevel to 3, but since I'm already at 2, that seems to be as low as I need to go.

I tried it in runlevel 1, but the installer warned me about the possibility of needing daemons that would otherwise be running.

So in summary, I just need to be able to kill the X server and keep using the console on the current run level. If anyone knows how I can do that in 10.04, I would be grateful.

AlucardZero 06-09-2010 02:48 PM

Press ctrl+alt+f1? Then log in and /etc/init.d/gdm stop ?

thorkelljarl 06-09-2010 03:07 PM

init 3...

Open a terminal and use the command "sudo init 3". You should then be in runlevel 3, that is in console mode with X halted. However, you will have to log in again, either as an ordinary user or su.

Revery 06-09-2010 04:09 PM

While init levels are an option, the smoothest is to use the provided consoles using the ctrl+alt keys as listed above. CTRL+ALT+F1-F6 are 6 terminal logins which will persist through UI reboots (killing X and restarting). CTRL+ALT+F7 is your UI. Additionally CTRL+ALT+F1 is the console that displays the output during machine startup.
I've done this many times before (applying nvidia upgrades) and even gone so far as to script it, but basically in that console you wanna
Code:

pkill gdm
pkill X
sh ./NVIDIA-installer-version-here-etc.bin
sudo gdm &

Then you use use those hotkeys to go back and forth between your "permenant" terminal and your UI.

theNbomr 06-09-2010 04:28 PM

Or, last time I tried, just press Ctrl-Alt-Backspace (while in an X window). This kills X immediately.
--- rod.

AlucardZero 06-09-2010 05:23 PM

Quote:

Originally Posted by theNbomr (Post 3998288)
Or, last time I tried, just press Ctrl-Alt-Backspace (while in an X window). This kills X immediately.
--- rod.

Then *DM immediately restarts it.


All times are GMT -5. The time now is 08:41 AM.