How to reference a personal folder of icons for the system ?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

How to reference a personal folder of icons for the system ?

Post by mIROUZ »

Hi,

I created a folder with my PNG icons inside :

Code: Select all

# mkdir /usr/share/icons/myicons
But if I type a search by name of my icons in the icon selection pane of a folder's properties, my icons don't show up.

Is there an index to refresh so that the system takes into account my new folder of icons ?

thank you
Last edited by LockBot on Tue Sep 19, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: How to reference a personal folder of icons for the system ?

Post by Cosmo. »

The search covers in the first place your home, but /usr does not belong to that. Besides that is /usr (and everything below) a bad place for your own files, because /usr gets managed by the package management and it is at every time possible, that your files get deleted without warning.

Why did you choose this place, what is your goal?
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

This is because if I drop my personal icon folders in "home/my_account/..." then I don't have the power to change the icon of "my_account" itself, because it is a level tree structure which still depends on the authority of root.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: How to reference a personal folder of icons for the system ?

Post by Cosmo. »

Then you should at least put your icons in a folder below the /opt branch, to solve the problem, that I mentioned. That does not solve your main question, of course. (Actually, I never use Nemo for searching, so I do not know possible problems.)
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

It's a good idea but it's surprising because looking at it I don't have the opt branch.
I am on Ubuntu based distro.
billyswong
Level 8
Level 8
Posts: 2189
Joined: Wed Aug 14, 2019 1:02 am

Re: How to reference a personal folder of icons for the system ?

Post by billyswong »

Try this tutorial https://wiki.archlinux.org/title/icons and see if it works for your purpose?

Some sample code copied from that page:

Code: Select all

xdg-icon-resource install --size 128 --context emblems archuser-example.png
xdg-icon-resource install --size 128 archuser-example.png
xdg-icon-resource install --size 128 --context mimetypes application-x-keepass2.png
If you got a lot of icons, they also suggested
Move the extracted folder containing the icons.
> /usr/share/icons/ (system-wide), or:
> ~/.icons/ or ~/.local/share/icons/ (user only).
Optionally run gtk-update-icon-cache -f -t on the directory that you chose to update the icon cache.
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

Ok i will look at that, thank you
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

Every time I reopen the icon selection system the system still shows me /usr/share/icons.
It's annoying to re-navigate to my home folder all the time.
Is it possible to determine another address to present by default for the icons ?
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

Well, it apparently says it's good to put it in /usr/share/icons.
If really one day after a migration or other my file disappears then I would change.
For the moment I will do like this because it is the most practical and effective that I have observed.

Thanks to you for helping me.
billyswong
Level 8
Level 8
Posts: 2189
Joined: Wed Aug 14, 2019 1:02 am

Re: How to reference a personal folder of icons for the system ?

Post by billyswong »

mIROUZ wrote: Sun Mar 19, 2023 12:05 pm Every time I reopen the icon selection system the system still shows me /usr/share/icons.
Those installation instruction are supposed to replace the whole icon theme, or let one select the installed icon theme in Menu > Themes > Icons

Meanwhile the xdg-icon-resource command is also supposed to replace icons of the same name within the existing icon theme, not for "I want this folder use custom icon x". However, there's the stupidity of "xdg-icon-resource" never support .svg files when there are a lot of icon themes using them and all the DEs are running them merrily.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: How to reference a personal folder of icons for the system ?

Post by Cosmo. »

If /opt is (not) yet there - this happens, as long there was no need for it - create it:

Code: Select all

sudo mkdir /opt
Last edited by Cosmo. on Mon Mar 20, 2023 4:31 am, edited 1 time in total.
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

@Cosmo
Do you think it is better to create OPT in Su or in Sudo ?
I have the impression that the privileges (bin) are different depending on the way ?
Last edited by mIROUZ on Mon Mar 20, 2023 2:57 am, edited 1 time in total.
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

@billyswong
Thank you
I enjoyed reading your article.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: How to reference a personal folder of icons for the system ?

Post by Cosmo. »

Sorry, my fault. I updated my advice (with sudo).
User avatar
mIROUZ
Level 2
Level 2
Posts: 93
Joined: Sun Feb 19, 2023 6:37 pm

Re: How to reference a personal folder of icons for the system ?

Post by mIROUZ »

Ok thanks
Locked

Return to “Cinnamon”