Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-02-01 07:21:11

frmald
Member
Registered: 2021-01-02
Posts: 22

Icon search path?

I'm having trouble adding an icon for a custom .desktop file that I installed. I've tried adding the icon in /usr/local/share/icons, ~/.local/share/icons, .../hicolor, .../hicolor/48x48. Still the .desktop file appears with a generic gear icon.

I've tried running gtk-update-icon-cache -- still no changes.

Is there a way to print / customize the icon search path?

Also, is there an icon-lookup utility, so that once the display changes, I can tell which icon file is actually being used (some themes, like Papirus, seem to offer icons for many common apps)?

Last edited by frmald (2021-02-01 07:23:38)

Offline

#2 2021-02-01 09:11:46

frmald
Member
Registered: 2021-01-02
Posts: 22

Re: Icon search path?

Ah. I've figured out what the original problem was. Icon=name.with.dots entries are not honored by XFCE, even if name.with.dots.png exists. Nasty. Apps create such .desktop files (e.g. Inkscape)

But still, I'm curious about the search paths, as this "should" be easily available / debuggable.

Last edited by frmald (2021-02-01 09:13:05)

Offline

#3 2021-02-01 12:22:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Icon search path?

frmald wrote:

Ah. I've figured out what the original problem was. Icon=name.with.dots entries are not honored by XFCE, even if name.with.dots.png exists. Nasty. Apps create such .desktop files (e.g. Inkscape)

This was fixed in exo versions xfce-4.16pre2 and exo-4.15.3. Are you using an earlier version of exo?

But still, I'm curious about the search paths, as this "should" be easily available / debuggable.

I agree, but I haven't seen one yet. You could strace an application to see what icon files it opens/uses. There is also "gtk3-icon-browser" which lists some of the icons, but doesn't show the actual path of where they are located. Ultimately, there are the freedeskop icon theme specification (that talks about search paths) and the freedesktop icon naming specification.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2021-02-01 15:19:05

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: Icon search path?

Yes, icons in /usr/share/icons/hicolor/48x48/ seem to get lost. So I stick them in /usr/share/pixmaps/ and they are found by only basename without a full path. With an odd name with extra dots I think it needs full path with quotes.

Offline

#5 2021-02-01 23:38:52

peter.48
Member
From: France, sud-ouest
Registered: 2017-01-31
Posts: 156

Re: Icon search path?

And why not do it in the simplest way, which is to create an .icons folder in your /home/user/ and there put the icons and icon themes you want?
With the .desktop I don't understand your problem, you can have the icon wherever you want and just add the path to the .desktop (it couldn't be simpler).

Last edited by peter.48 (2021-02-01 23:44:29)

Offline

#6 2021-02-14 07:15:03

frmald
Member
Registered: 2021-01-02
Posts: 22

Re: Icon search path?

peter.48 wrote:

And why not do it in the simplest way, which is to create an .icons folder in your /home/user/ and there put the icons and icon themes you want?

Ah. Originally, I tried using various locations under ~/, ~/.local/share etc. But having dots in the name prevents XFCE from using them (probably fixed in more recent versions, as ToZ pointed out).

In any case, Linux is supposed to be multi-user, and having each user work around the lack of centralized icons doesn't seem the right thing.

peter.48 wrote:

With the .desktop I don't understand your problem, you can have the icon wherever you want and just add the path to the .desktop (it couldn't be simpler).

I don't think you specify full icon paths in the Icon= line of the .desktop -- at least I've only seen names without extension and without path.

Last edited by frmald (2021-02-14 07:15:51)

Offline

#7 2021-02-14 08:09:29

peter.48
Member
From: France, sud-ouest
Registered: 2017-01-31
Posts: 156

Re: Icon search path?

As I really like different icons, I have a mix of modified Hedera, Adwaita, Gnome and my own created icons, and both in the .desktop found in /usr/share/applications/, and in /home/peter/.local/share/applications/ I put whole paths of icons I have in a folder not even in my personal folder, and the ones I have in my home too (same for the desktop and menu launchers).
something like that:

Icon=/casa_1/trastero/Grafica/ICONOS/iconos_PNG/carpeta_varios/engranaje_3.png
Icon=/home/peter/.icons/tempest_icono.png

I mainly use the ones from another partition (for me /home is just a configuration folder, I even have downloads elsewhere - this is a post-Windows trauma wink , I've never used C:\ for data, I have always created other partitions and so I continue in linux),  but some are from /.icons and works the same.
Only for icons that appear in the notification area, when there is no other choice, I do some tinkering in /usr/share/icons.

Last edited by peter.48 (2021-02-14 08:13:29)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 560.23 KiB (Peak: 561.08 KiB) ]