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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> N�����r��y隊Z)z{.�ﮞ˛���m�)z{.��+�Z+i�b�*'jW(�f�vǦj)h�����
�����
>����Ǿ��i�������
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]