Recent

Author Topic: howto associate my custom icon with my program  (Read 2449 times)

jw

  • Full Member
  • ***
  • Posts: 126
howto associate my custom icon with my program
« on: April 27, 2018, 04:50:23 am »
Linux mint 18.3 XFCE
FPC 3
lazarus 1.8.0

It seems that Linux ELF's do allow for embedded icon information.  So loading in my cool icon under project options does nothing; yet firefox has managed to associate an icon with their app somehow.  So does anybody know of a way to provide icon information to linux via a simple stand alone executable with no need for it's own directory etc? 

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: howto associate my custom icon with my program
« Reply #1 on: April 27, 2018, 05:31:22 am »
On Windows you can do it with RESOURCE HACKER (FREEWARE) or use any other ResEditor...
Find yourself a nice editor for Linux if you don't like the LAZARUS-WAY (Project Options -> Applications Settings).  :)
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: howto associate my custom icon with my program
« Reply #2 on: April 27, 2018, 05:34:23 am »
Linux mint 18.3 XFCE
FPC 3
lazarus 1.8.0

It seems that Linux ELF's do allow for embedded icon information.  So loading in my cool icon under project options does nothing; yet firefox has managed to associate an icon with their app somehow.  So does anybody know of a way to provide icon information to linux via a simple stand alone executable with no need for it's own directory etc?

On Ubuntu, an app's .desktop file specifies its icon. See the lazarus.desktop file in /usr/share/applications. The icon itself (lazarus.png) is in /usr/share/pixmaps.

Look for Firefox's: find / -name firefox.png

When you install a .deb package, it copies the app's .desktop and icon .png file to their respective locations.

Embedding the icon in the executable is a Windows thing. That's not how Linux or macOS does it.

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: howto associate my custom icon with my program
« Reply #3 on: April 27, 2018, 05:41:02 am »
Quote
Embedding the icon in the executable is a Windows thing. That's not how Linux or macOS does it.
Aaaah, Ok.... Windows is sooooo smart.... of course not every Windows version...  :D
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

 

TinyPortal © 2005-2018