Hi guys!
Is there chance for mime file for linux to be made? It would be nice to have "open with FET" option on right click and fet file with icon.
Thanks in advance!
Hello, Zeljko,
Nice to see you again! :)
Do you know that in recent FET versions you can run "fet path/file.fet" and it will work correctly?
I would like to implement your suggestions, but I never worked with "mime" and I am not sure what it is or what I should do. I can only offer linuxdeploy generated FET executables for GNU/Linux, or a "make install" option in the FET sources.
In the fet.desktop file add as the last line:
MimeType=application/vnd.fet.file;
Add option for file fet.xml with content:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/vnd.fet.file">
<comment>FET timetabling file</comment>
<sub-class-of type="application/xml"/>
<glob pattern="*.fet"/>
<icon name="fet"/>
</mime-type>
</mime-info>
to be installed into /usr/share/mime/packages (owner: root:root, with permission: 644)
Of course I'm talking about fet sources which are to be compiled. fet.desktop file already in there
Thank you, Zeljko! I will consider this in the near future.
About the root owner, I am not sure I can do this. The tar.bz2 sources of FET should have only normal user, 644. When I copy the fet.xml file with "make install" in mime/packages, will it get automatically the owner = root? I am not sure I can change the owner at install time.
I will try a bit later to do these changes.
You are right! You make a file as normal user and make/make install sets ownership up. The same thing happens with fet.desktop file.
I will add it for the next version. I will work on adding it on my hard disk soon.
Unfortunately, I am not sure the two GNU/Linux executables I provide will contain this. Maybe only "make install" will work.
Zeljko, I have one more question: where do you suggest to put the file "fet.xml" in the FET sources archive?
I think it should be ok to put it in root directory next to fet.desktop. Btw. how did you decide to put fet.desktop in root directory?
I don't remember, maybe the person(s) who suggested the fet.desktop contents suggested this. Do you have other suggestion for the location of fet.desktop and fet.xml?
If I had an idea how make install handles fet.desktop I would make some suggestion, but I have no clue. Maybe someone else on the forum has more experience with project structuring. If so, I would be grateful for some help.
I can put fet.desktop and fet.xml wherever I like in the FET sources archive, and just modify a bit the fet.pro file. So, if you think of a better place for these two files, please let me know.
I just made your suggested changes, there is a new snapshot: https://lalescu.ro/liviu/Backup-fet/ . Could you please try? I tried "make install" on my computer, but it didn't work, even if fet.xml was copied where needed.
I didn't tried it yet. chat-gpt tells me:
Of course! Here's how you can make .fet files automatically open with your Linux program when double-clicked — using the MIME system.
🔧 Step 1: Define a custom MIME type for .fet
Create a new file at ~/.local/share/mime/packages/fet.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-fet">
<comment>FET File</comment>
<glob pattern="*.fet"/>
</mime-type>
</mime-info>
Then update the MIME database:
update-mime-database ~/.local/share/mime
🧷 Step 2: Create a .desktop file for your program
Make a file like ~/.local/share/applications/myfetprogram.desktop:
[Desktop Entry]
Name=My FET Program
Exec=/full/path/to/your/program %f
Type=Application
MimeType=application/x-fet
Categories=Utility;
Terminal=false
Replace /full/path/to/your/program with the actual path to your executable.
%f passes the selected file as an argument.
🔗 Step 3: Register your program for .fet files
Run this command:
xdg-mime default myfetprogram.desktop application/x-fet
This tells the system to use your program as the default for .fet files.
✅ Test it
Make sure your .fet file is associated correctly (you can right-click → "Open With" in your file manager).
Double-click a .fet file.
Your app should launch and receive the file as an argument.
Let me know if you'd like help writing the .desktop file based on your program or if you want this to work system-wide for all users.
So, welcome ChatGPT :) This is the first time I actually see its power.
Should we edit fet.desktop, instead of "Exec=fet" put "Exec=fet %f"?
chat-gpt tells me:
Yes — exactly right! 👍
If you're editing the fet.desktop file (either system-wide or locally), and you want it to open a file that's passed in (like when double-clicking a .fet file), then you should absolutely use %f in the Exec line.
✅ Correct:
Exec=fet %f
Why?
%f tells the system to pass a single filename (the one the user double-clicked) to your program.
Without it (Exec=fet), your program runs — but won't receive the filename, so it won't know what file to open.
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.
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!
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.
OK, thank you, and sorry! I will wait for your green signal.
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.
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.
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.
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?
Sure I can and will help! Give me some time to try something. I'm running compiler again.
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?
OK, thank you! Note: you might not need to recompile, but just to run qmake, and the main Makefile is updated.
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!
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!
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).
I will notify package mantainer. Thanks again!
You're welcome! Thank you as well! :)
The new version (FET-7.1.6) is just released (with a bit of delay because of other new things). Thank you!
Quote from: Liviu Lalescu on April 17, 2025, 08:33:07 PMBy the way, if you talk to GNU/Linux guys, tell them that Qt-6 is better and preferred by me (over Qt-5).
I finally made it! I wrote to package maintainers several times and they finally made a change. :) https://aur.archlinux.org/packages/fet-timetabling
Thank you! Yes, I saw from the previous FET version. They compiled FET 7.2.3 with Qt 5 and after a while they compiled it with Qt 6 and put FET version 7.2.3-2.
I forgot to let you know this :)