[MonoDevelop] Root Access

Martin Olsson mnemo at minimum.se
Sun Apr 20 22:29:57 EDT 2008


Hardcoding something like that is unfortunately not very robust or 
portable, some distros doesn't have "sudo" at all (Fedora etc) and all 
distros might not have sudo available at this particular path. YMMV.


		Martin


Federico Di Gregorio wrote:
> Il giorno dom, 20/04/2008 alle 11.41 -0400, Darwin Reynoso ha scritto:
>> Hi,
>> does anyone knows how to execute a program with root access.
>>
>> this is what i'm doing...
>>
>> protected virtual void onErase (object sender, System.EventArgs e)
>> 	{
>> 		Process pc = new Process();
>> 		
>> 		pc.StartInfo.FileName = "/home/user/bin/usb_pickit";
>> 		pc.StartInfo.Arguments = "-e";
>> 		pc.StartInfo.RedirectStandardOutput = false;		
>> 		pc.Start();
>> 		
>> 	}
> 
> What about:
> 
> pc.StartInfo.FileName = "/usr/bin/sudo"
> pc.StartInfo.Arguments = "/home/user/bin/usb_pickit -e";
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list


More information about the Monodevelop-list mailing list