LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 08-30-2003, 10:21 AM   #1
mhl
Member
 
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91

Rep: Reputation: 15
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?
 
Old 08-30-2003, 11:37 AM   #2
rhino02ss
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Rep: Reputation: 0
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.
 
Old 08-30-2003, 12:11 PM   #3
mhl
Member
 
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91

Original Poster
Rep: Reputation: 15
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 ....
 
Old 08-30-2003, 02:47 PM   #4
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,176

Rep: Reputation: 54
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.
 
Old 08-30-2003, 03:17 PM   #5
rhino02ss
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Rep: Reputation: 0
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)
 
Old 08-30-2003, 03:21 PM   #6
rhino02ss
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Rep: Reputation: 0
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.
 
Old 08-31-2003, 10:19 AM   #7
mhl
Member
 
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91

Original Poster
Rep: Reputation: 15
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 .
 
Old 08-31-2003, 10:25 AM   #8
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
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.
 
Old 08-31-2003, 10:35 AM   #9
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
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.
 
Old 08-31-2003, 11:30 AM   #10
mhl
Member
 
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91

Original Poster
Rep: Reputation: 15
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.
 
Old 08-31-2003, 11:39 AM   #11
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
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).
 
Old 08-31-2003, 11:44 AM   #12
wordthief
LQ Newbie
 
Registered: Aug 2003
Location: Dallas
Distribution: Mandrake 9.1
Posts: 3

Rep: Reputation: 0
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
 
Old 08-31-2003, 04:59 PM   #13
mhl
Member
 
Registered: Aug 2003
Location: Scottish exile in England
Distribution: Mepis, Ubuntu, Mint, virtual Mandriva
Posts: 91

Original Poster
Rep: Reputation: 15
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 ...
 
Old 08-31-2003, 05:02 PM   #14
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
The latest nvidia drivers on a Mdk9.1 system? Try the little guide linked to in my sig. Seems to work perfectly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reboot,shutdown,logout issues in 10.1 Volt Slackware - Installation 3 08-12-2005 11:34 PM
gnome won't logout or shutdown properly RRolleston Debian 0 12-23-2004 05:33 PM
Run commands at logout/shutdown sbaguz Linux - General 2 08-21-2003 11:55 AM
Logout/Shutdown problems in KDE Palarran Linux - General 3 08-05-2003 03:50 PM
Is there any shutdown/logout logs? Cray2 Linux - Software 21 07-28-2003 11:10 AM


All times are GMT -5. The time now is 01:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration