I'm building my first sizable Linux program that I plan on uploading to the Ubuntu Software Center, and I've run into a problem: I assumed calling something like system("sudo mkdir /opt/test");
in a graphical program would automatically bring up the little dialog that asks for the root password, but it doesn't. I get the error: "sudo: no tty present and no askpass program specified"
So is my assumption that this is handled automatically when the user doesn't have access to a terminal incorrect? And if so, what is the default "askpass" program for Ubuntu, and how might I call it? Can I use gksudo?
I would really appreciate some help. Thanks!