4

In gedit when there are multiple file tabs open, it shows them by filename at the top. Sweet. When there is only one file open, it does not show the tabs with filename. Note I have my system set up to have menus always on, and associated with individual windows.

Strangely, it works as expected in 14.04, as mentioned by a commenter. It is only in 16.04 that the tabs are not appearing when I have just a single doc open. How can I change this so it always shows the filename even with just one file open?

4
  • 1
    It seems like this problem is with every program in 16.04 , with Image Viewer also i have observed this.
    – hunch
    Aug 8, 2016 at 12:28
  • Hmmm seems a bug, no?
    – neuronet
    Aug 9, 2016 at 2:29
  • 1
    @neuronet No, it isn't. The tab seems to be removed by default from somewhere after version 3.10. See the screenshots of earlier versions until recent one in this page on Debian.net.
    – user37165
    Aug 9, 2016 at 6:06
  • hunch there is a vg answer now, but I wonder if this will help with Image Viewer or not? If not maybe need a separate Q for image viewer.
    – neuronet
    Aug 9, 2016 at 16:07

2 Answers 2

9
+50

Ubuntu 14.04 uses gedit 3.10.4-0ubuntu4 that shows tab by default. That has changed in Ubuntu 16.04, which now uses gedit 3.18.3-0ubuntu4 according to this package search result.

How to show tabs

The gedit FAQ has noted two commands, which are relevant to change the appearance of tabs. The useful one is the latter, which uses range option to show all possible values for the particular key show-tabs-mode. The following shows the output by default in Ubuntu 16.04.

$ gsettings get org.gnome.gedit.preferences.ui show-tabs-mode
'auto'

$ gsettings range org.gnome.gedit.preferences.ui show-tabs-mode
enum
'never'
'auto'
'always'

To make gedit always show the tabs, run the following command.

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

The result will be applied immediately and gedit will now always show the tabs (the old default).

gedit 3.18.3 shows initial tab with different appearances

Upper half screenshot: gedit is showing the initial tab "Untitled Document 1"

Lower half screenshot: the global menu is shown in the window's title bar and set visibility to "Always displayed". The file name is similarly shown in the tab.

When it happened

The changes of hiding the initial tab in gedit most likely had occurred in target release 3.12, as part of UI redesign, according to the roadmap. Below are two related commits found on the web.

From GNOME Git Repository, this commit dated 11 Jan 2014 has noted:

When notebook "show-tabs" becomes true, check the show-tabs-mode

When exiting fullscreen, we go back to show tabs, but we should check show-tabs-mode and see if they should really be shown.

From GNOME Mail Archive, this commit dated 16 Feb 2014 has noted:

[gedit] Change the name of the tabs-mode setting

/* window state keys */
 ...
-#define GEDIT_SETTINGS_SHOW_TABS_MODE    "notebook-show-tabs-mode"
+#define GEDIT_SETTINGS_SHOW_TABS_MODE    "show-tabs-mode"
 ...

The difference

For gedit in Ubuntu 16.04, the initial tab is extended from end to end. One may not notice the tab is already shown after running the gsettings set command, since the entire tab bar has been covered by the tab itself. Unfortunately, there is no apparent option to change this behaviour.

Note that the key show-tabs-mode is available for gedit in Ubuntu 16.04 (and possibly newer releases), but not applicable to gedit in earlier releases of Ubuntu. To find out the relevant keys of the schema, run the following command.

gsettings list-keys org.gnome.gedit.preferences.ui

In Ubuntu 14.04, the available keys are:

bottom-panel-visible
max-recents
statusbar-visible
notebook-show-tabs-mode   <-- old key
side-panel-visible
toolbar-visible

In Ubuntu 16.04, the available keys are:

bottom-panel-visible
max-recents
statusbar-visible
show-tabs-mode   <-- new key
side-panel-visible
toolbar-visible

The difference of key can be confirmed in the commit dated 16 Feb 2014 as mentioned above.

3
  • That's what they call an answer. Wow. Now I just feel lazy.
    – neuronet
    Aug 9, 2016 at 16:01
  • @clearkimura, this answer seems good, I will implement it tomorrow and mark the bounty. If you can help for Image Viewer also that would be great.
    – hunch
    Aug 9, 2016 at 16:46
  • @hunch I just realized what you meant; Image Viewer "doesn't display the file name", which I had mistaken for "not showing tabs". In that case, gsettings approach won't help.
    – user37165
    Aug 10, 2016 at 10:01
0

I think you have new version 3.18.3, as do I,and it is new feature in this one. Only when u use Ctrl + T and have two tabs it displayes name of file. Downgrading to Ubuntu 14.04 won't help, but if you downgrade gedit this can help. I think if you click open button in this version you can see last edited file and this is the way to know what is the name of file last opened.

To downgrade I think you should type: apt-get install gedit=3.10.4 or other version but why would you do that?

1
  • Downgrade is not a solution as this new version is more user friendly and easy to work with.
    – hunch
    Aug 9, 2016 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .