How to restore Nautilus Launcher icon quicklist to default
After an update I ended up with this:
How can I add the default Files quicklist options which are not bookmarks (Documents, Downloads, Music...)
The same happened to Nautilus when I opened it, but I added the options in ~.config/user-dirs.dirs
but now the Launcher icon is missing this options.
Solution 1:
The default entries, which are added automatically to the Files
launcher icon (not the ones, mentioned in the .desktop file
) , are stored in ~/.config/gtk-3.0/bookmarks
, as lines in the format:
file:///home/[your_username]/Documents
file:///home/[your_username]/Downloads
etc.
I am afraid you will have to re-enter them manually if the file was messed up somehow.
...Or, if you simply want to use all the entries in ~/.config/user-dirs.dirs
, you can use the script below :)
#!/usr/bin/env python3
import os
home = os.getenv("HOME")
exclude = ["Desktop", "Templates"]
with open(home+"/.config/user-dirs.dirs") as locations:
homelinks = [item.replace("\n", "").split("$HOME/")[-1][:-1] \
for item in locations.readlines() if item.startswith("XDG_")]
with open(home+"/.config/gtk-3.0/bookmarks", "wt") as bookmarks:
for item in homelinks:
if not item in exclude:
bookmarks.write("file://"+home+"/"+item+"\n")
Solution 2:
After finished editing the file user-dirs.dirs
and add these bookmarks (you can use also @JacobVlijm's answer ), you have to run xdg-user-dirs-gtk-update
to update this file.