Custom icons for **both** Windows and Linux


ultome

New member
Local time
10:45 AM
Posts
6
OS
Windows 11
I know how to change the icon of a file/folder on Linux (using Dolphin in my case).

I know also how to change the icon of a file/folder on Windows 11, both directly in the parameters and using a desktop.ini file.

I'm more interested in this second option because I want to cusomize icons on an external sotrage unit (so the drive contains the icons it needs to display, and so I need to have the system look at the relative path --on Windows at least, with these stories about varying drive letters). But when I'm done creating (and hiding) all the desktop.ini files and my folders look all pretty in Windows, and I go back to Linux... The icons are the default icons. I expected that much, so I changed the icons the Dolphin way, in the naive hope that it wouldn't beak my "Windows setup".

But it did! On Windows the nice icons don't show anymore, the folders are back to default, even though the desktop.ini are still there and unmodified!!!

This is really anoying. The exact details: there a a few folders on my drive, and the first one (Backups) looks like this:


* Backups
* desktop.ini​
* .hidden​
* .directory​

\- desktop.ini:

[.ShellClassInfo]
IconResource=..\.icons\ICO\Backups.ico,0

\- .hidden:

System Volume Information
desktop.ini

\- and .directoy:

[Desktop Entry]
Icon=/run/media/myusername/Appendix/.icons/ICO/Backups.ico

(Appendix is the label of my pendrive).

So if anyone has tried this before, all help is welcome. I think I'm close but something's eluding me. I guess on the Windows side.

Thanks! (I hope the old Microsoft/Linux hostility will no lay against me as far as your advice here is concerned...)
 
Windows Build/Version
Windows 11 version 2022H2

My Computer

System One

  • OS
    Windows 11

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
Well, from the Windows side, it might explain why Windows is not picking up your chosen Backups.ico file even though the desktop.ini file is still there and unmodified. Was that not the purpose of your question? Please explain further if you thought the question to be different. ;-)
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
The tag should read IconFile, not IconResource.
Both can be present, as in file below

Code:
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790
IconFile=%SystemRoot%\system32\shell32.dll
InfoTip=@%SystemRoot%\system32\shell32.dll,-12689
ConfirmFileOp=0
IconResource=%SystemRoot%\system32\imageres.dll,-108
IconIndex=-237

 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Both can be present, as in file below

Code:
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790
IconFile=%SystemRoot%\system32\shell32.dll
InfoTip=@%SystemRoot%\system32\shell32.dll,-12689
ConfirmFileOp=0
IconResource=%SystemRoot%\system32\imageres.dll,-108
IconIndex=-237

Thanks. They look similar, but I don't think they are identical.
According to Wikipedia, ICO files "contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately."

And "Icon resources: Icons in Portable Executable (EXE or DLL) files are organised in resources ..."
Accordingly, the O.P. has an ICO file, not a resource. Which could explain the behaviour described in the Question detail.
ICO (file format) - Wikipedia
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
Well, from the Windows side, it might explain why Windows is not picking up your chosen Backups.ico file even though the desktop.ini file is still there and unmodified. Was that not the purpose of your question? Please explain further if you thought the question to be different. ;-)
I see what you mean. I'll try it out! Thanks!
 

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Back
Top Bottom