As these two questions show:

there is a need to control gedit tabs behavior when opening a file.

For example, always force to open in new window or always force to open in new tab, even if it is in an other workspace.

Is there a way to access this parameter somewhere?

NB: by "tabs" I mean the element of graphical interface allowing to edit multiple files in the same window as shown in the picture below

enter image description here

  • I'm using Gnome on multiple Ubuntu / non-Ubuntu OS. Oct 16, 2021 at 11:07
  • That does not answer the question. Let's say I only use Ubuntu 20.04. The question is still about this gedit parameter. Oct 16, 2021 at 11:14
  • Gedit DOES open multiple documents, into different tabs, in the same window. Doesn't yours?
    – heynnema
    Oct 18, 2021 at 19:25
  • It depends on the context. If there is a gedit window in the same workspace, it does open a tab in the window, otherwise, it opens a new window. The question is about setting the preference: always open in tab / never open in tab. Oct 19, 2021 at 11:02
  • I just tried this exact sequence on my 21.04 system. I opened two .txt docs into Gedit, and both opened in new tabs in the same window. Then I moved the entire Gedit window to a different workspace, then opened a third .txt document, and it opened into a new third tab in the Gedit window in the other workspace. Do you have some special theme, gnome-extension, or non-stock Ubuntu mod installed?
    – heynnema
    Oct 19, 2021 at 13:14

1 Answer 1


I have a similar requirement for certain works I do and need to open two text files in two different windows - one on laptop screen and the other on the extended screen. I couldn't find any setting to force using or not using tab for new file, perhaps it will be available in future. But for the time being I created a nautilus script to achieve the desired functionality.

Created a file named "Gedit-New-Window" in the nautilus scripts folder, added the required command and assigned executable permission to it. Here's how in terminal:

cd ~/.local/share/nautilus/scripts
nano Gedit-New-Window
gedit --new-window $@
chmod +x Gedit-New-Window

For new Ubuntu/Linux users unfamiliar with nano: ^O (Ctrl + o) and ^X (Ctrl + x) above are nano keyboard commands to write out the file and exit.

Now, whenever a file needs to be opened in a Gedit new window, I right-click on the file in nautilus, click on "Scripts" in the context-menu, then click on "Gedit-New-Window" that shows as one of the options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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