How to change the icon of a volume/drive?

BTW, is there a way to change the image of a particular USB device? In other words, say I wanted my USB thumb drive to show up as a 5.25" floppy diskette (silly, I know, but still…) instead of the usual USB thumb drive image. How would Haiku know to apply that image to just that particular USB thumb drive when it was mounted?

BTW, is there a way to change the image of a particular USB device?

Select the disk from either Desktop or Tracker’s root (“/”) folder… open Add-ons->FileType… and then drop the desired icon in the aptly named “Icon” part of that window.

If you don’t like it… you can “right-click” on the icon, and hit “Remove icon” to restore the original one.

But does that affect all USB thumb drives or just THAT particular one?

Works on a per-volume (parttion) only. And only for those using BFS, I would assume (the only one I’ve tested).

Unfortunately, I cannot seem to change the image. I right-click on the USB icon and go to Add-ons/Filetype and I see a folder icon. I tried dragging a known icon file from the build directory to that folder icon and it does nothing. If I try to Edit the folder icon, all I get is a blank Icon-o-Matic screen. How am I supposed to change the USB icon to something else? Nothing I’m doing seems to work.

I just dropped a text file over it, and got the text-file icon in there, for example. Seems it only allows to “clone” the icon from an existing file type now? Might be a bit buggy, as in the old BeOS days, you could simply drag and drop there any icon you wanted.

I don’t want a file type icon (like a text file, .mp3, video, etc.), I want a floppy disk icon. And Haiku has one, but I don’t know how to assign it to my USB Thumb Drive.

I’m just giving the options I know of. I understand it may not be what you (or I, for that matter) would prefer, but… such is the state of things, I think.

Maybe you should open a ticket on Trac, and hope a dev can give it some time to try and improve things there.

Maybe this?

1 Like

@Luposian

Good news… Managed to change the icon from a standard BFS volume, to the one for the floppy drive!

Process is a pain in the rear, specially compared to how I remember it was on BeOS’s days, but… Here’s what worked for me:

  1. Download Haiku’s “Device floppy” icon: wget https://cgit.haiku-os.org/haiku/plain/data/artwork/icons/Device_Floppy.
  2. Open the drive for which you want to change the icon with the FileTypes Tracker add-on.
  3. Right click on the folder icon, select Edit Icon. Icon-O-Matic (IOM) will open.
  4. On IOM, select File->Append and navigate to wherever you downloaded Device_Floppy (or other Haiku icon you want).
  5. On IOM, select File->Save. Close IOM.

There! your drive should have a new icon set!

Beware, thou!.. the “Remove icon” from that FileType window did NOT worked for me. To restore the original icon… I had to resort to using the command line:

> rmattr 'BEOS:ICON' /NameOfYourDriveHere

Hope it helps… at least until things get improved, because this process is WAY too convoluted smiley:

Edit: THIS needs to be filed as a Trac ticket if there isn’t one already. Task for when I’m less sleepy :smiley:

If you can remove it with rmattr, perhaps can you use addattr to change it?
Of course it needs an icon at the right format.

Sure thing! But “it was simply a drag-and-drop operation in BeOS days” is my pain point here :smiley:

Edit: for the record… I did tried exporting the icon as .hvif [1] and drag-and-droping that without success. Had to use the same “append icon via Icon-O-Matic and save it” method with the .hvif file.

[1] as that’s the format used for BEOS:ICON attributes, with type: VICON.

Hi @Luposian thank you for your kind words!

Sorry for the late response, I have been pretty disconnected from Haiku lately.

I was writing a response to you but as I see that most of it has already been responded by others in this thread I’ll respond here for the benefit of the discussion.

I see you already located the disquette icon in the Haiku repo.
I guess you also noticed the two other icons that feature a disquette but I mention them just in case, they are a few lines below the Device_Floppy one, they’re called Device_USB_Floppy and Device_USB_Zip.
The floppy they use is slightly different from the main floppy one, go figure why…

With regards to being able to customize a drive icon, I’m all for it!

I already upvoted zuMi’s feature request tiquet.

I have been doing this for years in the Mac (and I kind of remember that it was also possible when I was still using Windows XP?) and would love to have it in Haiku also.

To me the ideal way to do it in a portable drive will be to do it in the most portable way possible.

That means so that it not only works in a BeFS formatted volume, but in any filesystem that Haiku is able to write on.

This has the implication that there needs to be a way to export the icon in the Mac .icns icon format (I think this is already possible) and write it in the drive in the same way the Mac does it, with a hidden folder and some files inside it.

Same for Windows.

And ideally also for Linux but I don’t know if there’s some kind of universally accepted solution with regards to volume icons or if it will need a different implementation for every desktop environment.

Uff, too much linuxes :frowning:

And when the needed ability to deal with other OSs icons is already implemented, it could also be possible to honor the icon customizations done by the user in those other OSs.

This last will feel like a very welcoming detail, I think.