8

Having already opened several text files with each in one tab in a window, now open another text file,

  1. gedit sometimes creates another window instead of a session under the current window. I wonder if it is possible to control whether to open the next file under the current window, or in a new one?
  2. if the text file has already been opened, gedit sometimes open it again in another window, and ask me if I want to edit or not. I was wondering how to make gedit not to open a file already opened?

Thanks!

Tom Brossman
  • 13,111
Tim
  • 25,177
  • 1
    Is this the same as this Q&A? http://askubuntu.com/questions/75671/why-does-gedit-keep-randomly-opening-new-instances-when-opening-files-from-nauti/79295#79295 – fossfreedom Sep 01 '12 at 16:16
  • close, but I asked much earlier than that one. – Tim Sep 01 '12 at 16:25
  • 1
    it doesnt really matter who asked first - we can merge the answers to either Q - what I need to know is, if that linked Q is the same in your eyes and if so, does the answer do what you are looking for? – fossfreedom Sep 01 '12 at 16:28

2 Answers2

1

If you open the file from gedit (Ctrl+O, or use the big 'Open' button shown) it will open the new file in a new tab. If you open new files from Nautilus (or another file manager), it may or may not. Also, as @harisibrahimkv points out, files with different permissions/users will be handled differently.

gedit file open dialog

Tom Brossman
  • 13,111
0

This sometimes happen if you are trying to open files with different permissions. As in, if you open a file with sudo while gedit is already open, it might open in another window.

harisibrahimkv
  • 7,256
  • 11
  • 44
  • 71