How can I pin a specific document so I can access it easily and frequently?
How can I pin a specific document so I can access it easily and frequently?
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?
@muru That's probably as good as an answer.
– Sergiy Kolodyazhnyy
Aug 20 at 3:45
@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 ?
– Sergiy Kolodyazhnyy
Aug 20 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
2 days ago
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:
~/.local/share/applications/
importantfile.desktop
[Desktop Entry]
Type=Application
Terminal=false
Exec=gedit /etc/passwd
Name=Open Important Thing
Icon=/usr/share/icons/gnome/48x48/status/messagebox_critical.png
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.
Icon=
Exec=gedit /etc/passwd
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.
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
2 days ago
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".
Also
xdg-open
or something similar in place of gedit
in the Exec=
line?– pomsky
2 days ago
xdg-open
gedit
Exec=
@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– Sergiy Kolodyazhnyy
2 days ago
xdg-open
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.
Make Link
Link to filename
Below is an animation for a word processing document called eyesome.odt
and a desktop link created for it:
eyesome.odt
After the link is dragged to the desktop, simply double click on it and the application associated with it automatically opens it.
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".
You can also drag the file to the target location while holding Ctrl-Shift to create a link.
– muru
Aug 20 at 4:57
Wallpaper checks out.
– Alex L
Aug 20 at 15:25
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Put a link to it in your desktop or home directory?
– muru
Aug 20 at 3:07