Re: Icons on Linux

David Vereb <[email protected]>
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 16.04 I was able to just make a .desktop file:


*nameofprogram.desktop*

[Desktop Entry]
Name=Name of Program
Comment=Description of Program
Exec=/path/to/program --extra-flag
Icon=/path/to/icons/programicon.png
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=Name of Program


The StartupWMClass of the .desktop file had to match the first parameter 
when creating FXApp in order for it to properly show the icon.  We were 
able to change this name to make it use a different icon, too, as we 
have a "simulation mode" which we wanted to show was open with a 
different icon.

FXString WMClass = "Name of Program";

if(SimMode())

     WMClass = "Name of Program --sim";

new FXApp(WMClass, "My Program");


In 20.04 we had to make sure to place the .desktop file into 
/usr/share/applications for it to work.  We ended up just making a 
symbolic link to where we normally store it (as we have an update script 
for updating it if we ever choose to).

e.g. sudo ln -s /path/to/desktop/files/nameofprogram.desktop 
/usr/share/applications/nameofprogram.desktop


I don't know how much of this is the *correct* way of doing it, so I'd 
be open to other people's responses & changes if there are improvements 
to be made!


Good luck!


On 8/12/21 8:41 AM, Ingo Foerster wrote:
> I have a question about Fox-Toolkit and Icons. I do not know whether
> this is a Fox-Toolkit issue.
> However I compile the app on Windows, all Icons inside the Taskbar are shown.
> If I compile the same app on Linux Ubuntu and start the app, there is
> no icon inside the app and also not in the left hand bar. Just an
> iconless entry that represents the window.
>
> I have created the resource (resources.h and resources.cpp) files with
> reswrap.exe on Windows from ico files. The menu actions contain their
> icon/image.
>
> Maybe someone can help out even if it is nothing about Fox-Toolkit. If
> so, sorry to bother you.
>
>
> _______________________________________________
> Foxgui-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/foxgui-users
-- 

David Vereb
/Lead Software Developer/
Office: 814.456.7001
1851 Rudolph Avenue
Erie, PA 16502
www.eriestrayer.com <http://www.eriestrayer.com/>
Erie Strayer Company Logo & Social Media Icons

_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.