5

I am wondering if a Mono C# application running in Ubuntu can somehow run a terminal command. For example, could the user give the program his or her password and then have the application run

sudo apt-get install application-name

(console requests password)

password

(console requests confirmation)

y

Preferably, this would be done without actually opening a terminal visible to the user, so that the application could provide the necessary feedback and manage the whole operation cleanly with as little user interaction as possible.

Is there a way to do that? If so, how? Let me know if clarification is needed. Thank you!

Razick
  • 672
  • 1
  • 5
  • 14
  • 2
    This question is specifically related to Linux, namely Ubuntu, therefore, this is an appropriate place to post this question. I appreciate the downvote based on your tentative opinion regarding classification however. – Razick Sep 30 '12 at 15:53
  • Unfortunately, the method is the same for the *nix'es so it should go on [unix.SE] or even Stack Overflow as it is about programming. Sorry. – nanofarad Sep 30 '12 at 20:53
  • 7
    Other questions of this nature are allowed, so this one should be, too. – Scott Severance Oct 01 '12 at 01:56
  • 5
    "Development on Ubuntu" is explicitly ontopic in the FAQ, voting to reopen. – Jorge Castro Oct 03 '12 at 01:27
  • 2
    Could you share a link to the question on SO? – Flimm Nov 29 '12 at 17:21
  • @flimm http://stackoverflow.com/questions/12736891/run-command-from-within-c-sharp-mono-application-in-linux – Razick Nov 30 '12 at 18:28
  • 1
    too localized ha, I love it when I find a askubuntu question which exactly matches my need and it is closed, because apparently it is unlikely to help me. I'm so glad you made that decision on my behalf. – trampster Apr 23 '13 at 05:59
  • I'm with you trampster. This is another example of a bunch of moderators doing to much moderating. – Goddard Aug 24 '13 at 06:16

0 Answers0