LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2010, 03:17 PM   #1
Aggnavarius
LQ Newbie
 
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
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.
 
Old 06-09-2010, 03:48 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Press ctrl+alt+f1? Then log in and /etc/init.d/gdm stop ?
 
Old 06-09-2010, 04:07 PM   #3
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,796

Rep: Reputation: 213Reputation: 213Reputation: 213
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.

Last edited by thorkelljarl; 06-09-2010 at 04:12 PM.
 
Old 06-09-2010, 05:09 PM   #4
Revery
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 1
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.
 
1 members found this post helpful.
Old 06-09-2010, 05:28 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Or, last time I tried, just press Ctrl-Alt-Backspace (while in an X window). This kills X immediately.
--- rod.
 
Old 06-09-2010, 06:23 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Quote:
Originally Posted by theNbomr View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sql: server crash forced the move of an innodb table. now can't dump the db. BrianK Linux - Server 6 10-29-2009 12:18 PM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 05:14 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 05:13 PM
Log Out a Specific User (KILL) carlosinfl Linux - General 8 08-29-2007 11:53 AM
forced to log in to failsafe k61824 Linux - Software 1 01-19-2007 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration