0

In debian stretch (mate desktop) i messed up systemwide my mime data base. How can I restore it.

Note I renamed first my /usr/share/mime/mimeinfo.cache. but the Problem is, I think it is broken.

    alex@Taomon:~$ strings /usr/share/mime/mimeinfo.cache.broken | tail -n30
[INFORMATION]
\documentclass
\chapter\sectionbegin 
# xmcd
ftyp3ge
ftyp3gg
ftyp3gp
ftyp3gs
ftyp3g2
OggSfishead
CMML
ftypisomftypmp42ftypMSNVftypM4V ftypf4v G?
OggSmdatmdatmoovftypqt
#EXTM4U
webm
RIFFAVF0AVI AVI NSVfMOVIz
<ar>!<arch>
RIFF
ELFMZ
FORM
=pod
=head1 NAME
=head1 DESCRIPTION
<?xml
<!--.sndMTM
MMD0MMD1if
MAS_UTrack_V00
TEXtREAd/*
#include#import
From 
alex@Taomon:~$ 

this looks not right for me. after running

   root@Taomon:~# update-mime-database -V /usr/share/mime/
Updating MIME database in /usr/share/mime...

Wrote 1109 strings at 2c - 6374

Wrote aliases at 6374 - 6ba0

Wrote parents at 6ba0 - 846c

Wrote literal globs at 846c - 8554

Wrote suffix globs at 8554 - 12edc

Wrote full globs at 12edc - 12f1c

Wrote magic at 12f1c - 1f5d4

Wrote namespace list at 1f5d4 - 1f710

Wrote icons list at 1f710 - 1f754

Wrote generic icons list at 1f754 - 20330

Wrote types list at 20330 - 20f98

The new cache is empty.

alex@Taomon:~$ strings /usr/share/mime/mimeinfo.cache
[MIME Cache]
alex@Taomon:~$ 

How can I solve it.

I also can not use xdg-mime for setting default applications. Now filemanager is not starting without error messeages from terminal.

Thanks for reading with regards.

edit paste strings /usr/share/mime/mime.cache edit2 update-desktop-database -v

3
  • Thanks could resolve it by reinstalling every program that is from command dpkg -S /usr/share/mime/ returns.
    – nobody
    Commented Mar 30, 2021 at 10:01
  • What does /usr/share/mime/mime.cache look like? (Not mimeinfo.cache, mime.cache.) Commented Mar 30, 2021 at 11:13
  • @StephenKitt I edit my question.
    – nobody
    Commented Mar 30, 2021 at 11:26

1 Answer 1

2

update-mime-database updates mime.cache, not mimeinfo.cache. To fix the latter, you need to run update-desktop-database:

sudo update-desktop-database

Alternatively, you can reconfigure desktop-file-utils (which will do the same thing):

sudo dpkg-reconfigure desktop-file-utils
3
  • thanks for clearing my mind; but I get an error message, I add it to my question
    – nobody
    Commented Mar 30, 2021 at 11:55
  • That’s innocuous, your mimeinfo.cache should still be updated. Commented Mar 30, 2021 at 12:26
  • you saved my life
    – Shivam
    Commented Apr 3, 2022 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .