Opened 9 years ago

Closed 9 years ago

#6411 closed enhancement (invalid)

create binaries for addicon, rmicon, ...

Reported by: mmadia Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


Creating binaries to allow commandline manipulation of a file's HVIF icon would be useful. Tests show that the icon seems to be cached as type 'VICN' in the "BEOS:ICON" attribute -- so, addattr/rmattr would not be effective. (plus addattr does not support type 'VICN')

Somewhat related to haiku-3rdparty-dev:Setting vector icons for types

Change History (5)

comment:1 by idefix, 9 years ago

Doesn't the following work:

addattr -t "'VICN'" "BEOS:ICON" <icon data> <file to write the attribute to>


addattr -f <icon data from file> -t "'VICN'" "BEOS:ICON" <file to write the attribute to>


comment:2 by mmadia, 9 years ago


addattr -t "VICN" "BEOS:ICON" /path/to/HVIF-file ApplicationName
addattr: attribute type "VICN" is not valid
        Try one of: string, mime, int, llong, float, double,
                bool, raw, or a numeric value (ie. 0x1234, 42, 'ABCD', ...)

addattr -f <HVIF file> "BEOS:ICON" ApplicationName does not output an error. However, it does not work as the type becomes `Text'

This can be better seen by removing the icon attribute and then identifying the file. `rmattr "BEOS:ICON" ApplicationName` will remove the attribute and cause Tracker to display the default application icon -- however, once the file is identified, the icon will be restored.

comment:3 by idefix, 9 years ago

Do note the two ' in:


comment:4 by idefix, 9 years ago

I've just confirmed that:

touch test
addattr -f hvifdata -t "'VICN'" "BEOS:ICON" test

(where hvifdata is the hvif file saved with icon-o-matic) works as expected.

Version 0, edited 9 years ago by idefix (next)

comment:5 by mmadia, 9 years ago

Resolution: invalid
Status: newclosed

After an explanation with Rene: rmattr indeed is working. It just doesn't modify the program's resources. That's where it was confusing me.


Note: See TracTickets for help on using tickets.