LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How I got XFCE to allow users to shutdown or reboot Slackware 10.2 (http://www.linuxquestions.org/questions/slackware-14/how-i-got-xfce-to-allow-users-to-shutdown-or-reboot-slackware-10-2-a-425918/)

Old_Fogie 03-18-2006 12:18 AM

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"

rkrishna 03-18-2006 01:45 AM

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

soupnazi.tar.gz 03-18-2006 12:19 PM

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!

phil.d.g 03-18-2006 12:29 PM

visudo checks the sudoers file after it has been edited for errors and invites you to fix them if errors are found.

Woodsman 03-18-2006 03:07 PM

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.

phil.d.g 03-18-2006 03:34 PM

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_Fogie 03-21-2006 08:13 AM

yes i stand corrected.

the program is "VI"

and it is quite goofy :D

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 :D

onebuck 03-21-2006 08:50 AM

Quote:

Originally Posted by Old_Fogie
yes i stand corrected.

the program is "VI"

and it is quite goofy :D

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 :D

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!

WilliamS 03-21-2006 09:51 AM

Am I the only one here who likes MidnightCommander?
I just type mc at the command line as root, and can do anything.

Woodsman 03-21-2006 04:16 PM

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.

onebuck 03-22-2006 10:42 AM

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_Fogie 03-22-2006 03:04 PM

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! :D


All times are GMT -5. The time now is 01:50 PM.