You are not logged in.
As you know, there is a config file in .config that controls the file associations of everything on your PC. Images, videos, text editors. On Dolphin, when I set a program to use a certain application to open it, this is usually sticks and a file is written in .config.
However...for some reason I find that it occasionally gets overwritten and I lose all my preferences. (Like I like to open .bmp and other images with feh) I do not understand why this is happening. Would someone please explore the cause of this for me or tell me more information? I would very much like to know why this is happening because I am constantly concerned about corruption.
Additionally, I would like to know how to lock this file so that it cannot ever be modified again.
Here's what I want mine to look like at all times:
[Added Associations]
application/epub+zip=org.pwmt.zathura-cb.desktop;
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop;
application/rtf=wine-extension-rtf.desktop;
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
image/bmp=feh.desktop;
image/gif=mpv.desktop;
image/jpeg=feh.desktop;
text/plain=org.gnome.gedit.desktop;
video/mp4=mpv.desktop;
video/webm=mpv.desktop;
video/x-ms-wmv=mpv.desktop;
video/x-msvideo=mpv.desktop;
[Default Applications]
application/epub+zip=org.pwmt.zathura-cb.desktop;
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop;
application/rtf=wine-extension-rtf.desktop;
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
image/bmp=feh.desktop;
image/gif=mpv.desktop;
image/jpeg=feh.desktop;
text/plain=org.gnome.gedit.desktop;
video/mp4=mpv.desktop;
video/webm=mpv.desktop;
video/x-ms-wmv=mpv.desktop;
video/x-msvideo=mpv.desktop;
[Removed Associations]
application/epub+zip=okularApplication_epub.desktop;org.pwmt.zathura-pdf-mupdf.desktop;org.kde.ark.desktop;
application/pdf=okularApplication_pdf.desktop;libreoffice-draw.desktop;vivaldi-stable.desktop;krita_pdf.desktop;wine-extension-pdf.desktop;gimp.desktop;
application/rtf=libreoffice-writer.desktop;okularApplication_txt.desktop;vscodium.desktop;vim.desktop;org.gnome.gedit.desktop;wine-extension-txt.desktop;
application/vnd.oasis.opendocument.text=org.kde.ark.desktop;org.pwmt.zathura-cb.desktop;
image/bmp=gimp.desktop;okularApplication_kimgio.desktop;com.xnview.XnViewMP.desktop;krita_qimageio.desktop;
image/gif=gimp.desktop;vivaldi-stable.desktop;okularApplication_kimgio.desktop;feh.desktop;com.xnview.XnViewMP.desktop;krita_gif.desktop;
image/jpeg=com.xnview.XnViewMP.desktop;vivaldi-stable.desktop;krita_jpeg.desktop;okularApplication_kimgio.desktop;gimp.desktop;
text/plain=libreoffice-writer.desktop;okularApplication_txt.desktop;vim.desktop;vscodium.desktop;wine-extension-txt.desktop;
video/mp4=vlc.desktop;
video/webm=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;Last edited by scatherinch (2024-02-09 14:27:07)
Offline
for some reason I find that it occasionally gets overwritten
What is it overwritten with? Meaning, what are the contents after the overwrite? Any program can overwrite such a file - the newly created content should give a very good hint at what program is likely responsible.
I would like to know how to lock this file so that it cannot ever be modified again.
`man chmod` or `man acl` (I'd personally use the former).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I think Dolphin seems to be doing it? I don't know. Dolphin is just a file manager. But when I click on the GUI, go to properties > open with > change on certain files after some time, it is NOT the way I set it. I had to end up resetting the associations so I lost it, but Dolphin seems to make a default mimeapps.list when you work through the file manager to open something.
I ended up chmoding it, yes, to make it read only.
Offline
I'd prefer "chattr +i", because as long as you own it, your processes can overwrite it regardless of the set permissions.
Online
Alright, and what can I do to reverse that, @seth? I might need to modify it later for future programs to behave in a certain way to open files. From what I've read, chattr is quite a powerful command, making it so that even the superuser can't modify or remove it if the i attribute is given.
EDIT: Oh, alright. + and - . I got it now, thank you.
Last edited by scatherinch (2023-07-25 09:22:39)
Offline