FET linux mime file and file icon

Started by Željko Vrabec, April 15, 2025, 05:41:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

#15
I succeeded on my computer, partially (the fet file is opened with FET, but it has no correct icon). The necessary command was:

sudo xdg-mime default fet.desktop application/vnd.fet.file

and maybe also this was needed:

sudo update-mime-database /usr/share/mime

But, unfortunately, I cannot make something so that these commands are automatically executed at FET installation. Maybe other people could help with advice.

I just put a new snapshot (https://lalescu.ro/liviu/Backup-fet/), which contains the fix with Exec=fet %f.

Liviu Lalescu

I hope I found the way to add the commands. There is a new snapshot (the location from the previous post) and maybe soon a new official version.

Thank you!

Željko Vrabec

#17
I was on a road and couldn't reply. At the moment I'm compiling fet on my mom's laptop and something is going wrong, but her laptop is not as powerful as mine, so it takes eternity to build the package. First I'll try to figure out what happened and then I'll give you some feedback. Please give me some more time to test snapshot before you turn it into official release.

Liviu Lalescu

OK, thank you, and sorry! I will wait for your green signal.

Željko Vrabec

Liviu on arch linux building package goes well, but installation shows some errors when system tries to update all subdirecories of /usr/share where fet files supposed to be installed into.

Liviu Lalescu

Thank you, Zeljko,

Could you please tell me: errors on "sudo make install"? Or on "make install INSTALL_ROOT=_path_"? Or when doing "sudo make uninstall"? This last part indeed shows some errors, that some directories are not empty and cannot be removed.

Also, could you please show me these errors/screenshot? If private: fet4 AT lalescu.ro or liv4 AT lalescu.ro.

Željko Vrabec

Hi Liviu!

When I build package for arch linux everything goes well but when I try to install it I get:

error: failed to commit transaction (conflicting files)
fet-timetabling: /usr/share/mime/XMLnamespaces exists in filesystem
fet-timetabling: /usr/share/mime/aliases exists in filesystem
fet-timetabling: /usr/share/mime/generic-icons exists in filesystem
fet-timetabling: /usr/share/mime/globs exists in filesystem
fet-timetabling: /usr/share/mime/globs2 exists in filesystem
fet-timetabling: /usr/share/mime/icons exists in filesystem
fet-timetabling: /usr/share/mime/magic exists in filesystem
fet-timetabling: /usr/share/mime/mime.cache exists in filesystem
fet-timetabling: /usr/share/mime/subclasses exists in filesystem
fet-timetabling: /usr/share/mime/treemagic exists in filesystem
fet-timetabling: /usr/share/mime/types exists in filesystem
fet-timetabling: /usr/share/mime/version exists in filesystem
Errors occurred, no packages were upgraded.

I build the package using AUR PKGBUILD file modified to use qt6 instead of qt5.

Liviu Lalescu

Thank you, Zeljko! I think it is because of one or both GNU/Linux commands I use in the installer (update-mime-database or xdg-mime). I will try to see if there is a way to use these two commands without overwriting/generating "already existing" errors.

Unfortunately, I cannot check if I can fix these errors, since I get no error on my computer. So, kindly please let me know if you can help checking these, if I find some solutions.

So, as it is now, with these errors, the FET package is useful, or I should definitely correct these errors because compilation/deployment is broken on such systems?

Željko Vrabec

#23
Sure I can and will help! Give me some time to try something. I'm running compiler again.

Liviu Lalescu

Thank you very much!

I found:

https://bbs.archlinux.org/viewtopic.php?id=199695 (10 years old)

and with "xdg-icon-resource forceupdate --theme hicolor" I obtained the FET icon :-)

Could you please let me know if you understand the page above and tell me if it is your problem or I still need to search for the solution on my side?

Liviu Lalescu

OK, thank you! Note: you might not need to recompile, but just to run qmake, and the main Makefile is updated.

Liviu Lalescu

#26
Dear Zeljko,

I searched the internet, also searched other applications. In the applications, I could not find the string "update-mime-database" (in their source code). So, I think these three commands (to update the mime and icons) should be done by the user or by a script.

So, I only added your mime XML file, and added in the README the instruction to execute the three update commands.

I hope to release tomorrow morning the new version (in about 12 hours from now).

Thank you!

Željko Vrabec

Dear Liviu,

in fet.pro just comment these two lines:

# A dummy path for update_mime is given so that QMake does not issue a warning and ignore the entry.
#update_mime.path = /usr/share
#update_mime.extra = update-mime-database $(INSTALL_ROOT)/usr/share/mime || true

and everything works like charm. It seems like OS is updating mime database by himself after package installation.

Thank you very much for your effort!

Liviu Lalescu

Thank you, Zeljko,

Yes, this is what I was telling, that the update stuff should be done by Arch GNU/Linux after make install. In the fet.pro I deactivated these 3 updates:

   xdg-icon-resource forceupdate --theme hicolor
   update-mime-database /usr/share/mime
   update-desktop-database

which are probably done automatically by Arch, as I saw on their forum in the link 10 years old above.

By the way, if you talk to GNU/Linux guys, tell them that Qt-6 is better and preferred by me (over Qt-5).

Željko Vrabec

I will notify package mantainer. Thanks again!