LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 03-18-2006, 12:18 AM   #1
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Rep: Reputation: 62
How I got XFCE to allow users to shutdown or reboot Slackware 10.2


Hi all,

Just putting this here becuase it took me 4 hours to figure this out

As allways back up first.

1. open terminal as root.
2. type "visudo" and hit enter.
3. use your arrow keys to navigate down to #samples section.
4. use "X" key to get rid of # sign by %users...then when done hit escape key.
5. then go to next line (that is the next line down without anything in it under the users) and hit "i" key to insert the following line:
%users pooter-name=NOPASSWD: /usr/libexec/xfsm-shutdown-helper
6. now hit escape key
7: now type ":"
8. now type w
9. now type ":"
10. now type "q"

Last edited by Old_Fogie; 06-10-2006 at 01:44 AM.
 
Old 03-18-2006, 01:45 AM   #2
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
nice work, but "sudo"
Quote:
with a goofy and hard to use program called "visudo"
seems like it is similar to "vi", vi is powerfull and i like it the most. , u acn start from "vimtutor" then u wil find it easier
Quote:
7: now type ":"
8. now type w
9. now type ":"
10. now type "q"
":wq" wil do the job in a single line-means-write and quit
 
Old 03-18-2006, 12:19 PM   #3
soupnazi.tar.gz
Newbie
 
Registered: Nov 2005
Location: MN, USA
Distribution: Slackware-Current, WinXP Pro SP2
Posts: 20

Rep: Reputation: 0
Where does it say you need to use visudo? I edited my /etc/sudoers, and all of the other config files, with evim.

either way, glad it worked out for you though!
 
Old 03-18-2006, 12:29 PM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
visudo checks the sudoers file after it has been edited for errors and invites you to fix them if errors are found.
 
Old 03-18-2006, 03:07 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
I empathize with Old_Fogie. Although I can more or less use vi/vim when in a pinch, I find all 'nix console text editors to be a Neanderthal joke (See Item No. 1 at A Software Wish List).

I keep a short cheat sheet handy so I can use vim in those few situations when I can't launch X and must edit a file from the console. Otherwise I use Kate to modify all of my config files, including my sudoers list.

As mentioned by phil.d.g, visudo provides some syntax and typo error checking, and that is a Good Thing. However, one can run visudo independently to only check errors (visudo -c) and need not use that Neanderthal tool to actually edit the sudoers file. Read the visudo man page for additional details. Do know that by default the sudoers file is not writeable and users must first chmod +x the file before editing with an editor other than visudo.
 
Old 03-18-2006, 03:34 PM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
I've just read the man page for visudo and you can change the editor used by visudo, in your sudoers file you can put a line
Code:
Defaults editor=/path/to/your/editor
So you get all the benefits of visudo and you get to use your favourite editor. Though, personally I think I'll stick to that "Neanderthal joke" of an editor that goes by the more common name "vi"
 
Old 03-21-2006, 08:13 AM   #7
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
yes i stand corrected.

the program is "VI"

and it is quite goofy

but, interestingly enough I too have found myself using it when at console/tty. it works quite well.

another point of mention; i cannot use "visudo" in mepis even as root. strange.

LOL Woodsman, you should see my notebooks over here, printouts, sticky's
 
Old 03-21-2006, 08:50 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,052
Blog Entries: 1

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by Old_Fogie
yes i stand corrected.

the program is "VI"

and it is quite goofy

but, interestingly enough I too have found myself using it when at console/tty. it works quite well.

another point of mention; i cannot use "visudo" in mepis even as root. strange.

LOL Woodsman, you should see my notebooks over here, printouts, sticky's
Hi,

Some good points! Vi is not goofy if you understand the syntax.
Try the vi tutorial!

I think everyone should at least get the experience with vi,vim or whatever basic text editor to allow edits of config files.

Hey, at times you might not have that X app that you faithfully use to make the task easier on you. Sure I use X and like it for ease of use. But and a big BUT here. You need to be aware of cli usage or you will fall to the use of a poor OS. I want slack to run at the best possible configuration on any machine within my control.

Sure pride is the reason here!

Slackware is my OS rock!
 
Old 03-21-2006, 09:51 AM   #9
WilliamS
Member
 
Registered: Nov 2003
Location: 46N 76W
Distribution: Slackware 14.1
Posts: 375

Rep: Reputation: 31
Am I the only one here who likes MidnightCommander?
I just type mc at the command line as root, and can do anything.
 
Old 03-21-2006, 04:16 PM   #10
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
Quote:
Am I the only one here who likes MidnightCommander?
I just type mc at the command line as root, and can do anything.
I use mc and mc edit. However, because I seldom need to edit files from the console I tend to forget about using the mc editor until I need to manage files from the console. Using mc to manage files is easier than playing command line commando. As I mentioned, I can use vim, but there simply does not exist a console-based editor that satisfies my criteria of an editor. vi/vim/emacs, etc., probably all made sense 20 to 30 years ago, but nobody will convince me that those editors are user-friendly. Still, mc edit is another option to consider.
 
Old 03-22-2006, 10:42 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,052
Blog Entries: 1

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by Woodsman
I use mc and mc edit. However, because I seldom need to edit files from the console I tend to forget about using the mc editor until I need to manage files from the console. Using mc to manage files is easier than playing command line commando. As I mentioned, I can use vim, but there simply does not exist a console-based editor that satisfies my criteria of an editor. vi/vim/emacs, etc., probably all made sense 20 to 30 years ago, but nobody will convince me that those editors are user-friendly. Still, mc edit is another option to consider.
Hi,

Like I said in a previous post an admin needs to be able to use a basic editor. mc seems to meet your needs. As for the 20-30 years ago reference, the core of the thought is to use a simple editor on the cli. No one stated they are user friendly! But if you use them on a regular basis then the ease of use becomes comfortable.

Tell me the first time you used mc you knew it. No mc had a learning curve but the use is intuitive. I don't use mc that often but when I need to the use is easy. I'm comfortable with vi/vim and the layout of my system so the point and click is not that important to me.

Heck, I do some maintenance in X for some of the installations.
But most is cli.

Tools are tools! You should use the one that meets the needs at the time. Be for hardware or software!
 
Old 03-22-2006, 03:04 PM   #12
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by WilliamS
Am I the only one here who likes MidnightCommander?
I just type mc at the command line as root, and can do anything.
OMG I didn't know you could do that hahahahah, remember I'm a month on Linux "nub". I learn-yid sumtin new maw!
 
  


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
/lib/libthread_db.so.1 crashes at shutdown or reboot on Slackware 10.1 with Qt 3.3.4 Basel Slackware 13 07-15-2005 03:03 AM
NEWBIE Slackware 10.0 --> logout shutdown reboot (CTRL-ALT-F2) confused?? koodoo Linux - Newbie 5 06-01-2005 06:21 PM
NEWBIE Slackware 10.0 --> logout shutdown reboot (CTRL-ALT-F2 confused?? koodoo Linux - Newbie 1 05-31-2005 05:51 PM
xfce shutdown sethgeekx86 Slackware 2 04-22-2004 02:49 PM
poweroff reboot launcher for xfce w/ KDM? r_jensen11 Linux - Software 2 01-17-2004 04:00 PM


All times are GMT -5. The time now is 06:00 PM.

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