Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know about startx, but is there a command that stops X? I run Ubuntu 10.04.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

X is currently handled by gdm (Gnome Display Manager). The "proper" way for starting, stopping and restarting the graphical server is:

sudo stop gdm
sudo start gdm
sudo restart gdm

Commands like startx aren't recommended as they're not setting important environment variables or neccessarily pulling in the right configuration. Using startx instead of gdm also makes it harder to close ;)

share|improve this answer
    
If gdm is used. Otherwise substitute gdm with kdm (in case of Kubuntu) –  txwikinger May 17 '11 at 17:51
    
I use kdm. Thanks for the help, now I don't need to use a GUI all the time! –  Ryan Hoots May 17 '11 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.