View Full Version : How to restart X server from console

1st December 2004, 09:52 PM
Im new in linux. :D

I want to know how to restart X server from a console, plis.

I try with "/etc/init.d/xfs retart" but don't work. what is the instrucction. :confused:

Thaks. :o

1st December 2004, 10:06 PM
service xfs restart will only restart the X font server. To bring up X, do a startx or telinit 5 for full GUI mode.


1st December 2004, 10:35 PM
If you're already in X and want to restart hit CTRL+ATL+BACKSPACE.

1st December 2004, 10:39 PM
If you're already in X and want to restart hit CTRL+ATL+BACKSPACE.

Yes... but i want to do that from console 1 (if you press Ctrl+Alt+1) Excuse me for my english, but I'm from Spain, and my english is very bad.

2nd December 2004, 12:33 AM
Try Ctrl-Alt-F7

2nd December 2004, 02:01 AM
Try Ctrl-Alt-F7

Thanks again, but i want to know how to restart X server from command line. I know that in debian the command is "/etc/init.d/gdm restart" but in FC3 don't work. Anyone know how to do this?


2nd December 2004, 02:33 AM
[me@localhost rc.d]$ which gdm
[me@localhost rc.d]$ gdm restart
Only root wants to run gdm

from what you wrote, i guess you just type as root
> gdm restart

2nd December 2004, 03:51 AM
arpi, This command don't work.

2nd November 2008, 09:35 PM
Create a shell script (RestartX.sh):

sudo kill `cat /tmp/.X0-lock`
~$ nohup RestartX.sh

- OR -

Create some other shell script (Automate.sh):

nohup RestartX.sh
~$ Automate.sh

Best regards,

3rd November 2008, 01:04 AM
You are not being clear as to what you want to do.

Please explain.
Are you starting in X, then getting out of X, then wanting to get back into it?

If so, how do you get out of X?
Right now, we're kind of playing 20 questions. :)

If you explain exactly what you're doing, then the answers will probably tend to be a bit less confusing.


3rd November 2008, 01:25 AM
Dear scottro,

I just wanted to post a working solution to an open problem (reported in 2004 though, nevertheless useful to others and possibly myself after a long period of time ...).

Best regards,

3rd November 2008, 03:10 AM
@birdy, your solution is a good one of course, my question to the OP is more on exactly what is he trying to accomplish as all the answers he's received are correct.

Sorry if it came off (to anyone) as saying, "Your solution is no good."

3rd November 2008, 03:21 AM
You guys really need glasses :) This thread is four years old! If the OP hasn't got it figured out by now he never will. Birdy, I suggest you look carefully at thread dates before posting. While I'm here I also suggest reading the forum guidelines for some tips. Anything over a couple of months old is probably already sorted out.

I'm closing this thread as I'm not into digging up the dead!


3rd November 2008, 03:59 AM
Nope, note that birdy mentioned that it was a very old thread. I'm the one who has to look.
I already wear glasses, but isn't it written somewhere (the Bible?) "They have eyes but do not see."?

3rd November 2008, 04:07 AM
Hi Scott,

I didn't read the posts. There was no need to as the thread was so old and the OP is probably no longer around :D I just saw the original date and the Monty Python scene from The Quest For The Holy Grail (Bring Out Your Dead!) came to mind :p