FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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!!!

  2. #2
    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!

  3. #3
    Join Date
    Mar 2004
    Posts
    4

    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.
    Last edited by daleraby; 6th December 2012 at 02:29 PM. Reason: provide link for referenced application
    "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!"

  4. #4
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    37
    Posts
    4,277

    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

Similar Threads

  1. Desktop Launcher command line from terminal?
    By bg3075 in forum Using Fedora
    Replies: 1
    Last Post: 28th June 2009, 03:35 PM
  2. Launcher for terminal command
    By cruiser06 in forum Using Fedora
    Replies: 16
    Last Post: 27th December 2008, 03:51 AM
  3. Replies: 5
    Last Post: 28th August 2006, 01:56 PM
  4. Terminal Server Client launcher not launching.
    By JoHandsum in forum Using Fedora
    Replies: 1
    Last Post: 7th February 2005, 10:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •