[Gambas-user] Relaunching a program as root

Kende Krisztián nemh at ...2007...
Mon Dec 30 12:36:13 CET 2013


2013-12-30 12:15 keltezéssel, Tobias Boege írta:
> On Mon, 30 Dec 2013, Kende Kriszti?n wrote:
>> Otherwise. Your code:
>>
>> IIf(Application.Path Ends ".gambas", "/usr/bin/gbr3 ", "/usr/bin/gbx3 ") &
>> Application.Path
>>
>> isn't correct, because Application.Path is a directory, not file.
>>
> Right! You used Application.Path &/ Application.Name which seems the best
> possible solution but it is yet not perfect. What if the user calls his
> project A and calls the archive B.gambas? Then it would not work, right? Is
> a property in Application missing?

Yeah, and what if the '.gambas' filename extension doesn't exist?

But this is just an example project, users can rewrite anyway. Just see how.

>> And a little bug. If I use sudo method and I write good password, then
>> opened two window; root and error message (good with su method).
>>
> This bug was also reported to me from Hans but it never happened to me...
> Let's see...
>
> Regards,
> Tobi
>





More information about the User mailing list