I want to add some extra Actions
to the shortcut that starts LibreOffice Writer, for quickly opening some of my documents by right clicking on the Favorite icon of Writer.
To do this, I copied the file /usr/share/applications/libreoffice-writer.desktop
to my ~/.local/share/applications/
with a different name, simplified its contents, changed its Name=
and Comment=
lines, and added some new Actions=
. (I do not want to change the system-wide original desktop file, since my additions should be done per user basis.)
The new shortcut appears under Activities and menus and I can start an instance of Writer by selecting it. However, after Writer starts, the right-click menu of its icon is still the original (system-wide) one: My extra Actions
do not appear. And if I add it to Favorites, not any of my new Actions
are added.
What is the correct method of adding some new Actions to a system-wide desktop file?
Note: My new desktop file is named ~/.local/share/applications/libreoffice-writer-xxx.desktop
and has contents like this:
[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-writer
Type=Application
Exec=libreoffice --writer %U
Name=LibreOffice Writer Shortcuts
Comment=Local copy of desktop file
StartupNotify=true
Actions=NewDocument1;doc1;doc2;
[Desktop Action doc1]
Name=Open doc1.odt
Exec=libreoffice --writer /home/xxx/Documents/doc1.odt
[Desktop Action doc2]
Name=Open doc2.odt
Exec=libreoffice --writer /home/xxx/Documents/doc2.odt
[Desktop Action NewDocument1]
Name=Start New Document
Exec=libreoffice --writer