In Ubuntu, you can mark certain applications as your favorite, and in the file explorer, you can drag folders to the left sidebar. But I can't seem to add a bookmark for a specific file, nor can I set a file to open from the Ubuntu dock at the left of the screen.

What is a good option to have a document in a place where you will remember its importance on a frequent basis?

  • 1
    Put a link to it in your desktop or home directory?
    – muru
    Aug 20, 2018 at 3:07
  • 1
    @muru That's probably as good as an answer. Aug 20, 2018 at 3:45
  • 2
    @MaxLi Btw, "best way" is highly subjective, so you might want to edit your answer to state specifically what are your needs. Do you want the file to be on the dock ? In nautilus file manager panel ? In the top panel ? Maybe on desktop, as muru suggested ? Aug 20, 2018 at 3:46
  • Something similar: I have a number of files and folders whose locations I frequently forget. I created a Links directory in my home directory and put symlinks in it to things I have trouble finding.
    – Joe
    Aug 23, 2018 at 4:37

2 Answers 2


Instead of pinning a file, let's switch gears: pin a command that opens the file. That's easily achieved via creating a .desktop file, which is what those icons on the dock actually are. Sufficient enough would be to have file in ~/.local/share/applications/ called importantfile.desktop and with contents maybe like so:

[Desktop Entry]
Exec=gedit /etc/passwd
Name=Open Important Thing

The Icon= part is optional, but as you can see you can use standard gnome icons. Remember also to use your own favorite program to open the important file - Exec=gedit /etc/passwd is just an example.

Alternative (and a very biased solution, as I am the author of that) is to use Files Indicator, which besides other things allows pinning specific files to be shown in the indicator itself and are opened by whatever default program is set for their respective filetypes.

  • 1
    Perhaps adding something like the following before the last paragraph would be nice for completion (for Ubuntu 17.10 and later with GNOME 3): Then you would be able to search and find "*Open Important Thing*" in *Activities* overview and then pin it to the dock by right-clicking and selecting "Add to Favourites".
    – pomsky
    Aug 22, 2018 at 9:33
  • 2
    Also xdg-open or something similar in place of gedit in the Exec= line?
    – pomsky
    Aug 22, 2018 at 10:10
  • @pomsky Yes, xdg-open can work, but for some files that aren't in database it's just easier to use specific app. But yes, good point Aug 23, 2018 at 4:35

An alternative for simpler files is to use Nautilus file manager to create a link and move it to the desktop.

For your word processing, spreadsheet and presentation documents you can navigate using Nautilus to the directory containing the file. Then right click on the the file and select Make Link a new icon appears called Link to filename. Grab this and drag it to your desktop.

Below is an animation for a word processing document called eyesome.odt and a desktop link created for it:

make link.gif

After the link is dragged to the desktop, simply double click on it and the application associated with it automatically opens it.

Keyboard shortcut method Ctrl+Shift+Left-Click

A quicker method is to use Ctrl+Shift+Left-Click on the file and drag a copy to the desktop.

The subtle difference is the Desktop name is no longer "Link to filename" but simply "filename".

  • 4
    You can also drag the file to the target location while holding Ctrl-Shift to create a link.
    – muru
    Aug 20, 2018 at 4:57
  • 4
    Wallpaper checks out. Aug 20, 2018 at 15:25

You must log in to answer this question.

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