Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to give root to an already running application which runs at userspace?

Like x program is running, I did some unsaveable work on x program, But it needs root to complete. I do not want to restart the x program.

share|improve this question
up vote 4 down vote accepted


What you have to do is save the work somewhere you can write to, e.g. /tmp, exit the program, run the program with sudo x, and read the data from /tmp.

Or, in vi or vim, you can do :w | sudo tee root-writeable-file

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.