LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-03-2004, 03:54 PM   #1
dvm
Member
 
Registered: Sep 2004
Posts: 62

Rep: Reputation: 16
button for closing the computer


Hi to everyone. I've used Slackware for a month now and I'm quite happy. Seeing dvd's and everything. I'd like to ask for some help in a couple of things.
First, as the subject of the thread says how can I make a button for closing the computer, without asking the root password. Should I suid the halt command? Can I then add it to the buttons in KDE's taskbar? What is the danger of suid-ing my halt?
Second, how do I change the login manager? Currently I think I have the X login manager with a nice flower. I'd like to use KDE's login manager as I can customize it more easily.
Thanks in advance.
 
Old 11-03-2004, 05:03 PM   #2
slackwaregeek
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware 10.2
Posts: 20

Rep: Reputation: 0
Re: button for closing the computer

Quote:
how do I change the login manager? Currently I think I have the X login manager with a nice flower. I'd like to use KDE's login manager as I can customize it more easily.
I'm assuming you already changed your /etc/inittab to runlevel 4. Runlevel 4 should boot GDM, if not installed, then KDM, if neither installed, then XDM. If you didn't edit /etc/rc.d/rc.4 then I don't know why you have xdm. If you can post your /etc/rc.d/rc.4 then I can probably help.

As for the shutdown button, there is a lock/logout applet for the KDE panel. It brings up the logout menu, which should have a choice to shutdown.
 
Old 11-03-2004, 05:20 PM   #3
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
1:
Make sure that the reboot/halt commands are in your path, either that or call them with their complete path (ie /sbin/halt). SUID shouldn't be a problem.

2:
If the file /etc/sysconfig/desktop exists, edit it.
If not, then try /etc/X11/default-display-manager.
Or, alternatively, check which display manager is called with your init scripts - check which one is linked, so for example you may have a symlink from /etc/rc4.d/S99xdm to /etc/init.d/xdm. If this is the case, just create a new link to your preferred login manager and unlink this one, so for example, you'd create a symlink ln -s /etc/init.d/gdm /etc/rc4.d/S99gdm and then [b]unlink /etc/rc4.d/S99xdm[/i].

HTH
 
Old 11-03-2004, 06:01 PM   #4
dvm
Member
 
Registered: Sep 2004
Posts: 62

Original Poster
Rep: Reputation: 16
Ok, nailed the KDM login, just moved up the lines for kdm in rc.4.
The problem with halt reboot remains. Even if I call them like:
/sbin/reboot, I get reboot: must be superuser.
That's why I'm thinking suid. Is this the way distros like SuSE and RedHat do it?
The button that logs out in KDE has only 2 options. Logout/Cancel.

Edit: woooo, strike out the last sentence. It seems that the 2 options presented was because I had gdm or xdm. Now that I have kdm shutdown and reboot just became an option

Last edited by dvm; 11-03-2004 at 06:03 PM.
 
Old 11-05-2004, 10:49 AM   #5
RDCC
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Lightbulb Shutdown

Consider using sudo instead or suid-ing
this would be a safer option
 
  


Reply



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
Is there any way to turn off the computer power without pushing the button? Necronomicom Slackware 11 02-27-2006 03:50 AM
Press power button can't turn down the computer shadkong Linux - Hardware 2 05-04-2005 09:50 PM
Power button shuts down computer? kaega2 Linux - Software 0 01-08-2004 06:32 PM
power button turns computer off kaega2 Linux - Hardware 8 12-15-2003 08:59 AM
ACPI: shutdown computer by pushing power button... elluva Mandriva 10 12-15-2003 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:35 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration