HWP and HWPX are like DOC and DOCX. By default, it seems that EOS shows a good icon for the HWP file, but it shows a ZIP icon for the HWPX file. I changed the association from the archive manager to LibreOFfice, but the icon is still ZIP. How can I make HWPX have the same icon as HWP?
Hey there! Changing icons in GNOME is actually pretty cool and straightforward. If youâre tired of seeing that boring ZIP icon for your HWPX files and want them to match the snazzy HWP icon, follow these steps:
-
Get âAssogiateâ:
First, you gotta grab âAssogiate.â Itâs like a secret agent for file associations in Linux. Install it from the Arch User Repository (AUR) using yay or your favorite AUR helper:yay -S assogiate
-
Open Assogiate:
Find âAssogiateâ in your apps or typeassogiate
in the terminal. -
Hunt Down HWPX:
In Assogiate, scroll through the list of MIME types to find the one related to HWPX files. Itâs probably named âapplication/zipâ or something similar. -
Give It a Makeover:
Once youâve located HWPXâs MIME type, click âEdit.â -
Choose a New Outfit:
Look for the option to change the icon. Itâs usually a tiny picture. Click on it and pick a fresh, stylish icon for your HWPX files. You can either use one from the list or upload your own. -
Save Your Changes:
After youâve chosen the new icon, hit âOKâ to save your changes. -
Reload GNOME:
To make sure your changes kick in, you might need to refresh GNOME. Do that by pressingAlt
+F2
, typing ârâ in the Run Application box, and hitting Enter. GNOME will get a quick makeover! -
Check It Out:
Now, open a HWPX file in your file manager, and voilĂ ! It should sport the new icon youâve picked.
And there you have it! Your HWPX files are ready to party with the same icon as HWP files. Enjoy your fresh look!
Also, the problem seems to be that the system is not recognising the â.hwpxâ extension as a new type but it thinks it is a type of ZIP. That is, if I change the default app for the HWPX file to Writer, real ZIP files also get associated to Writer.
As far as I know, Windows determines the file type only by the file extension (that is, if you rename âtest.zipâ to âtest.txtâ, it will treat it as a text file), but I suspect that Gnome actually read the file signature for files with unknown file extensions. Since HWPX, like DOCX, is actually a ZIP archive, it has the ZIP signature. It seems that since Gnome does not know about HWPX, it reads the file signature and thinks it as a ZIP file, and use the default app for ZIP and changing the default app for âHWPXâ also changes that for ZIP.
I understand your frustration with not being able to find âAssogiateâ in the AUR, and your observation about the file extension issue is spot on.
Youâre right that GNOME and other Linux desktop environments often rely on both file extensions and file signatures (magic numbers) to determine file types. This can sometimes lead to unintended associations, as youâve described with the HWPX files and ZIP files.
To tackle this issue and make sure HWPX files are recognized correctly, you can try the following:
-
File Association Method:
As you mentioned, Linux desktop environments often use both file extensions and signatures. Since HWPX files are ZIP archives, they have the ZIP signature. This can lead to conflicts. To resolve this, you can manually edit the file association for HWPX files, making sure it doesnât affect ZIP files:- Right-click on an HWPX file.
- Choose âPropertiesâ or âOpen With Other Application.â
- Select the application you want (e.g., LibreOffice Writer) and make sure to check the box that says âSet as default.â
- Repeat this process for ZIP files but associate them with your preferred archive manager (e.g., File Roller).
This should help you set the default application for HWPX files without interfering with ZIP files.
-
Extension Override:
If the above method doesnât work, you can try explicitly defining the file extension association in GNOME. To do this:-
Open the terminal and run the following command to create a MIME type definition for HWPX files:
xdg-mime default libreoffice-writer.desktop application/vnd.hancom.hwp
-
Now, run this command to make sure GNOME recognizes it:
xdg-mime query default application/vnd.hancom.hwp
-
This should set the correct association for HWPX files without affecting ZIP files.
Give these methods a try, and hopefully, it will resolve the issue with HWPX files being treated as ZIP archives. If you have any further questions or run into any more snags, feel free to ask!