Problem logging out of KDE (Linux Mandrake 6.5)

I bought Linux 6.5 yesterday, read the book and installed. Its setup to use KDE. When I logout of KDE my computer goes to sleep, not a command line. When I reboot to Linux it complains and runs fsdsk (or whatever it's called). Tried using shutdown (-r now|-h now) from a console window, same thing.

How can I go from KDE to a shell, how can I logout/reboot gracefully? (New IBM Aptiva 7172/60A)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

savage011200Author Commented:
Jan LouwerensSoftware EngineerCommented:
I use KDE, and I usually just use CTRL+ALT+Backspace to exit to a shell
savage011200Author Commented:
Thanks, I'll try that. I don't think its in the book :(
(I have RTFM <g>)
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

u have xdm enabled remove it
Using CTRL-ALT-BS just kills your Xserver hard, do that only in emergencies. Also, just rebooting (I presume power cycle or hard reset) is a *BAD THING* on Unix boxen; eventually you'll break some filesystem and lose data.

The easiest way to get a virtual console from X is typing CTRL-ALT-F1 for first virtual terminal, CTRL-ALT-F2 for second and so on. The X server lives on F7. Once out of X, ALT-Fx changes virtual terminals. If you don't want a KDM-Login (this is the KDE equivalent to xdm), type

init 3

in a virtual terminal. X will go down. On next reboot (type "reboot" or "halt" for that) however, X will come up again. To change that once and for all, you'll have to edit /etc/inittab. Careful there, or your Linux won't boot correctly! There's a line that reads


Change that to


and X won't come up on reboot. If you want to use X now,

startx &


init 5

"startx  &" starts your desktop without requiring another login, "init 5" does.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
savage011200Author Commented:
Thanks, I think I can follow your answer, but I'm completely unfamiliar with Linux/Unix so some of the terms (X, KDM, Virtual terminal) are greek to me. I'll look at the eDocs. RAKS04 suggested I disable XDM. Have you just explained how to do that?!

Thanks again.

Laurie Savage
Hmmm, in a way, yes, but not completely... This is a bit complex, but I'll try my best.

Let's begin with those terms.

Virtual terminal -- Once upon a time B-) UNIX boxen only had terminals, connected to the computer by a serial interface. Most of those terminals were pretty dumb, they could only display characters that were send to them on screen and send characters that were typed in to the computer.
PCs, on the other hand, have a graphics card and can talk to the keyboard directly. So, Linux, being a UNIX derivative, emulates a terminal (thus having a Virtual terminal). But they get even more virtual B-), as there is not only one, but up to twelve of those virtual terminals, accessible via ALT-Fx. Just like having up to twelve real terminals, without the hardware clutter.

X -- Terminals are great, but a GUI makes some tasks easier. The X server is the program that knows how to talk to your graphics card to to switch from text to graphics mode, change resolution, draw lines etc. It even provides windows, but not as you might use the term. Close buttons, title bars and so on are not provided. For those
little things you need a

Window Manager -- This program provides th look & feel. As you use KDE, your window manager is kwm, the KDE window manager.

KDM -- Is the KDE Display Manager. Always having to start X by hand (typing "startx") quickly becomes a drag, if that's your preferred environment. kdm (or xdm if you do not use KDE) starts X for you, but requires a login.

I hope we'll have those terms sorted out. Now, what did I tell you to do?

Hm, some more basics first. A Linux box has several distinct run levels. Runlevel 0 stands for shutdown, Runlevel 6 stands for shutdown & reboot. Runlevel 1 is Single User Mode for maintenance and repairs. Runlevels 2-5 are Multiuser Mode, "normal" run state for a UNIX box. Runlevel 2 is "No network, but ordinary users can log in via modem/terminal", Runlevel 3 is "Network and network services active, but no X" and runlevel 5 is "Network and X active". Further explanations await you by reading "man init" and "man inittab".

Doing "init 3" tells your box to go into runlevel 3, shutting down X but leaving the network active. You can shutdown your computer by typing "init 0" instead of "halt", too. So doing "init 3" effectively disables kdm, yes.

But I told you that if you reboot, X will come up again. The reason for that is the "initdefault" entry in /etc/inittab, which tells init which runlevel to boot into. If that line reads


you're booting into runlevel 5, with an active kdm. If you change that to


you will boot into runlevel 3, without kdm and therefore without X.

But again: *BE CAREFUL* when editing /etc/inittab! An error can stop your computer from booting, and then you'll have to boot from floppies, mount your linux partition and repair /etc/inittab. Always make backups first! A simple

cp /etc/inittab /etc/inittab.bak

will suffice.

Hope I didn't confuse you too much B^).
savage011200Author Commented:
Ctrl - Alt Fx gets me out of a KDE session, and then my computer goes blank (with the fans still on) if I reboot I have to fsck! I can reboot or shutdown quite successfuuly if I am at a text based command line not in a KDE session. But I can't exit KDE gracefully. I want to work in a GUI rather than text shell - graphics, web design etc.

This is confusing!! my email is
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.