Re: [opensuse] Running a program as root from desktop panel
- From: "Jake Conk" <jake.conk@xxxxxxxxx>
- Date: Fri, 12 Oct 2007 01:40:51 -0700
This is obviously to launch a program from my panel as I mentioned and
I'm obviously not root so there is no need to make a script which is
going a bit beyond of what I wanted to do. I guess if I had kde
installed the kdesu <program> would have worked but since I don't then
a better answer would have been gnomesu.
Anyways I've found gksu which is actually the right answer because it
doesn't require gnome or kde and it solves my problem. No need to make
it into a script or anything..
Thanks,
- Jake
On 10/11/07, Jonathan Ervine <jervine@xxxxxxxxxx> wrote:
On Friday 12 October 2007 00:57:31 Jake Conk wrote:
No you misunderstood, good try though.
Grrr... top-posting. You're breaking the logic of the thread. I'd say Roger
understood perfectly what you're trying to achieve. He's given you a solution
based on KDE, but it's a trivial adaptation for GNOME (which you've already
mentioned you've got).
sudo is going to be a waste of time, as it will be expecting a terminal
console in which to enter the password to allow privileged access. However,
if you look at Roger's script he's checking to see if the current user is id
0 (this is root by the way). If it is, then the application is launched. If
not, then it launches the application via kdesu. kdesu, in case you didn't
know, is a 'wrapper' binary that prompts for the root password to launch a
privileged application. It's how YaST2 is launched in the KDE desktop
environment.
Now as you mentioned you've got GNOME available you might want to look again
at Roger's script, and google for gnomesu
Jon
On 10/11/07, Roger Oberholtzer <roger@xxxxxx> wrote:í»¯¿
On Thu, 2007-10-11 at 03:57 -0700, Jake Conk wrote:
Hello,
i want to add a program to my desktop panel but it needs to be ran as
root when clicked... How do make a it prompt for my root password when
I click on that application from a panel? I tried putting sudo in
front of it in hopes a prompt of some sort will come up but no luck.
Regards,
- Jake
PS. If it matters, I'm running Xfce but I have Gnome installed if I
need something from gnome.
Or KDE? This may run outside KDE. I use something like this:
LAUNCH_CMD="MyCommand"
if test `id -u` -eq 0 ; then
exec $LAUNCH_CMD 2> /dev/null
else
kdesu -n -c "$LAUNCH_CMD" 2> /dev/null
fi
I send errors to /dev/null for the heck of it. Remove as needed.
--
Roger Oberholtzer
OPQ Systems / Ramböll RST
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden
Tel: Int +46 8-615 60 20
Mobl: Int +46 70-815 1696
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
N‹§²æìr¸›y隊Z)z{.±ï(r)žË›±Êâmê)z{.±ê+€Z+i×b¶*'jW(šf§vǦj)h¥éí¯¿
í»¬ºÇ¾…éi¢—§²ë ¢¸--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- [opensuse] Re: Running a program as root from desktop panel
- From: Jonathan Arnold
- [opensuse] Re: Running a program as root from desktop panel
- References:
- [opensuse] Running a program as root from desktop panel
- From: Jake Conk
- Re: [opensuse] Running a program as root from desktop panel
- From: Roger Oberholtzer
- Re: [opensuse] Running a program as root from desktop panel
- From: Jake Conk
- Re: [opensuse] Running a program as root from desktop panel
- From: Jonathan Ervine
- [opensuse] Running a program as root from desktop panel
- Prev by Date: Re: [opensuse] Accessibility questions
- Next by Date: Re: [opensuse] SuSE updater icon in taskbar (10.2)(SOLVED)
- Previous by thread: Re: [opensuse] Running a program as root from desktop panel
- Next by thread: [opensuse] Re: Running a program as root from desktop panel
- Index(es):
Relevant Pages
|