.exe Desktop Icons

I´m using gtk4 desktop icons NG(DING) and wanted to know how to create a desktop shortcut with it.

Screenshot from 2024-06-11 10-34-28
The borderless was created by itself after I installed that program with wine.(which it doesn´t work when I try to open with wine through desktop)
Screenshot from 2024-06-11 10-37-12

the second one, is the one that I tried to create, The icons didn´t loaded too.
I tried some combinations to make it work, but I don´t have much knowledge, So I have came here.

Before you try to create desktop icons, you need to find the working command to run the applications.

Start in the terminal and find a working command. Once you have a command working, we can help you with the correct way to add it to a .desktop file.

There are problems with the commands in both the first and second example. Since you posted screenshots instead of text, you will need to make those adjustments your self.

In the first example, you can’t have spaces in the command or path. You need to fix that, escape the spaces or use quotes.

In the second example, you need to put the path to the command. Although, all that will do is open a shell and do nothing so that probably isn’t the command you want.

But I think if you start by finding the working command in a terminal, this will get a lot easier for you

1 Like

what exactly should I do here? I put it in that way and throwed at the terminal and it worked, but closing the program and doing the same thing the same error that was appearing, appeared again. I am confused.

wendrew@fedora:~$ '/home/wendrew/Desktop/Terraria.desktop'
/home/wendrew/Desktop/Terraria.desktop: line 1: [desktop: command not found

[desktop entry]

Mounted game. Extraction not required. Please report performance issues to us. bash settings.sh extract will make script use extracted files instead.
----==++++*#%%*==+:.. ..
+=:=--+++-::.:===.     .
=*=:-=+=#%#*=-::         Pain heals
=**-:=+:*%@@@@@#=-.        Chicks dig scars
:**=:-+::*%%#%%%%%:          Glory lasts forever!
 -*=-.:. -*#%%%%#*.    .
Game will unmount automatically once all child processes close. Can be disabled with UNMOUNT=0.
bindtointerface package not installed, no WAN blocking.
WAN blocking is not enabled due to user input.
For any misunderstandings or need of support, join the community on Matrix.
Output muted by default to avoid performance impact. Can unmute with DBG=1.

I need to make it appear like that there.

[Desktop Entry]
Name=Borderless Gaming
Exec=env WINEPREFIX="/home/wendrew/.wine/dosdevices/d:/home/wendrew/.wine" wine C:\\\\users\\\\Public\\\\Desktop\\\\Borderless\\ Gaming.lnk
Path=/home/wendrew/.wine/dosdevices/c:/Program Files(x86)/Borderless Gaming
'/home/wendrew/Desktop/Borderless Gaming.desktop'
/home/wendrew/Desktop/Borderless Gaming.desktop: line 1: [Desktop: command not found
/home/wendrew/Desktop/Borderless Gaming.desktop: line 2: Gaming: command not found
wine: chdir to /home/wendrew/.wine/dosdevices/d:/home/wendrew/.wine : No such file or directory
/home/wendrew/Desktop/Borderless Gaming.desktop: line 6: syntax error near unexpected token `('
/home/wendrew/Desktop/Borderless Gaming.desktop: line 6: `Path=/home/wendrew/.wine/dosdevices/c:/Program Files(x86)/Borderless Gaming'

…I can see that it is like you said, but the folders have spaces like that on their names and this entire ´exec´ is strange to me

In the desktop you should have this:


The Exec is the command that gets run.


The very minimum you need to have a working .desktop launcher is:

[Desktop Entry]
Name=Name of the application
  • Name is how you want to see the application labeled in the application menu/overview, and is also how you search the application
  • Exec points to the executable file that is run to start the program. This can be the filename only if that file exists in one of the folders listed in the PATH environmental variable. (Use the command printenv PATH to see these folders). Otherwise, it can be a full pathname of the executable (e.g. /opt/zotero/zotero).
  • The last line indicates this is a program launcher.

A .desktop launcher will appear only in the menu if it points to a valid executable. That is 1) a file that effectively exists on the file system, and 2) a file that is executable, i.e., has the executable bit set.

Then there are several more fields you can add. One you certainly will want to use is Icon, to designate an icon to be displayed in the menu.

  • Icon points to a valid graphics file to be used as an icon on the system. The file format is most commonly .png, and svg for scalable icons. Also the legacy .xpm and formats like .gif or bmp can be used. Only the file name without extension is valid if the file lives under one of the icon directories under the directories listed in the XDG_DATA_DIRS variable and is either of .png, .svg or .xpm type. Otherwise, the extension must be specified, and the full path must be given if the file lives elsewhere.

There are many more options, which you can see in the XDG Desktop Entry Specification, or by studying the preinstalled .desktop files in your /usr/share/applications directory.


@dalto thanks for that information! things started to make more sense.

@ytrium your explanation of everything helped me a lot!
and I could add two games to the desktop and their icons.

[Desktop Entry]
Name=Minecraft Launcher

very easy to make it work at least.
I was throwing the desktop icons into the terminal to see if I could see an error, but I was getting an error because of that :sweat_smile: double-click on them works fine.

The only problem that I have now is to make a program or something like ´borderless gaming´ work, because they need wine. The jc141 ones are a automated process that can be opened with double-click on .exe, so I didn´t got any problem.
If I try to do the same things I did with an Wine application, double-click= nothing happens. run with wine= there is no windows program configured to open this type of file.

Just had to add ‘wine’ to Exec
to make wine programs work