Re: Icons on Linux
Jeroen <[email protected]>
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 12 Aug 2021 08:52:26 -0400 David Vereb <[email protected]> wrote: >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! Yes, this is correct. On XFCE, you can do this via GUI: Right click on background to get the popup menu: Select "Create Launcher" Then fill in Name, Command, and click "Icon" to select an icon file to be used for the desktop icon [I suggest to point it to a (copy of) the exact icon used in your application]. And then Bob's your uncle, as they say.... -- JVZ -- +----------------------------------------------------------------------------+ | Copyright (C) 18:00 08/ 7/2021 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ _______________________________________________ Foxgui-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/foxgui-users