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 there a way to prevent gedit from always opening a new "untitled" file when launched (at least when an other file name is passed either with Alt+F2 and gksudo)? It is borring to always have to click "don't save" for this null file with nothing typed in it. Thank you

share|improve this question
up vote 4 down vote accepted

This is a bug as you can see here: and it doesn't look like it will be fixed because apparently, GNOME developers don't want users to run any application as root.

A work-around is to use "gksu" (or "gksudo") twice, like this:

gksu gksu gedit /path/to/file

You can make an alias so you don't have to run this twice. To do this, open ~/.bashrc and add this:

alias gksudo='gksudo gksudo'
alias gksu='gksu gksu'

Then, save the file and run this to source the ~/.bashrc file:

. ~/.bashrc
share|improve this answer

Thank you Alin. It was fixed as of 2013-03-16 in gedit 3.7: just after this

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.