Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

up vote 4 down vote accepted

This is a bug as you can see here: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/796076 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 https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/796076/comments/43

share|improve this answer

Your Answer

 
discard

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.