[Gambas-user] kdesu vs gksu

Jesus Guardon jguardon at ...2035...
Mon May 18 23:45:21 CEST 2009


Hey, thanks for your quick reply, David

I'm going to test it now. I didn't know of these constants before.
Just in case they match, because I've found in OpenSuSe 11.1 with KDE 4 
that it is the opposite, it comes with gksu (at least in my testing VM).

Also, we may use "which gksu" to know if it is installed, otherwise we 
can assume kdesu is. Hmmm...

Thanks a lot!

Saludos

Jesús

David Villalobos Cambronero escribió:
> Hi,
> 
>   If Application.Env["KDE_FULL_SESSION"] Then
>     Shell "kdesu " & Command
>   Else If Application.Env["GNOME_DESKTOP_SESSION_ID"] Then 
>     Shell "gksu " & Command
>   Endif
> 
> 
>  Saludos
> 
> 
> --
> David
> 
> 
> 
> ----- Original Message ----
> From: Jesus Guardon <jguardon at ...2035...>
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Sent: Monday, May 18, 2009 3:20:29 PM
> Subject: [Gambas-user] kdesu vs gksu
> 
> Yes, I know it may be a little off-topic, but the question is:
> 
> I need to launch a process with root privileges from SHELL command in 
> Gambas. Users of my application can have Gnome or KDE, so I don't know 
> which command I must issue to get it to work.
> 
> Is there a way to choose between either gksu o kdesu commands at runtime?
> I've figured it out if it could be something like:
> 
>   SHELL "gksu | kdesu -u root 'some_command'"
> 
> or
> 
> SHELL "gksu -u root 'some_command' | kdesu -u root 'some_command'"
> 
> Regards
> 
> Jesús
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables 
> unlimited royalty-free distribution of the report engine 
> for externally facing server and web deployment. 
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> 
>       
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables 
> unlimited royalty-free distribution of the report engine 
> for externally facing server and web deployment. 
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 





More information about the User mailing list