Need help for changing filetype icon-image & pathbar in nautilus

14 risposte [Ultimo contenuto]
Harvey .
Offline
Iscritto: 12/17/2012

Hello,
I use ubuntu-tweak to allow direct typing path in nautilus instead of the folder-button like path bar. But, yesterday i ran janitor & bleachbit and now everything is reverted back. I switched the option "Use Location Entry instead of Pathbar" many times but no change.
Also, i keep the sidebar hidden, but its also being displayed whenever nautilus opens a folder.

Anyone can help me fix above problem and is there way to change the icon image corresponding to a filetype?

Thanks.

Harvey .
Offline
Iscritto: 12/17/2012

I dont know how to edit my above post. Moderator please remove the ubuntu-tweak section above. It was silly of me to not restart. Wiping free space by bleachbit caused the temporary problems. The Nautilus customizations are all fine now.

But, im still not able to find a way to change the icon image corresponding to a filetype.

Please help if anyone knows how to do that.
Thanks.

Andres Muniz
Offline
Iscritto: 10/28/2012

----- Mensaje original -----
> I dont know how to edit my above post. Moderator please remove the 
> ubuntu-tweak section above. It was silly of me to not restart. Wiping
> free    space by bleachbit caused the temporary problems. The Nautilus
> customizations    are all fine now.
>

sorry, can't help you. But as a note for new linux users: normally loging in and out is enough for most things. No need to restart PC. Also alt+f2 and ryping r could be enough.

Harvey .
Offline
Iscritto: 12/17/2012

my search on google lead me to assogiate. But, it is not working.
Anyone know manual procedure or any other program that works on trisquel 5.5, to change icon image associated with file types?

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

Wouldn't you rather change the whole theme? This is documented in many places on the Web. That said, I am not certain it would perfectly work if using the GNOME Classic fallback (Trisquel Brigantia's default)...

The themes are in /usr/share/themes. To edit a theme you probably want to copy it first to ~/.themes so that it does not affect other users and would not be overridden by an update. If you want new users to have the modified theme you would then copy ~/.themes to /etc/skel/.themes

Harvey .
Offline
Iscritto: 12/17/2012

to change icon-image associated with filetype/mimetype i would have to do theme editing?

.themes was not there, created it.
Copied the Trisquel dir from /usr/share/themes/ to ~/.themes/

I looked inside all dirs inside the Trisquel dir. I am not able to find any icons for filetypes/mimetypes. Lots of close, minimize, restore images.

What do i do next?

Also, Could you please check if assogiate works for you?

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

Most icons seems to be in /usr/share/icons/gnome-brave/scalable/places (/usr/share/icons/*/*/* for the rest of them). I believe the themes must indicate what icons to use. You could, of course overwrite the images but that does not look clean. Besides, any update would override your modification.

What is "assogiate"?

Harvey .
Offline
Iscritto: 12/17/2012

So, how to give the paths to my icon-images for corresponding filetype/mimetype?

assogiate is the File Type editor.
$sudo apt-get install assogiate
$assogiate

I assigned the new icon-image's path for default icon of filetype/mimetype and assogiate also shows the new icon image. But, Nautilus is using the old icon-image. i restarted, still no change w.r.t nautilus, but its properly showing new icon in the assogiate list.

lembas
Offline
Iscritto: 05/13/2010

Perhaps you need to rebuild the icon cache? Maybe try gtk-update-icon-cache

Harvey .
Offline
Iscritto: 12/17/2012

gtk-update-icon-cache is fired automatically on editing in assogiate, as terminal shows mesg

"gtk-update-icon-cache: Cache file created successfully."

I did it again anyways, but no change in nautilus's display of icons, it does registers in assogiate.

Could you please try out assogiate, to acertain whether it is a general issue or if problem is at my end only.

lembas
Offline
Iscritto: 05/13/2010

I tried assogiate but first it complained about a aoi.xml file being broken. This is probably true since my hard disk crashed and was scraped to recover data... Once I deleted the file the program would run. This obviously could make my findings invalid.

The icon did change in the program but then it complained it cant find gtk-update-icon-cache in path, this is true, there's only gtk-update-icon-cache-3.0 in Brigantia. I created the symlink and it didn't complain anymore but the icon didn't change in nautilus, despite restarting it.

Harvey .
Offline
Iscritto: 12/17/2012

Thank-you very much for going through the trouble of verifying whether Assogiate works or not.
Atleast now i know tht problem is not just at my end.

Harvey .
Offline
Iscritto: 12/17/2012

Not yet able to find any alternative to Assogiate or any other way to change icon-image associated with filetype.

Is there a way to change the icon of a file or folder via terminal? I could use it to write a script for changing specific batch of icons. It will be pretty bad work around, but atleast it will work.

Mampir
Offline
Iscritto: 12/16/2009

Hi!

Here's how you change desktop icons manually.

You make an "~/.icons" directory an you put your replacement icons in
it. The paths of the replacement icons should mirror the ones in
"/usr/share/icons".

You have an icon theme set. By default is set to "trisquel". You
should check your selected icon theme with the command:

gsettings get org.gnome.desktop.interface icon-theme

In the file /usr/share/icons/trisquel/index.theme there's a line that
says "Inherits=gnome-brave,gnome". That means, that any icon not
found in "trisquel" is taken from either the "gnome-brave" or "gnome"
icon theme directories. Also, "gnome-brave" inherits from
"gnome-colors-common".

To overwrite desktop icons you must mirror chosen icon filepaths from
the directories "trisquel", "gnome-brave", "gnome-colors-common" and
"gnome", which are found in "/usr/share/icons". For example, if you
want to set your own video files icon, make the following files:

  • ~/.icons/gnome/16x16/mimetypes/video-x-generic.png
  • ~/.icons/gnome/22x22/mimetypes/video-x-generic.png
  • ~/.icons/gnome/24x24/mimetypes/video-x-generic.png
  • ~/.icons/gnome/32x32/mimetypes/video-x-generic.png
  • ~/.icons/gnome/48x48/mimetypes/video-x-generic.png

The above overwrite the files:

  • /usr/share/icons/gnome/16x16/mimetypes/video-x-generic.png
  • /usr/share/icons/gnome/22x22/mimetypes/video-x-generic.png
  • /usr/share/icons/gnome/24x24/mimetypes/video-x-generic.png
  • /usr/share/icons/gnome/32x32/mimetypes/video-x-generic.png
  • /usr/share/icons/gnome/48x48/mimetypes/video-x-generic.png

An icon typically has several symbolic links to it, so the same icon
may have different names for different uses. I found the above files
are used for video file icons by looking trought the icon directories,
and testing with different filenames.

When you change an icon image you may need to refresh the window or
the desktop.

See also https://live.gnome.org/GnomeArt/Tutorials/IconThemes for more
in dept explanation on working with icon themes.

Harvey .
Offline
Iscritto: 12/17/2012

Thank-you very much! This works perfectly. I can see my new icons in Nautilus, atlast!