I want to create a shortcut on my desktop from a txt file. How can I do that? I use Ubuntu 19.10. Thanks.
Niklas
Best Answer
Let's assume that your file's path is : /home/username/folder1/file.txt and you want to create a Desktop shortcut for that file.
You need to open the terminal and run the following command:
In Ubuntu an URL shortcut is stored in a .desktop file as follow (for example):
[Desktop Entry]
Encoding=UTF-8
Name=Link to Ask Ubuntu
Type=Link
URL=http://www.askubuntu.com/
Icon=text-html
You can drag links from Firefox or Chrome and drop them on the Desktop or any other folder where you have permissions to save files.
Note: Link will appear on your Desktop or your file explorer (i.e. caja) under the name in the line Name=…, not by its actual filename. And without any ….desktop extension.
Best Answer
Let's assume that your file's path is :
/home/username/folder1/file.txt
and you want to create a Desktop shortcut for that file.You need to open the terminal and run the following command:
So in this example, it will be:
Don't forget to include the absolute path of the file, otherwise the shortcut will be broken.