How can I shutdown as a user from KDE?
Perhaps I'm missing the big picture of your actual problem, but when you exit KDE you will see two different dialog boxes depending upon the runlevel from which you started KDE.
If you start KDE from runlevel 3, and start KDE from the command line with startx
(which runs the appropriate xinitrc
script), then when you exit KDE all you will see is a simple exit dialog box and you'll be returned to the command line. From the command line you need root privileges to run the halt
command. In that case you need to modify the sudo
list to allow non-root users to shutdown the box, or you can su -c
If you start KDE from runlevel 4 the KDM login manager controls your KDE session, shutdown, and rebooting. In that mode the shutdown options for KDE are controlled in the Control Center (KControl). The following modifications affect the KDM login manager only, which is run from runlevel 4.
1. Open the Control Center
2. Select System Administration
3. Select Login Manager
4. Select the Administrator Mode
5. Enter the root password.
6. Select the Shutdown
7. For local shutdown select Everybody
If you want to shutdown the box from within KDE, then you should modify the default runlevel from 3 to 4:
1. Obtain root privileges.
2. Use a text editor to open the /etc/inittab
3. Near the beginning of the configuration file, just after the initial comments section, look for two lines that looks like this:
# Default runlevel. (Do not set to 0 or 6)
4. The second line instructs the init
command to boot into runlevel 3.
5. Modify that second line to the following:
6. The second line will now instruct the init command to boot into runlevel 4.
7. Save and exit the file.
By default the system now will now boot into runlevel 4.
I hope this helps.