6

Prior to updating to Ubuntu 17.04, opening new text documents always opened them in a new tab. But since updating, new text documents are always opening in a new window (even when a gedit window is already open). This is resulting in tons of windows being open which is terrible.

I have gsettings set at default (auto) for tab mode.

How do I make Gedit always open documents in a TAB?

G.W.
  • 643

3 Answers3

4

This did the job in Ubuntu 18.04:

gsettings set org.gnome.gedit.preferences.ui show-tabs-mode 'always'

ref. configure gedit to always open in new window

Natalie
  • 41
  • 'always' option has crashed my gedit application when I closed all tabs manually, but when I used 'auto' option instead, it worked. Thank you. – rmmariano Oct 06 '20 at 11:18
2

Update: I updated changed .desktop files for gedit, and now it opens in new tab by default!

.desktop files in question:

/usr/share/applications/gedit.desktop /usr/share/applications/org.gnome.gedit.desktop

(There are two of them; and since I don't know which one is used by default, I simply did the following on both files:)

  1. Ensure that the Exec line under [Desktop Entry] looks like Exec = gedit %U
  2. if there is a line starting with DBusActivatable, ensure it is set to false.

(Answer is loosely based on this answer)

0

I have sidestepped the problem by opening text/code files using Ctrl+O :

From the help menu of gedit: gedit Text Editor › Working With Files » File basics: Open, close, and save files »Open a file or set of files

To open a file in gedit, click the Open button, or press Ctrl+O.

This will cause the Open dialog to appear. Use your mouse or keyboard to select the file that you wish to open, and then click Open. The file that you've selected will open in a new tab.