You are not logged in.

#1 2019-01-21 17:38:26

12oclocker
Member
Registered: 2016-01-18
Posts: 38

[SOLVED] missing icons for *.h *.c *.sh mimes

I would like to find and replace the mime icons for *.c and *.h and *.sh files
All I can find are ubuntu examples which do not seem to work for bunsenlabs.
Anyone know how I can do this?

Last edited by 12oclocker (2019-01-22 06:06:27)

Offline

#2 2019-01-21 20:50:39

damo
....moderator....
Registered: 2015-08-20
Posts: 4,830

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

12oclocker wrote:

I would like to find and replace the mime icons for *.c and *.h and *.sh files
All I can find are ubuntu examples which do not seem to work for bunsenlabs.
Anyone know how I can do this?

"Do not seem to work"? What have you tried so far?

Do equivalent icons exist in the theme you are using, and if so what are they called? If they exist already then you could replace them with the ones you have found.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2019-01-21 22:49:19

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

I cannot find any icons in /home/user/.local/share/ that reference *.c and *.h and *.sh files
I have tried looking for icons to replace, cannot find any icons.
cannot find any references to *.c and *.h and *.sh files in any of the xml files in that location eithor.
but again, I am not sure what I am looking for, or if I am looking in the correct location.

Offline

#4 2019-01-21 22:56:18

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

I did a... file --mime-type main.c
it returned... main.c: text/x-c
Then I did a.... sudo find ./ -type f -exec grep -H 'text/x-c' {} \;
it returned...

Binary file ./clipit/history matches
./mime/text/x-component.xml:<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="text/x-component">
./mime/packages/x-wine-extension-htc.xml:  <mime-type type="text/x-component">
./mime/globs:text/x-component:*.htc
./mime/types:text/x-component
Binary file ./mime/mime.cache matches
./mime/globs2:50:text/x-component:*.htc
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-c++src"/>
./recently-used.xbel:        <mime:mime-type type="text/x-csrc"/>


not sure what to do now

Offline

#5 2019-01-21 23:14:01

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Thing is bunsenlabs older versions has icons for *.h and *.sh files, now Hydrogen only seems to have icons for *.c files... my .h and .sh files look just like regular text files in Hydrogen, which is very bothersome for me. Maybe bunsenlabs can possibly fix in next release? meantime I am trying to fix on my own.

Offline

#6 2019-01-21 23:29:14

damo
....moderator....
Registered: 2015-08-20
Posts: 4,830

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

damo wrote:

....
Do equivalent icons exist in the theme you are using, and if so what are they called? If they exist already then you could replace them with the ones you have found.

Find which icon set you are using, then look in /usr/share/icons/$icontheme/. I suggest you copy it to ~/.icons, then search for eg text-x-c.png, etc. Replace them with the same sizes from whatever theme you like.

EDIT:

Hydrogen only seems to have icons for *.c files

I missed that bit hmm  NB The current BL is Helium, and there was only Hydrogen before that. The issue is with the icon sets you are using, so find one that works and install it to ~/.icons. Don't forget to refresh the icon cache, or log out/in again.

Last edited by damo (2019-01-21 23:39:24)


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2019-01-22 01:49:28

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

sorry I got the names mixed up, I am using the newest bunsenlabs, I installed it friday, Helium4 or something like that. This new Helium4 does not have any icons for .h or .sh files, which is a bummer. I did a search as you said and cannot find anything for .h or .sh, so I am trying to figure out how to add them. If you have any info on how to do it that would be great

Offline

#8 2019-01-22 02:27:10

damo
....moderator....
Registered: 2015-08-20
Posts: 4,830

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

12oclocker wrote:

I did a search as you said and cannot find anything for .h or .sh, so I am trying to figure out how to add them. If you have any info on how to do it that would be great

damo repeating wrote:

The issue is with the icon sets you are using, so find one that works and install it to ~/.icons. Don't forget to refresh the icon cache, or log out/in again.

