Desktop Shortcut - Launching ``

[Desktop Entry]

What is wrong with this and why won't it execute the file in the location identified by Exec=?

  • I created the .txt, edited with the correct location for Exec= with drag/drop into terminal just to be sure.
  • I saved the file as .desktop on the desktop.
  • I gave the .desktop file exec permissions with chmod +x - again, dragging/dropping the file into terminal just to be sure.
  • I can double-click on the file in the directory and launch the .sh program file.
  • I cannot get the same program file to run when clicking on the .desktop file with the settings shown above in the code block.
  • I've done this once before, successfully, with the same basic desktop entry info.

To be clear, nothing visible happens after executing my shortcut. The file which I'm asking the shortcut to point to is able to be run normally by double-clicking on the program's .sh file in the above-identified home folder.
Thank you!

Can you please open a terminal in the direcotry holding your .desktop file or cd to that directory, then run the following to determine the error. Replace the example.desktop with your actual desktop file name

awk -F= '/Exec=/{system($2)}' example.desktop

You may get something like:
line 3: linuxjre/bin/java: No such file or directory

Thats correct!

Ok... Carefully... lol...
Run this in terminal But Do Not Click y until you check what it is going to install or remove:

sudo dpkg --add-architecture i386 && sudo apt update

sudo apt-get install libc6-i386

This is a tricky one - So, I would really prefer you past the full output here before you hit y so we can double check it. You can use if you need.

EDIT: also you may need to adjust your .desktop file as follows:

[Desktop Entry]

Use your actual absolute path - I just now tested this but kept in in my Downloads folder since I've not intention of keeping the application...
You may also prefer to save the .desktop file in ~/.local/share/applications

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-i386 is already the newest version (2.31-0ubuntu9.9).
libc6-i386 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

*I actually tried it multiple times, both ways before even coming here :rofl:

*That's where my only created/working .desktop link was placed. If this fixes my problem, where should I install the .desktop file if I want it to also appear in the Super menu and usable by all users?


You will need to elevate to root to do so.

Thanks! I wanted to be sure, but thought as much after trying to understand how themes work.

Easily done with a single right click now that I've upgraded to Nemo. After all, he was the captain... :joy_cat: :nerd_face:

Sadly, none of this worked. No icon, no launch, nothing. I remembered to chmod +x on the .desktop file as well, then moved to usr/share/applications. Showed in the Super menu, but would not launch.

u can try doing that with the gui way: with menu editor(menulibre), and don't forget to fill the field of the path or working directory

@eid Thanks! I will look into it.

  1. Have you done this yourself to create a link to anything?

  2. Does it work on .sh programs located in places other than the Downloads or Desktop locations?

  3. Will it also place the link on my Super menu?

I realize I could probably install it and tweak/test it myself, but if it's not what I'm looking for then I want to avoid downloading/installing additional ways to make Ubuntu/Zorin do what I want - at least for the next hour...

I use zorin lite , so I have menu editor(menulibre) by default, I have done that before with programs located in places other than the downloads or desktop locations and that place the link on my super menu in zorin lite, but I don't try that with

I think u just need to add path field under exec field in your .desktop(path=/home/mech-one/Downloads/songkong), but if that not worked , u can try the gui way

1 Like

My Man Emoji GIF by SportsManias

It works! Launched. The icon still didn't appear for some reason with the image not being inside the same folder as the executable. But thanks to @Aravisian letting me know about the manual/GUI icon change method in File Properties. Followed by Alt+F2, r to restart desktop. Which I did to begin with, then just figured it might work if I copied the image to the same folder which the executable was in, and which the desktop was now pointing toward as Path=.
If anyone cares. Please see newly revised .desktop file:

[Desktop Entry]
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.