How do I pin a file shortcut to Ubuntu dock?
Follow the steps below.
Create a
.desktop
file (sayspreadsheet1.desktop
) in~/.local/share/applications/
directory. You can do that by running the following command in Terminal:touch ~/.local/share/applications/spreadsheet1.desktop
Open the file with a text editor, for example by running
gedit ~/.local/share/applications/spreadsheet1.desktop
Then add the following lines:
[Desktop Entry] Name=XYZ spreadsheet Exec=xdg-open /full/path/to/XYZ-spreadsheet.ods Comment=Launch XYZ spreadsheet Terminal=false Type=Application Icon=x-office-spreadsheet
- Save the file.
Click on "Activities" or "Show Applications" and search for "XYZ spreadsheet". It should appear.
Right click on it and mark as favourite.
Note: The xdg-open
command opens the file with the default application associated with the file-type. You can alternatively set
Exec=libreoffice /full/path/to/XYZ-spreadsheet.ods
in the .desktop
file to always open the file with LibreOffice Calc.