LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Gnome desktop launcher for apps with root premissions (https://www.linuxquestions.org/questions/linux-newbie-8/gnome-desktop-launcher-for-apps-with-root-premissions-315825/)

yotamk 04-21-2005 04:25 PM

Gnome desktop launcher for apps with root premissions
 
I need to create a Gnome desktop launcher for "Orphaner" which runs under root permissions, and is a terminal GUI.
So when dbl-Clicking the launcher, the terminal should open and ask for root's password, and than launch orphaner...
What command should I write in the "command" field when creating the launcher?

Thanks.

nilleso 04-21-2005 10:08 PM

I suggest you look into sudo. It will allow a regular user to run a command as root (without having to know the root passwd even).
then in launcher you need only use a launcher command kinda like 'sudo /blah/cmd -blah '
cheers :p

~ # man sudo

SUDO(8) MAINTENANCE COMMANDS SUDO(8)



NAME
sudo - execute a command as another user

SYNOPSIS
sudo -V | -h | -l | -L | -v | -k | -K | -s | [ -H ] [-P ] [-S ] [ -b ]
| [ -p prompt ] [ -c class|- ] [ -a auth_type ] [ -u username|#uid ]
command

DESCRIPTION
sudo allows a permitted user to execute a command as the superuser or
another user, as specified in the sudoers file. The real and effective
uid and gid are set to match those of the target user as specified in
the passwd file (the group vector is also initialized when the target
user is not root). By default, sudo requires that users authenticate
themselves with a password (NOTE: by default this is the user's pass-
word, not the root password). Once a user has been authenticated, a
timestamp is updated and the user may then use sudo without a password
for a short period of time (5 minutes unless overridden in sudoers).

reddazz 04-22-2005 03:09 AM

You could also use gnomesu, which is similar to kdesu.

yotamk 04-22-2005 05:28 AM

OK thanks.

Solved it with the command 'su -c "orphaner"'

Should have thought about it before...


All times are GMT -5. The time now is 02:35 PM.