I am trying to create a shortcut for a word document (.docx
) on Lubuntu desktop (22.04 LTS). I thought I could create a symlink as follows:
ln -s a.docx ~/Desktop/
The symlink does get created and show up as a shortcut on the desktop. But it seems that Lubuntu does not treat it as a shortcut. When I double-click a.docx
on Desktop, Lubuntu asks me to choose a program to open the symlink as shown in the screenshot below.
What is the right way to create a shortcut on Lubuntu desktop?
On Lubuntu, you can create a shortcut for a file or application by creating a "launcher" file. A launcher file is a simple text file that contains the command that should be run to launch the file or application.
To create a launcher file for a word document, you can follow these steps:
Open a text editor, such as Leafpad, and create a new file.
In the file, type the following text:
Replace NameOfDocument with the name of the document, and CommentForDocument with a comment or description of the document.
Save the file as a.desktop on the Desktop.
Double-click the a.desktop file on the Desktop to launch the word document.
This should create a launcher file that can be used to launch the word document. You can also drag and drop the a.desktop file onto the Lubuntu panel to create a launcher for the document on the panel.
@ARG's answer about creating a
.desktop
file works.Additionally, as pointed out in the comments and the documentation, this can also be done via drag-and-drop onto the desktop and then choosing
Create symlink here
from the context menu.