Hi, new one in Fedora (40 WorkStation) and linux here.
I installed the War Thunder game and I need to create an application icon for the launcher.
How can I do that ? I have the launcher file and the directory where all files are located (home/myUsrName/WarThunder/launcher).
Note:
I know there is an app in flathub but I wanted to use the official one provided by war thunder.
Are you on Fedora Workstation or one of the spins?
hello, on Fedora Workstation 40
APP_FILE="https://github.com/flathub/\
net.gaijin.WarThunder/raw/master/net.gaijin.WarThunder.desktop"
APP_EXEC="${HOME}/WarThunder/launcher"
APP_ICON="${APP_EXEC}.ico"
APP_DIR="${HOME}/.local/share/applications"
wget -P "${APP_DIR}" "${APP_FILE}"
desktop-file-edit "${APP_DIR}/${APP_FILE##*/}" \
--set-key=Exec \
--set-value="${APP_EXEC}" \
--set-key=Icon \
--set-value="${APP_ICON}"
2 Likes
thx, i will try and confirm
That is an elegant solution, damn.
To understand it more easily, you need to create a desktop entry. System entries are in /usr/share/applications
. Dont edit that directory. If you want to modify app entries, you can copy from here.
Your custom entries go to ~/.local/share/applications/NAME.desktop
Example:
[Desktop Entry]
Name=Name
Comment=Some text
Icon=/path/to/icon
Exec=/path/to/executable
very good,
I added the key=value, Type=Application and it worked.
[Desktop Entry]
Type=Application
Name=War Thunder
Comment=Launcher de war thunder
Icon=/home/myUserName/WarThunder/launcher.ico
Exec=/home/myUserName/WarThunder/launcher
Path=/home/myUserName/WarThunder/
1 Like
Problem:
- Official War thunder creates a corrupted .desktop with an a key=value like this:
exec=StartupWMClass=War Thunder (Vulkan, 64bit)
- .ico provided by wt for the launcher icon dont show on apps bar.
Solution:
- fixed .desktop:
[Desktop Entry]
Version=1.0
Name=War Thunder
Exec=/home/myUserName/.war-thunder/launcher
StartupWMClass=War Thunder (Vulkan, 64bit)
Terminal=false
Type=Application
Icon=/home/myUserName/.war-thunder/wt-launcher-icon.png
Categories=GNOME;GTK;Network
StartupNotify=true
- download a .png and use it instaed of .ico to get this:
1 Like