5

On Ubuntu 19.10, I disable tracker because I do not like how my computer is overheating for several minutes after startup, and because I prefer full text search not be enabled in the file manager by default. The "Star" feature relies on Tracker and therefore does not work when tracker is disabled.

No option to disable the "Starred" folder is exposed in the Nautilus preferences, nor is a dconf setting available. The file user-dirs-dir determines the "special user folders" displayed in the left pane, but not the "Recent" or "Starred" items.

The question is: can the "Starred" item in the left pane (bookmark pane) of Files (nautilus) be removed?

4
  • @starkus Thank you, but I already indicated in my question that that is not the answer. – vanadium Dec 6 '19 at 17:17
  • @starkus Thank you very much, that is it. Not particularly simple indeed, but still quite feasible without the need to be root. – vanadium Dec 7 '19 at 17:44
  • @starkus, vanadium, do either of you have experience with GTK Inspector? Perhaps, you could use "CSS" to hide what you don't want to see? – DK Bose Dec 8 '19 at 13:12
  • @JusticeforMonica I have no clue about GTK Inspector :-) – vanadium Dec 8 '19 at 13:52
3

There are a couple of not that trivial ways to remove the "Starred" item in the left bar of nautilus. The second option involves editing source code and recompiling. I will only cover the first way here.

1 - Create a folder to store the override

mkdir ~/.config/nautilus/ui

2 - Extract the resource description of the main window:

gresource extract /bin/nautilus \
/org/gnome/nautilus/ui/nautilus-window.ui \
> ~/.config/nautilus/ui/nautilus-window.ui

3 - Edit the properties of the GtkPlacesSidebar object: open the file you created in the previous step:

gedit ~/.config/nautilus/ui/nautilus-window.ui

and change the property show-starred-location to false as in following code snippet:

<object class="GtkPlacesSidebar" id="places_sidebar">
...
<property name="show-recent">False</property>
<property name="show-starred-location">False</property>
...
</object>

4 - Set the environment variable to make GLib use this override:

export G_RESOURCE_OVERLAYS="/org/gnome/nautilus/ui=$HOME/.config/nautilus/ui"

5 - You also need to set this via ~/.pam_environment, because Nautilus is started via D-Bus:

gedit ~/.pam_environment

and add following line

G_RESOURCE_OVERLAYS DEFAULT="/org/gnome/nautilus/ui=/home/confetti/.config/nautilus/ui"

where you change "confetti" by your own login name.

(with thanks to JusticeforMonica and DK Bose for the hints)

You need to log out and back in before this will take effect.

5
  • 1
    is it gresource or gmresource? – Ufos Nov 14 '20 at 14:05
  • 1
    <property name="show-recent">False</property> does not exist for me (ubuntu 20.04) – Ufos Nov 14 '20 at 14:07
  • 1
    I added <property name="show-recent">False</property>, but, unfortunately, it did nothing. However, with your recipe I removed starred. – Ufos Nov 14 '20 at 14:11
  • Had to log out and then back in for this to take effect. – electrovir Mar 13 at 1:15
  • @electrovir thank you, I added this, and in the mean time I corrected gresource: I apparently missed the comment of @Ufos who hinted to this error, for which also thanks. – vanadium Mar 13 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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