This question has already been answered:

How to run a shortcut on the desktop through the terminal? Arch linux xfce system. Specifically created a shortcut to the virtual machine on the desktop. xdg-open does not start

Reported as a duplicate by aleksandr barakin linux 21 Dec '17 at 9:23 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • shortcut file should be launchable - Drakonoved
  • shortcut launched by double-clicking - Dr.robot
  • so what is the question? Not a shortcut is called from the terminal, but what it refers to is a script or a binary, or a command. - Drakonoved
  • This is the question to launch this shortcut - Dr.robot

2 answers 2

Manual method - open the file, it is a text file, find the Desktop Entry section, in it the Exec key. There will be a launch line. You can parse both handles and ready-made modules. For example, for Perl there is such a File :: DesktopEntry . or for python .

If you just need to run in the terminal, then you can

 xdg-open file.desktop 
  • Fails to Run - Dr.robot
  • what does "fail to start" mean? The computer turns off, the blue screen, a message is displayed on the screen (and also copy the contents of the console) - KoVadim
  • Can not run. So I run it with pens (it works). And when I write xdg-open I get: / usr / bin / xdg-open: line 854: www-browser: command not found - Dr.robot
  • make ls -al www-browser* and show the output - KoVadim

Typically, the desktop folder is located at '~ / Desktop', but it can also be "Desktop". Go through the terminal in this folder and write ./ shortcut name - should work.