Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-30-2003, 11:21 AM
|
#1
|
Member
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91
Rep:
|
Logout twice to shutdown
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?
|
|
|
08-30-2003, 12:37 PM
|
#2
|
LQ Newbie
Registered: Aug 2003
Posts: 19
Rep:
|
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.
|
|
|
08-30-2003, 01:11 PM
|
#3
|
Member
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91
Original Poster
Rep:
|
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 ....
|
|
|
08-30-2003, 03:47 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249
Rep:
|
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.
|
|
|
08-30-2003, 04:17 PM
|
#5
|
LQ Newbie
Registered: Aug 2003
Posts: 19
Rep:
|
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)
|
|
|
08-30-2003, 04:21 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Posts: 19
Rep:
|
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.
|
|
|
08-31-2003, 11:19 AM
|
#7
|
Member
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91
Original Poster
Rep:
|
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 .
|
|
|
08-31-2003, 11:25 AM
|
#8
|
Senior Member
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794
Rep:
|
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.
|
|
|
08-31-2003, 11:35 AM
|
#9
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
if you are using the auto log in feature, it might help disabling it - it looks like a problem with auto log in to me.
|
|
|
08-31-2003, 12:30 PM
|
#10
|
Member
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91
Original Poster
Rep:
|
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.
|
|
|
08-31-2003, 12:39 PM
|
#11
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
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).
|
|
|
08-31-2003, 12:44 PM
|
#12
|
LQ Newbie
Registered: Aug 2003
Location: Dallas
Distribution: Mandrake 9.1
Posts: 3
Rep:
|
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 : )
John
|
|
|
08-31-2003, 05:59 PM
|
#13
|
Member
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91
Original Poster
Rep:
|
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 ...
|
|
|
08-31-2003, 06:02 PM
|
#14
|
Senior Member
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794
Rep:
|
The latest nvidia drivers on a Mdk9.1 system? Try the little guide linked to in my sig. Seems to work perfectly.
|
|
|
All times are GMT -5. The time now is 05:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|