View previous topic :: View next topic |
Author |
Message |
sokrovenno n00b
Joined: 23 Aug 2023 Posts: 65
|
Posted: Tue Feb 20, 2024 11:56 am Post subject: Is there a way to merge an icon to an executable file? |
|
|
So, from time to time I like to log in Tibia, see how is it going and talk to old friends that still plays the game. This was the game I spent most part of my childhood playing, so it is a little nostalgic to login and see all those places that I've spent hours hunting and playing. Anyway ... To play Tibia on Linux you must download an executable file. This executable does not display the Tibia icon on xfce-panel nor on the title bar - It just shows a white box - as other programs do. Most probably it is a bug from Tibia, but I doubt they will fix it since Tibia on Linux is unsupported. So I was wondering if there is a way to work around it. I spent hours searching for some fix for it, but could not find anything. I also tried asking reddit on r/Tibia & r/xfce but no one could help me. So I thought trying asking the wizards from Gentoo if you guys know if I can append an icon to an executable file or link it in some way? Is it possible to fix it?
Thank you all in advance.
EDIT: I already created an tibia.desktop file and put it under /usr/share/applications and under .local/share/applications. It worked on whisker menu, but the xfce-panel still does not display the icon when I open the client. Should I copy the icon to another place? Maybe it tries to search for the icon somewhere else? _________________ Best Regards,
сокровенно
Last edited by sokrovenno on Tue Feb 20, 2024 12:50 pm; edited 1 time in total |
|
Back to top |
|
|
wanne32 n00b
Joined: 11 Nov 2023 Posts: 47
|
Posted: Tue Feb 20, 2024 12:20 pm Post subject: |
|
|
While there are various ways to do such things, te proper way works different:
You create an .desktop file that links to the icon and the application.
While this article describes how you create an menu entry, the same files can put on your desktop.
https://wiki.xfce.org/howto/customize-menu
I don't know if xfce supporst .ico but you can easily the ico to an png:
Code: | convert tibia.ico tibia.png |
Just put this into a file with the ending .desktop (assuming Tibia is placed in $HOME/Tibia):
Code: | [Desktop Entry]
Version=1.0
Type=Application
Exec=$HOME/Tibia/start-tibia-launcher.sh
Icon=$HOME/Tibia/tibia.ico
Name=Tibia
Comment=Tibia MMORPG |
|
|
Back to top |
|
|
sokrovenno n00b
Joined: 23 Aug 2023 Posts: 65
|
Posted: Tue Feb 20, 2024 1:18 pm Post subject: |
|
|
hey @wanne32, thank you for your reply.
I forgot to mention, but I already created a .desktop file and copied it to /usr/share/applications and to .local/share/applications. Under whisker menu it worked fine. But when I open the Tibia client the xfce panel still does not display the icon. I'm not using the 'Tibia.ico' file that is provided by Tibia. I'm using the icon provided by Papirus (/usr/share/icons/Papirus/*x*/apps/tibia.svg).
Should I copy the icon to some other directory? The .desktop file that you mentioned above should be copied to another directory?
Other thing I forgot to mention is that I'm not using xfdesktop. I'm using xfwm and everything related to xfce. I already tried install xfdesktop to see if it solved the problem, but it didn't.
Here is what I've installed related to xfce:
Code: | x11-terms/xfce4-terminal
xfce-base/thunar
xfce-base/thunar-volman
xfce-base/tumbler
xfce-base/xfce4-appfinder
xfce-base/xfce4-panel
xfce-base/xfce4-power-manager
xfce-base/xfce4-session
xfce-base/xfce4-settings
xfce-base/xfwm4
xfce-extra/xfce4-alsa-plugin
xfce-extra/xfce4-screensaver
xfce-extra/xfce4-screenshooter
xfce-extra/xfce4-whiskermenu-plugin
|
_________________ Best Regards,
сокровенно |
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Tue Feb 20, 2024 2:39 pm Post subject: |
|
|
From a quick look at 'strace' output, I have a feeling they are not properly using 'QWindow::setIcon()' in the application, referenced by the 'Setting the Application Icon' Qt article [1], as I don't see any attempt to read the icon file from the proper locations... but I may be missing something.
Would also kind of imagine it not working on their supported platform either in that case.
1. https://doc.qt.io/qt-5/appicon.html _________________ Kindest of regardses. |
|
Back to top |
|
|
sokrovenno n00b
Joined: 23 Aug 2023 Posts: 65
|
Posted: Tue Feb 20, 2024 4:48 pm Post subject: |
|
|
Chiitoo wrote: | I have a feeling they are not properly using 'QWindow::setIcon()' in the application [...] |
So that may explain why the icon appears when I click the button 'Manage Clients' but it does not appear when the client is open.
Chiitoo wrote: | Would also kind of imagine it not working on their supported platform either in that case. |
Someone on r/Tibia said that the icon was not being displayed on windows 10 as well. I think you're right! =]
I'll try report or post something on their forums to see if they get it fixed.
Thank you for your help @Chiitoo! Much appreciated. _________________ Best Regards,
сокровенно |
|
Back to top |
|
|
|