Thank you very much for your answer!

I have tried to use gksudo and it works without the Terminal window.
Anyway, I the problem is that gksudo, for some reason, does not accept any
parameter. For example, the "mkfs.vfat -n "Drive" -I /dev/sdf1" command
needs those arguments that can't be passed through gksudo.

Is there a way to solve this issue and send arguments to gksudo? Or,
alternatively, is there a way to get and keep root permissions with gksudo,
just like "sudo -s" does?

Thank you


2013/5/2 Arnel A. Borja <kyous...@yahoo.com>

> Hello Christian,
>
>
> On Thursday, 02 May, 2013 08:37 PM, Christian Capasso wrote:
>
>> I'm having some issues using the Process_spawn command in an application
>> ready to be released. My problem is that, the Process_spawn command is not
>> working if a Terminal window is not opened.
>>
>> For example, the "dd" command works fine if the application starts up with
>> an empty Terminal window. This results in something weird: I have to
>> display a Terminal window together with my application windows to get
>> everything to work!
>>
>> This only happens, as far as I know, when a the Terminal command called by
>> Process_spawn requires Sudo permissions.
>>
> Are you calling sudo to run the command? A terminal is required by sudo to
> ask for the password by default. Maybe this is the reason a terminal is
> opened automatically. If you are indeed running sudo to run the command,
> you could pass the -S option in sudo, then check the output when it is
> asking for a password. This is how Anjuta do it (though with some
> differences, since Anjuta use fork and exec, and the patches to use spawn
> functions of GLib instead are not yet committed).
>
>
> Regards,
>
> Arnel
>
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to