Desktop Shortcuts for custom app

Hi there! Happy New Year! Hope everyone had a great holiday.

I am trying to make a desktop shortcut for my Grajay app.

It's a standalone app that I just unzipped to a folder in my Home directory.
/home/tes/Grajay

The folder is Grajay. Inside the folder is an executable file simply called Grayjay, with no extension. When I click this file, it launches Grayjay without issue.

My shortcut, as I have created it, is like this:

I have enabled executable permissions under 'properties', but when I click the icon, nothing happens at all.

I am obviously doing something wrong, but I am not sure what...

Tes

Have you tried copying and pasting the Grayjay icon that runs inside that folder to the desktop?

1 Like

You could try it with packing the .desktop File to /usr/share/applications/ or ~/.local/applications/ first. Then go to the executable File in the folder, make a right-click and look if You can find the Option to create a Link. Use that and pack the Link on the Desktop.

1 Like

Add this to the .desktop file:

Path=/home/tes/Grayjay

The executable is probably trying to load some resource from the same directory where it's located, but being invoked using a desktop file is likely failing because it's using the wrong path.

2 Likes

This one line fixed everything! Thanks man!

Also, thank you to all who replied! I had tried some solutions already, but I sure do appreciate all the input! :slight_smile:

3 Likes

No problem :slight_smile:

Just a tip: I personally don't like having too many files in my home directory, as that's the entry point to my personal files and I like to keep things nice and tidy.
To keep things organized I would recommend moving the Grayjay directory over to /home/tes/.local/bin. That's the directory defined by the Freedesktop specification for user-specific executable files, which is ideal for software downloaded like this, or compiled manually.

# Create the directory in case it doesn't already exists
mkdir -p /home/tes/.local/bin/

# Move the entire folder from its current location to the new one.
mv /home/tes/Grayjay/ /home/tes/.local/bin/

The .desktop file itself can be placed in /home/tes/.local/share/applications. Remember that you will need to update it to point to the new location of the executable files.

Icon=/home/tes/.local/bin/Grayjay/grayjay.png
Path=/home/tes/.local/bin/Grayjay
Exec=/home/tes/.local/bin/Grayjay/Grayjay

Again, that's just my personal preference to keep things more organized, you don't have to do this.

1 Like

Hey! Thanks! I'll do that right now. Good idea!