Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-01-2003, 06:56 PM   #1
Registered: Oct 2003
Location: Saint Louis, Missouri
Distribution: Mandrake 10 Official
Posts: 210

Rep: Reputation: 30
exiting x server

when im in root and trying to install my graphics drivers, i starts up but then tells me i need to exit or disable my x server..... i dont even know what that is, i tried doin it thru failsafe, and it still gave me the error.... can someone please tell me how to close my x server?

Old 11-01-2003, 07:42 PM   #2
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
1) press ctr-alt-F1 to open a vitual console. login as root.
2) type "ps -A" to list all the active processes
3) type "kill <psid1>; kill <psid2>; ........" where the <psidX>'s are all the process numbers that are related to X. examples of X-related processes are: X (duh!), xinit, gdm, xdm, xfs, kdm.
4) install the drivers
5) start x by typing "xdm" or "gdm" or "kdm" depending on which desktop manager you like to use
Old 11-01-2003, 07:43 PM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
Enter runlevel 3 by typing init3 or if you start X by typing startx at a console, you can do a ctrl-alt-backspace to kill the X server.

The X server is the GUI that your working in.
Old 11-01-2003, 08:09 PM   #4
LQ Newbie
Registered: Sep 2003
Location: Leeds, UK
Distribution: Debian, Redhat, Mandrake, Gentoo
Posts: 16

Rep: Reputation: 0
X is the set of programs and utilties that draws pretty stuff on the screen like the mouse, graphics and windows.

You have posted very little information so to clarify this is what would have been useful to give a useful answer.

1) You mention a driver? What driver is this and why/how are you installing it?

2) Which distribution/type of linux is this?

3) The failsafe kernel? This should start at runlevel 1 or 2 and thus no X. Sounds more like the error is a little more complicated than you are already running X please stop it.

4) Post the error from /var/log/XFree86.0.log or XFree86.log or log names to that effect different distributions have different log names in the interests of ease of use.

5) Did X ever work before you attempted to install a driver? i.e. did you see a mouse cursor and pictures and graphics and windows and things like that. Not a console that looked all dos like - that is linux's natural state and is called a console terminal.

6) Who supplied the driver - manufacturer, the linux user next door, random website e.g. sourceforge. Many "drivers" are unstable or rubbish or both e.g. nvidia's attempts. Before doing any "upgrades" of your drivers always read up on the subject - you might not be doing your machine any favours and the driver you have might be the better one. This isnt like the windows continual upgrade dance. I have servers running the same drivers for years and years with no errors or problems other than the odd security patch.

7) Are you by any chance actually running X and in fact trying to reconfigure X whilst running X. Not a good idea. Try pressing the control key and the alt key and F1 all at the same time its a lot like the microsoft ctrl+alt+del 3 fingered salute you have to do to use word or excel or outlook or whatever but here you get a "console" login and then you can disable X from there (as described below). Do the install of your driver - although if you are already running X why fix it? Dont mess with things you arent ready for. Unless you want to - its a great way to learn - just make sure you arent working for an isp/os manufacturer and its not a router and its not running a chunk of the US of A's internet.

_Stopping X_

Could be many things to stop X - in the interests of making things easier different linuxes run X differently.

You must be logged in as root to do this.

If its debian then try one of these:

/etc/init.d/xdm stop
/etc/init.d/gdm stop
/etc/init.d/kdm stop

If its mandrake then try:
/etc/init.d/dm stop

Also the failsafe option still starts x.

Try dropping to a state that doesnt have x.

type init 1 as root and then do your x configuration this should stop all x and networking and everything.

Post more information if that doesnt help.
Old 11-01-2003, 08:14 PM   #5
Registered: Oct 2003
Location: Saint Louis, Missouri
Distribution: Mandrake 10 Official
Posts: 210

Original Poster
Rep: Reputation: 30
spuzzzzz can u please elaborate a little very new
Old 11-02-2003, 12:14 AM   #6
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
In linux, you have seven 'virtual consoles.' One of them is graphical (ie. it has a mouse and pictures and windows and stuff). The other six are text-only (ie. there's a command line and you type stuff into it). In order to switch from one 'virtal console' to another, press Ctrl+Alt+Fx, where Fx is one of the function keys from F1 to F7. Ctrl+Alt+F7 always gets you into the graphical console.

'X' is a program that controls the graphics server. If you want to, for example, install new video drivers, you have to stop X temporarily. In order to stop X, you have to use one of the other virtual consoles. Switch out of the graphical console by pressing Ctrl+Alt+F1. You should get a login prompt. Login as root.

Once you're logged in as root, you have to stop X. The best way to do this is probably the way trickykid suggested. Type 'init3' at the command line. You can check if it has worked by pressing Ctrl+Alt+F7. If all you get is a blank screen, X is stopped.

If that doesn't work, you can stop X by killing all X-related processes. Typing 'ps -A' at the command line lists all the processes that are currently running. Each process has a process id, or 'pid', which consists of a number. Typing 'ps -A' will tell you the number of each process. You can then end the process by typing 'kill <pid>' where <pid> is the process id of the process you want to kill. Since the graphical environment uses many processes simultaneously, it is not eough to just kill one of them. If you do, the other processes will probably cause X to restart. So you need to kill all the relevant processes at the same time. To do this, type 'kill <pid1>; kill <pid2>; kill <pid3> .......;kill <pidx>' where the <pid>'s represent the process id's of the various processes you need to kill. The dots are there because I don't know how many processes you will have to kill; don't type in the dots! Look for processes named X, xinit, xfs, xdm, kdm or gdm. All of these work with X and they all must be killed! MUWAHAHAHAHAHAHA! If X restarts after you have killed all these processes, there are probably some other processes that need to be killed. As a general guess, try killing processes that have an 'x' in their name. Don't do that unless everything else has failed, however, because you might kill something important.

Once X has stopped, install anything you need to install. You can restart X by typing 'xdm' or 'kdm' or 'gdm.'


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
exiting x-server Shin Natsume Linux - Newbie 2 04-01-2005 01:56 AM
Exiting X server Thommy Mandriva 6 02-02-2005 02:12 AM
Exiting X server arcpromo Linux - Software 1 08-14-2004 06:05 PM
Exiting X server to install nvidia driver odogg Linux - Newbie 1 11-26-2003 12:05 PM
Exiting the X-Server? Genesis Linux - Newbie 24 10-22-2003 12:27 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:55 AM.

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