LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-28-2001, 08:55 PM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 468

Rep: Reputation: 30
Question How to add Shutdown and Restart to the menu in KDE?


Everytime I have to shutdown or restart (from KDE), I first need to log off, and then use the login to either shutdown or restart.
How to add Shutdown and Restart options to the KDE menu?
 
Old 11-29-2001, 12:00 AM   #2
PuterFreaK
Member
 
Registered: Nov 2001
Location: Seattle, WA, USA
Distribution: RedHat Linux 7.2
Posts: 84

Rep: Reputation: 15
Well one way is to open the run dialog (normally Alt-F2) and type 'halt' or 'reboot'.
 
Old 11-29-2001, 01:04 AM   #3
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 468

Original Poster
Rep: Reputation: 30
One disadvantage with the currentl KDE menu is that you first need to log off. That causes the X server to restart (I guess).

GNOME has both reboot and a halt options, though.
 
Old 11-29-2001, 01:46 AM   #4
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by concoran
...That causes the X server to restart (I guess).
Perhaps if you are set up to boot directly into the GUI (runlevel 5); otherwise, KDE's logout just drops you to shell. You're right though- I would think there should be a way to specify halt or restart from within KDE, but I haven't been able to find it...

Anyone?

 
Old 11-29-2001, 01:54 AM   #5
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 468

Original Poster
Rep: Reputation: 30
DMR: default runlevel in SuSE is 3. It doesn't like 5 it seems. Once when I changed that to 5, SuSe refused to boot.
 
Old 11-29-2001, 02:51 AM   #6
oneuponzero
LQ Newbie
 
Registered: Nov 2001
Location: India
Distribution: Redhat, Mandrake
Posts: 12

Rep: Reputation: 0
Lightbulb

try this out - it may not work, but then i don't use the gui much...

can't one create a shortcut / add an item (actually a command) onto the start menu? then when it prompts for the command to execute, type in "halt" or "reboot", as might be the case..
 
Old 11-29-2001, 02:52 AM   #7
oneuponzero
LQ Newbie
 
Registered: Nov 2001
Location: India
Distribution: Redhat, Mandrake
Posts: 12

Rep: Reputation: 0
Lightbulb

try this out - it may not work, but then i don't use the gui much...

can't one create a shortcut / add an item (actually a command) onto the start menu?( there's a wizard to do that, if i remember correctly) in place of the command to execute, type in "halt" or "reboot", as might be the case..
 
Old 11-29-2001, 08:30 PM   #8
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by concoran
DMR: default runlevel in SuSE is 3. It doesn't like 5 it seems. Once when I changed that to 5, SuSe refused to boot.
Oh, right- SuSE differs from the Redhat-based distros. In SuSE, I think runlevel 3 boots directly into X and runlevel 2 should be the shell. Runlevel 5 isn't implemented in SuSE; no wonder your system didn't like it- sorry about that.
 
Old 11-29-2001, 08:48 PM   #9
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by oneuponzero
try this out - it may not work, but then i don't use the gui much...

can't one create a shortcut / add an item (actually a command) onto the start menu? then when it prompts for the command to execute, type in "halt" or "reboot", as might be the case..
That's a possibility, although I haven't tried it yet. One problem I can see is that the halt command can only be run as root (unless you change permissions). Since safe practise is not to log on as root unless absolutely necessary, and changing perms on the halt command could invite trouble, the approach wouldn't work for normal user accounts.
 
Old 11-30-2001, 12:44 AM   #10
oneuponzero
LQ Newbie
 
Registered: Nov 2001
Location: India
Distribution: Redhat, Mandrake
Posts: 12

Rep: Reputation: 0
Quote:
Originally posted by DMR
That's a possibility, although I haven't tried it yet. One problem I can see is that the halt command can only be run as root (unless you change permissions). Since safe practise is not to log on as root unless absolutely necessary, and changing perms on the halt command could invite trouble, the approach wouldn't work for normal user accounts.
the halt command doesn't require root authority(at least on the RH/Mandrake systems i've worked on), although it's a call to the /sbin/init command. In ordinary remote-login environments, halt is commonly used to shut down the client machines, not the server, so i don't think halt/reboot requires one to be root.
 
Old 11-30-2001, 02:27 AM   #11
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by oneuponzero


the halt command doesn't require root authority(at least on the RH/Mandrake systems i've worked on), although it's a call to the /sbin/init command. In ordinary remote-login environments, halt is commonly used to shut down the client machines, not the server, so i don't think halt/reboot requires one to be root.
Om my Mandrake 8 box, halt and shutdown do require that you be root to execute them (as a local user, not remote), although the weird thing is that I don't remember that being an issue with my Redhat 6.2 install. Unfortunately, I wiped Redhat during my last Hardware-Go-Round, so I can't check it out.
 
Old 11-30-2001, 03:33 AM   #12
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 468

Original Poster
Rep: Reputation: 30
Thanks for your efforts and replies, DMR and oneuponzero..

KDE could have added that option by default. I am surprised it isn't there.

Presently in KDE, any normal user has to press the mouse 6 times
in order to shutdown/restart.

In any Linux distro, any user can shutdown the machine (unlike in Unix). So, why not just place a button somewhere at the bottom panel which when pressed, shuts down the machine without hassles?

Last edited by concoran; 11-30-2001 at 11:01 AM.
 
Old 11-30-2001, 10:55 AM   #13
oneuponzero
LQ Newbie
 
Registered: Nov 2001
Location: India
Distribution: Redhat, Mandrake
Posts: 12

Rep: Reputation: 0
got it working!

well, i did get the halt thingie to work!! - on mandrake 8.1, i tried the following..
1. started the menu editor, menudrake, or something like that - right-click on the KDE button and select 'configure'.
2. select add, then type "/usr/bin/halt" or "/usr/bin/reboot" in the 'run command' box.
3. select an icon ( there are a LOT to choose from) for the button, and then click 'save'.

You're done!

(BTW, the fact that these executables lie in/usr/bin, as opposed to /sbin or /usr/sbin, do show that they are user-executable.)

well, all's well that ends well!
 
Old 11-30-2001, 11:13 AM   #14
Will
Member
 
Registered: Aug 2001
Posts: 73

Rep: Reputation: 15
I don't know if your using it but if you can get a hold of KDE 2.2.1 or there abouts it has those options in the Gui when you select logout from any users Gui. Logout, Reboot, Halt. To date I have not had any problems with it.
 
Old 12-01-2001, 09:53 PM   #15
rolf
Member
 
Registered: Jul 2001
Location: Oakland, CA
Distribution: Mandriva 2010.2 x86_64
Posts: 186

Rep: Reputation: 33
I made two icons:

Right-click the desktop, create new link to application, name HALT!, execute halt -n for shutdown; name REBOOT!, execute shutdown -r now for reboot; choose appropriate names, icons. Quick and easy.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub menu: restart/shutdown? pcandpc Linux - General 4 08-06-2005 10:43 PM
Removing Shutdown/Restart From Log Out Menu Guru3 Red Hat 0 07-03-2004 05:59 PM
Add KDE menu in Gnome start menu melinda_sayang Slackware 2 03-06-2004 05:26 AM
How to add KDE menu items to Gnome menu... QtCoder Linux - General 4 10-05-2003 01:21 PM
Shutdown, restart menu gone Tec1 Linux - Newbie 3 08-12-2003 02:59 PM


All times are GMT -5. The time now is 07:14 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