You already said that you found icons in ubuntu (NB "which do not seem to work" isn't very helpful). Why not install that icon theme and use that (add it to ~/.icons as already described)? Or copy the ones you want into whichever theme you are using with BL?

Menu -> Preferences -> Appearance -> Icon Theme
Menu -> Help & Resources -> Theme Resources

Or you could copy and edit the .c icon and make it look like you want for .h and .sh. Then associate the new icon with the mimetype: Google this search term: "linux associate mimetype with icon"

Last edited by damo (2019-01-22 02:31:42)


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#9 2019-01-22 03:06:03

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

I followed some online instructions from various websites, but none of them seem to change the icons for *.c *.h *.sh files...
I downloaded some svg icons I want to use...
found the entries in... /etc/mime.types
text/x-chdr     h
text/x-csrc     c
text/x-sh     sh
I then copied the icons...
sudo cp *.svg /usr/share/icons/gnome/scalable/mimetypes
sudo cp *.svg /usr/share/icons/Adwaita/scalable/mimetypes
gtk-update-icon-cache
also tried applying the different themes via LXAppearance, but nothing so far has allowed me to set the *.c *.h *.sh icons.
there are no icons in my /home/user/.local/share/mime/ or /home/user/.local/share/themes/
only in /usr/share/icons/

I figured out the missing default icons are supposed to be...
text-x-csrc.png
text-x-chdr.png
text-x-sh.png
They appear in /etc/mime.types but the actual icons are missing from the newest bunsenlabs distro, maybe we can get them added back in? I cannot figure out where to put them.

Last edited by 12oclocker (2019-01-22 03:15:00)

Offline

#10 2019-01-22 03:40:26

damo
....moderator....
Registered: 2015-08-20
Posts: 4,830

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

12oclocker wrote:

...
I figured out the missing default icons are supposed to be...
text-x-csrc.png
text-x-chdr.png
text-x-sh.png
They appear in /etc/mime.types but the actual icons are missing from the newest bunsenlabs distro, maybe we can get them added back in? I cannot figure out where to put them.

Let's try one last time hmm ....

Add them to whichever icon theme you have set with lxappearance, in /usr/share/icons OR (recommended) copy the icon theme to ~/.icons and edit that version. Add them to the mimetypes directories.

If you think others may benefit from having them included in the BL iconsets, then make a suggestion in Development & Suggestions


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#11 2019-01-22 03:56:10

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 730

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

@damo I'd benefit, it's just something I don't care enough about to change :-)

I suspect anyone picking the dev packages in bl-welcome would benefit too, & likely like me they're not *all that* bothered & too lazy to change it, or just tweak it if they do care.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#12 2019-01-22 04:10:46

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Let's try one last time hmm ....

Add them to whichever icon theme you have set with lxappearance, in /usr/share/icons OR (recommended) copy the icon theme to ~/.icons and edit that version. Add them to the mimetypes directories.

I tried that, I am tearing my hair out on this... One of the websites with some good info was this...
https://askubuntu.com/questions/52138/h … -file-type
and I have spent two days on this seemingly simple task, I have copied the icons into every folder just for inasinity check, and that did not matter, png, svg, does not matter. No matter where I put the icons, what I do, how many times I update icon cache or how many times I restart, I am stuck on the default "no icon" images. Their must be "something else" I have to do. Because just having an entry in /etc/mime.types does not seem to make anything look for an icon in /usr/share/icons/... If the icon is in every folder for every theme, I would think it would show up by now. I will continue working on it.

Last edited by 12oclocker (2019-01-22 04:11:13)

Offline

#13 2019-01-22 04:21:45

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Holey Moley , found the problem, if a file is empty, it will NOT show the icons!, I created empty .c and .h  files for testing, they NEVER showed the icons....
I copied over some .c and .h files from one of my project folders to the newly installed bunsenlabs PC, and boom! the icons showed up! Then I edited the blank .c and .h files, and put some stuff in them... boom! icons showed up! What the heck! I did not know that could happen...
But yes if we can get these icons by default, that would be fantastic, I love the default debian icons the old bunsenlabs distro's used, I am having a hard time finding those icons online.

Last edited by 12oclocker (2019-01-22 04:23:32)

Offline

#14 2019-01-22 04:51:19

damo
....moderator....
Registered: 2015-08-20
Posts: 4,830

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Hydrogen used icons based on the Faenza set IIRC. Maybe that has what you want?

If you think the problem is sorted then please add "[SOLVED]" by editing the title of your first post. NB  "icons" as a Help request title isn't very informative wink


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#15 2019-01-22 05:38:02

hhh
That's it!
Registered: 2015-09-17
Posts: 7,250
Website

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

bunsen-faenza-icon-theme. Extract to the hidden folder ./local/share/icons

https://github.com/BunsenLabs/bunsen-faenza-icon-theme

You also need the Debian Faenza theme, I believe, if you don't use apt to install the Bunsen theme...

https://packages.debian.org/stretch/faenza-icon-theme

Offline

#16 2019-01-22 06:13:22

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Thanks! I downloaded that faenza theme, I will see if that was the one I was using before in a previous distro... I did manage to create my own theme, I based it on one of the existing, and then copied in the missing icons ;-)

Offline

#17 2019-01-22 06:15:31

12oclocker
Member
Registered: 2016-01-18
Posts: 38

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

Thanks everyone! I downloaded that faenza theme, I will see if that was the one I was using before in a previous distro... I did manage to create my own theme, I based it on one of the existing, and then copied in the missing icons smile
It's so much nicer being able to tell my C, CPP, H, files at a glance, my eyes are not a sharp as they use to be, every little extra helps glasses

Last edited by 12oclocker (2019-01-22 06:16:09)

Offline

#18 2019-01-22 06:46:02

ohnonot
...again
Registered: 2015-09-29
Posts: 3,584
Website

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

12oclocker wrote:

I downloaded that faenza theme

isn't faenza already part of a standard bunsenlabs install?
in any case,

apt install faenza-icon-theme

(or similar) would be the right way to go.

Offline

#19 2019-01-22 06:57:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 5,143
Website

Re: [SOLVED] missing icons for *.h *.c *.sh mimes

btw bunsen-faenza-icon-theme is available in the Helium repos so you can just install it with apt-get the usual way, and it will pull in faenza-icon-theme as a dependency.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

Board footer

Powered by FluxBB