LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   exiting x server (https://www.linuxquestions.org/questions/linux-software-2/exiting-x-server-111252/)

zexter 11-01-2003 06:56 PM

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?



thanks

spuzzzzzzz 11-01-2003 07:42 PM

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

trickykid 11-01-2003 07:43 PM

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.

rubyrat 11-01-2003 08:09 PM

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.

zexter 11-01-2003 08:14 PM

spuzzzzz can u please elaborate a little more...im very new

spuzzzzzzz 11-02-2003 12:14 AM

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.'


All times are GMT -5. The time now is 10:30 AM.