Fedora Linux Support Community & Resources Center
  #1  
Old 28th May 2008, 10:04 PM
colifa Offline
Registered User
 
Join Date: Mar 2008
Posts: 3
launcher with sudo, without a terminal

Hello,

I'm trying to launch an application on the desktop (tried both GNOME and KDE) that requires su privileges.
I've added a line to sudoers like:

%authusers ALL=NOPASSWD:/usr/sbin/myapp

Since I don't want to give them the root pwd (what silly idea that is, always amazes me - Ubuntu guys got it right there!)

If I run the sudo myapp from a terminal within X, all is good. The problem is when I need to create a launcher (btw, only KDE gives me the option, but once set in KDE, GNOME will use it!).
If the command line for the launcher is 'sudo /usr/sbin/myapp' (without the run in a terminal option) then nothing happens.
If I use something like kdesu or gksu, then I'm asked for the root password (in spite of the entry in sudoers... both are very crude).
If I try to give some parameter to the terminal (something like vtsize 1x1) then I'm asked for a password.

At this point you guess what I need. A launcher that uses the information from sudoers without displaying an ugly terminal. Just the graphical app, running as root.

If you have any idea how to achieve this, I'll be grateful.

Pablo

Sometimes Linux is great, but some simple tasks can be so frustrating!!!
Reply With Quote
  #2  
Old 25th June 2008, 04:55 PM
SirAeryn Offline
Registered User
 
Join Date: Sep 2005
Location: Western Australia
Posts: 5
Quote:
Originally Posted by colifa
I'm trying to launch an application on the desktop (tried both GNOME and KDE) that requires su privileges.

Since I don't want to give them the root pwd (what silly idea that is, always amazes me - Ubuntu guys got it right there!)

If I run the sudo myapp from a terminal within X, all is good. The problem is when I need to create a launcher (btw, only KDE gives me the option, but once set in KDE, GNOME will use it!).
If the command line for the launcher is 'sudo /usr/sbin/myapp' (without the run in a terminal option) then nothing happens.

Pablo

Sometimes Linux is great, but some simple tasks can be so frustrating!!!
To use sudo from a launcher the only way I found was to do:
gnome-terminal -x sudo myapp [options]

there may be other options for hiding the terminal window while the app runs. Once it finishes then the terminal window closes. I'm not sure what the terminal window in KDE is called.
It's a bit crude but it avoids entering a password.

Cheers
Aaron
__________________
==================================
There is no greater enjoyment in life than watching your neighbour fall off the roof of his house!
Reply With Quote
  #3  
Old 6th December 2012, 02:06 PM
daleraby Offline
Registered User
 
Join Date: Mar 2004
Posts: 4
linuxchrome
Re: launcher with sudo, without a terminal

Thanks. I was able to use LXMed to create my launcher with a modified command: "gnome-terminal -x sudo yum update". This created a launcher that opens a terminal, prompts me for the root password, runs the "yum update" command and then closes the terminal when the updates are installed. I guess it only saves about fifteen keystrokes and requires the use of the GUI, but its still kinda cool. Now all I gotta do is put it in the favorites bar.
__________________
"Nothing is ever so bad that it couldn't be worse, and if it could be worse than it is, then maybe it's not so bad!"

Last edited by daleraby; 6th December 2012 at 02:29 PM. Reason: provide link for referenced application
Reply With Quote
  #4  
Old 6th December 2012, 02:39 PM
sea's Avatar
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 37
Posts: 4,277
linuxfedorachrome
Re: launcher with sudo, without a terminal

You could try:

/etc/sudoers
colifa ALL=/bin/yum

Launcher command:
konsole -e yum upgrade -y

untested, hope this helps
Reply With Quote
Reply

Tags
launcher, sudo, terminal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop Launcher command line from terminal? bg3075 Using Fedora 1 28th June 2009 03:35 PM
Launcher for terminal command cruiser06 Using Fedora 16 27th December 2008 03:51 AM
SSH Launcher "Pseudo-terminal will not be allocated because stdin is not a terminal." kai4785 Using Fedora 5 28th August 2006 01:56 PM
Terminal Server Client launcher not launching. JoHandsum Using Fedora 1 7th February 2005 10:12 PM


Current GMT-time: 19:21 (Sunday, 24-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat