On Wed, Mar 3, 2010 at 3:43 AM, toogooda <[email protected]> wrote: > > I would like to know what code I use to prompt the user for password so I can > do admin tasks > > ie: I want to create a file in /etc/apt/apt.conf.d at the command line I > would have to use sudu. > > if I open any GUI app in Ubuntu that wants to change settings I get a nice > box that pops up and asks "enter your password to perform administrative > tasks" > > How is this done in Mono, how is this done and how is that authorization > used to do the tasks.
That kind of thing is usually done by calling one of the graphical sudos such as xdg-su/gksu/kdesu/etc, either in your launch script, to have the whole app run as root, or in subprocesses run by your app, to prompt for individual actions. -- Michael Hutchinson http://mjhutchinson.com _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
