Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to know how to close xwindows and run my box from the command prompt. My system boots into x windows and that's fine but once i am in it how do I shut down it down? I did a killall x but that did not seem to stop it.
Originally posted by Joshsawyer77 I need to know how to close xwindows and run my box from the command prompt. My system boots into x windows and that's fine but once i am in it how do I shut down it down? I did a killall x but that did not seem to stop it.
Open the xterm (or any shell you have) and type telinit 3 or init 3 as **root** to go to runlevel-3.
If you don't want X to start at boot, then as MasterC said, change the run-level in your /etc/inittab file to 3. Run-level 3 will start all services (incl. network services) but WILL NOT start X.
IMHO one needs to be careful before issuing any kill command, its not to be trifled with. Please the read the manual for kill before you start killing
Originally posted by iceman47 If you manually started X (startx) then the fastest way (imho) to shut it down again is to press <ctrl><alt> and <backspace> together.
that never worked for me.
KDE on my RH8 does not put me at init3 with Ctrl+Alt+Backspace. The key-combo *restarts* X instead of *shutting* it down. Worse, sometimes the system crashes leaving me with a blank screen and blinking Caps- & Scroll-lock LEDs. Then I end up doing a cold reboot
Truth is, I've never bothered to find out why coz I got used to init3 or Alt+F1...F6
Restarting or killing X with CTRL ALT BACKSPACE is related to which run level you boot into. That's why iceman47 said if you manually start X (with startx) then you can kill it with CTRL ALT BACKSPACE. This is in runlevel 3 on most distros. If you are runlevel 5 in most distros, which usually is the X runlevel, then all this will do is restart the X server. Apparently, not the best way, as you have sadly seen with your cold boots.
Originally posted by MasterC Restarting or killing X with CTRL ALT BACKSPACE is related to which run level you boot into. That's why iceman47 said if you manually start X (with startx) then you can kill it with CTRL ALT BACKSPACE. This is in runlevel 3 on most distros. If you are runlevel 5 in most distros, which usually is the X runlevel, then all this will do is restart the X server. Apparently, not the best way, as you have sadly seen with your cold boots.
/me chagrined for missing the obvious & bangs head against the wall.
thanks MasterC for the explanation.
Quote:
Apparently, not the best way, as you have sadly seen with your cold boots.
Could you please offer any clues for these intermittent crashes or maybe direct me to where I can find some answers. The logs don't indicate any thing about the crash.
These days, I telinit 3 and then shutdown -h now to avoid the crashes.
That's a lot of work for a powerdown. Not exactly a fix, but an alternate solution:
You could alias your process. If you telinit 3 then shutdown -h now, you could add something like:
alias halt='telinit 3 && shutdown -h now'
to your .bashrc file. Then you'd just have to have a term window open and, as root, type "halt". Although, I am not sure how great that'd work, it might save you some time.
Your X server crashing from a restart though, I really wouldn't even know where to point you. A search on it seems to bring up a lot of people talking about Nvidia though, so maybe if you run a card with an NV chip, that could be the problem. Maybe a driver update/upgrade would do the trick? Just some suggestions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.