You are not logged in.

#1 2023-07-23 10:10:15

scatherinch
Member
Registered: 2023-02-24
Posts: 168

[SOLVED] mimeappps.list keeps being overwritten???

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

#2 2023-07-23 12:38:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,464
Website

Re: [SOLVED] mimeappps.list keeps being overwritten???

scatherinch wrote:

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.

scatherinch wrote:

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

#3 2023-07-23 12:54:28

scatherinch
Member
Registered: 2023-02-24
Posts: 168

Re: [SOLVED] mimeappps.list keeps being overwritten???

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

#4 2023-07-23 13:12:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,120

Re: [SOLVED] mimeappps.list keeps being overwritten???

I'd prefer "chattr +i", because as long as you own it, your processes can overwrite it regardless of the set permissions.

Offline

#5 2023-07-25 08:31:54

scatherinch
Member
Registered: 2023-02-24
Posts: 168

Re: [SOLVED] mimeappps.list keeps being overwritten???

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

Board footer

Powered by FluxBB