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.
Using Mandrake 9.1/KDE, I select 'logout Mike' from the Start menu ... the desktop disappears briefly and I get a quick glimpse of black screen + command prompt. Then KDE reopens. When I select 'logout Mike' a second time I get a dialog box where I can select login as another user, reboot or shutdown. Now I can shutdown OK. Why does it need 2 logouts?
What you're noticing is the multi user environment... the logout function does just that-it logs you out. this is completely different than restarting the computer.
If you were wanting to shutdown the computer, the command from the terminal would be something like "shutdown -h now" while the logout function runs "logout" or "exit"
I believe that you have a graphical login on your machine. The flash is your sync with the X server (the gui) going away and then restarting after you've been logged out.
I realise that the multiuser environment would log me out once, but I had assumed that the GUI would close and drop me to a command line prompt where I could shutdown -h now. But I seem to be logged in twice as Mike ....
I haven't seen that on my system. I can tell you how to work around it if you want. Right click on the desktop and select create new link to application. Under execute, enter "halt". You can select a name like "shutdown" and icon for this link. If you double click on it, the halt comand will immediately shutdown the computer.
The login that you're greeted with will depend on the runlevel in the inittab. runlevel 5 is X11 for most distros (4 for slackware)
If you're wanting a text based login you'll need to change it to 3 which is a console login.
Since you're familiar with the OS think about it this way... if you log in via the console then do whatever you're wanting and then logout you will be greeted with another login window. You won't be able to issue the shutdown command.
Your user session is within runlevel 5 meaning that it stems from within X. When you log out, your user session will be terminated and you'll be sent back to the graphical login.
If you're just wanting console access, without using the X server you should be able to hit ctrl+alt+F2 to disconnect from the server and run whatever command you want. To go back to the X server hit ctrl+alt+F7. (this is default for my RH distro, yours might be different)
OK... I'm sorry, I completely misread what you were typing.
To recap:
1.) Click on K menu and then select "Log off Mike"
2.) X flashes a few times and takes you back to your desktop
3.) Again click on K menu and then select "Log off Mike"
4A.) Get to graphical login where you're allowed to shutdown
OR
4B.) Get to text console where you can issue shutdown command
if this is the case, unfortunately I don't beleive I could help you with that.
Thanks for the tips, guys. I guess I'm too familiar with Windo$e configurations where I'm either using a standalone machine or on a network where I am a client only, and in the latter case the sysadmin shuts down the system. With Linux I'm both a user and sysadmin - yes?? - and so I have to logout/shutdown twice. What confuses me is the fact that I only have to login once .
rhino02ss was mis-reading it, and no you shouldnt have to log out twice. You should simply have to log out of your session with your window manager, and then use the graphical shutdown/restart option.
quatsch - I think you may have hit the nail on the head. If I have auto login running then I have this double logout before I get the graphical shutdown/restart option to which Proud refers. If I boot to command line and load the GUI manually, when I logout from the GUI I revert immediately to the command line. Then I logout as Mike, login as root, then shutdown -h now. Still seems a bit long-winded though.
you don't mind booting to the command line? In that case, you can make the system shutdown by pressing ctrl+alt+del in text mode, and you don't have to be root for this. Look at the file /etc/inittab. There is a line beginning with
ca::ctrlaltdel:
The line tells the system what to do if it catches a ctrlaltdel. In my case it says
ca::ctrlaltdel:/sbin/shutdown -t3 -h now
which will make the system shutdown once ctrlaltdel is pressed.
I think in mandrake you can still use the command halt as a normal user which will shutdown the system (I'm pretty sure this is a bug; shouldn't be that easy to shutdown for a normal user but hey).
I'm using Mandrake 9.1 I went into the root gui configuration and gave my user permission to "shut down" and thought that would "fix" this, it didn't though.
Oh well. At least it actually shut down when I told it to without hanging for two minutes : )
Thanks for that info, quatsch - really helpful. Checked out /etc/inittab as you suggested. Only difference from yours as regards ctrlalt del is a -r instead of -h, so reboot instead of halt. I can change that easily enough. Can also confirm that the halt command works for a normal user. So that's one little niggle fixed.
Next challenge is to try installing the current nVidia drivers. Some fun there, I think, but there seems to be a fair bit of intelligence on file here about it. I'm OK in DOS, but Linux is a whole new command line language which is double dutch to me at the moment ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.