LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-16-2009, 07:22 AM   #1
Vaxon
LQ Newbie
 
Registered: Sep 2004
Location: St. Petersburg Russia
Distribution: Red Hat 9.0
Posts: 12

Rep: Reputation: 0
sudo doesn't work from fluxbox menu


I have a problem executing sudo from fuxbox menu.
[exec] (label) {sudo gvim} - doesn't work. Sudo just returns 1, gvim is not started.
[exec] (label) {xterm -e sudo gvim} - works fine
I've tried using full path, like /usr/bin/sudo but nothing.
The /etc/sudoers file seems to be correctly configured:
user ALL=(ALL) NOPASSWD: ALL
I can use sudo from shell with no problems.
I've run out of ideas of what the problem could be.
Any suggestions are greatly appreciated.
I have Fedora 10 installed.

Thanx,
Vax.
 
Old 02-16-2009, 08:43 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
try gksudo.
 
Old 02-17-2009, 07:39 AM   #3
Vaxon
LQ Newbie
 
Registered: Sep 2004
Location: St. Petersburg Russia
Distribution: Red Hat 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
OK, thanks.
But what's wrong with sudo?

Thanx,
Vax.
 
Old 02-17-2009, 12:21 PM   #4
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
sudo is for the command line. gksu (or gksudo, they are identical) is for GUI applications.
 
Old 02-17-2009, 01:01 PM   #5
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Does the OP realize how dangerous having
Code:
user ALL=(ALL) NOPASSWD: ALL
in the /etc/sudoers file is? This essentially gives the user root privledges without having the benefit of a password.

I am not trying to be harsh by making this comment, but I want to be sure those who read this post are reminded that the bad habits Microsoft encouraged with Windows are not carried over into the Linux community. There MUST be a clear separation of authority between the root user and unpriviledged users on *nix platforms. You can say "it's my box, I'll take the risk", but that starts and spreads a bad habit.

Last edited by Sargek; 02-17-2009 at 02:12 PM. Reason: clarification
 
Old 02-17-2009, 07:03 PM   #6
Vaxon
LQ Newbie
 
Registered: Sep 2004
Location: St. Petersburg Russia
Distribution: Red Hat 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Sargek View Post
Does the OP realize how dangerous having
Code:
user ALL=(ALL) NOPASSWD: ALL
in the /etc/sudoers file is? This essentially gives the user root privledges without having the benefit of a password.
Yes, please never do this This was posted just to show that sudo should work fine. However, it doesn't work from the fluxbox menu.
No matter whether I try to sudo gvim (gui) or sudo shutdown (text).
It works fine from the console, but not from the fluxbox menu.
I've seen a number of posts about adding "sudo shutdown" to the menu, but it just wouldn't work in my case. Looks like sudo needs a terminal.

Thanx,
Vax.
 
Old 02-17-2009, 07:54 PM   #7
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Just to let you know, it works fine for me. Slackware 12.1, Fluxbox 1.1.1

So, I really can't be of help, other than suggesting that it may not *necessarily* be a fb issue.

Have you tried creating a script and then seeing if the script will run from the menu?

cheers,
 
Old 02-18-2009, 01:34 PM   #8
Vaxon
LQ Newbie
 
Registered: Sep 2004
Location: St. Petersburg Russia
Distribution: Red Hat 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
A script can be run from the menu, but sudo still won't work from the script either.
 
Old 02-18-2009, 02:02 PM   #9
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Well, it's been a while since I've used Fedora, but in googling and browsing a bunch of threads using some search terms relevant to your problem, I'm wondering if the issue might have something to do with SELinux.

Now, I obviously don't *know* this for a fact, but I do know that that beast was often the cause of what I deemed to be minor, unrelated issues that often had me pulling my hair out.

In other words, if you disable SELinux, does your menu item work?

cheers,
 
Old 02-18-2009, 05:41 PM   #10
Vaxon
LQ Newbie
 
Registered: Sep 2004
Location: St. Petersburg Russia
Distribution: Red Hat 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks a lot for taking time to search for a solution to my problem, but unfortunately, disabling SELinux didn't help. It was one of the things I tried first. As far as I can remember, I've had no problems with sudo menu items in blackbox with RedHat 9 and Fedora 3. But now, with Fedora 10, it seems to need a terminal. The "xterm -e sudo something" works fine, but just "sudo something" doesn't from the menu.

Thanks,
Vax.
 
  


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
How to start app with sudo from X - Fluxbox? astrogeek Slackware 2 12-16-2008 03:39 PM
Fluxbox menu dosen't work Kanesoban Linux - Desktop 3 09-28-2007 02:28 PM
Fluxbox Menu Sk8trf69 Linux - Newbie 4 07-07-2005 09:03 PM
Fluxbox menu kirth Linux - Software 1 05-23-2005 02:44 AM
FluxBox not in menu Darkseid Linux - Software 2 12-15-2003 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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