Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-03-09 15:09:19

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

[SOLVED] Mime Type Issue in Thunar

Hello all,

I use:
Devuan GNU/Linux
XFCE 4.12.2 ( Adwaita Dark Theme, Obsidian Icon Theme)

And i have a mime type error in Thunar: apple key files?!  - no, my pgp keys!
Thunar Screenshot
https://glx.uber.space/index.php/s/CRd4PnwtXxaBJ2Z

My first look goes to the Bash shell. Looks good:
user@devuan:~$ xdg-mime query filetype /home/user/.gnupg/secring.gpg
application/pgp-encrypted

What can I do so that the file manager assigns the correct MIME again?

ToZ: edited title. Please, no obscenities

Last edited by majestyx (2020-03-11 15:37:57)


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#2 2020-03-09 16:32:06

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Does killing and restart thunar help (in case its cached)?

thunar -q && thunar

Offline

#3 2020-03-10 16:27:22

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

Hello ToZ, thanks for your fast reply..

user@dev1:~$ thunar -q && thunar
Failed to register: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

oh, our friend "dbus" :-( but, "nothing happens". i "restart" my thunar, go to my gnupg keys... apple


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#4 2020-03-10 17:32:52

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Can you run the following commands and post back the output? There has to be an errant entry somewhere.

fgrep -ri gpg ~/.config
fgrep -ri gpg ~/.local/share/applications
fgrep -ri gpg /usr/share/applications
fgrep -ri apple ~/.config
fgrep -ri apple ~/.local/share/applications
fgrep -ri apple /usr/share/applications

The GBus error is concerning. Which display manager are you using and/or how are you starting Xfce?

Offline

#5 2020-03-11 10:05:39

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

Hello again,

I number here, descending (fgrep's)

0.: i get a lot of output (LINK To TXT File)
1.: grep: /home/user/.local/share/applications: Datei oder Verzeichnis nicht gefunden (File or directory not found)
2.: command: "fgrep -ri gpg /usr/share/applications" - give No! output/home/user/.config/GIMP/2.10/templaterc:(GimpTemplate "Apple iPhone 6/7"
3.:/home/user/.config/GIMP/2.10/templaterc:(GimpTemplate "Apple iPhone 5"
3.:/home/user/.config/GIMP/2.10/templaterc:(GimpTemplate "Apple iPad 3&4, Air"
3.:/home/user/.config/GIMP/2.10/pluginrc:         "This plug-in loads files in Apple's QuickTake QTK raw format by calling raw-placeholder."
3.:/home/user/.config/GIMP/2.10/pluginrc:         "Raw Apple QuickTake QTK"
4.: grep: /home/user/.local/share/applications: Datei oder Verzeichnis nicht gefunden
5.: /usr/share/applications/screensavers/m6502.desktop:Comment=This emulates a 6502 microprocessor. The family of 6502 chips were used throughout the 70's and 80's in machines such as the Atari 2600, Commodore PET, VIC20 and C64, Apple ][, and the NES. Some example programs are included, and it can also read in an assembly file as input. Original JavaScript Version by Stian Soreng: http://www.6502asm.com/. Ported to XScreenSaver by Jeremy English. Written by Stian Soreng and Jeremy English.
/usr/share/applications/xfce4-screenshooter.desktop:Icon=applets-screenshooter

My Display manager: Slim and x-session-manager (i mean) (*)

(*) https://devuan.org/os/documentation/dev … ce-install
(LINK TXT) https://glx.uber.space/index.php/s/8ACMiM6yCiKB8Xe


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#6 2020-03-11 10:26:08

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Nothing stands out there.

Are you running thunar as root in the screenshot?

Offline

#7 2020-03-11 10:33:38

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

ToZ wrote:

Nothing stands out there.

Are you running thunar as root in the screenshot?

nope!


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#8 2020-03-11 10:45:08

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

What does the following return:

xdg-mime query default application/pgp-encrypted

Offline

#9 2020-03-11 10:54:48

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

ToZ wrote:

What does the following return:

xdg-mime query default application/pgp-encrypted

nothing happens, i see my prompt again - no output returns


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#10 2020-03-11 10:55:07

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Another thing to try:

Run "xfce4-mime-settings" and find the "application/pgp-encrpyted" entry. In the "Default Applications" column, click on the entry there and select "Reset to Default".

Offline

#11 2020-03-11 11:04:20

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

ouch,

yes i open the GUI Window and search for.... i don't have "any default application" ?! (hint: if i use gnupg(2) i do it only from bash or "enigmail")

https://glx.uber.space/index.php/s/jCiij8NCZ5P9ipA


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#12 2020-03-11 11:09:35

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Instead of filtering on the whole string, filter just on "pgp"- see if anything comes up.

Also, do you have /usr/share/mime/application/pgp-encrypted.xml file?

Offline

#13 2020-03-11 11:20:35

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

XML File:

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/pgp-encrypted">
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  <comment>PGP/MIME-encrypted message header</comment>
  <comment xml:lang="ar">ترويسة رسالة PGP/MIME-مشفرة</comment>
  <comment xml:lang="ast">Testera de mensaxe cifrada en PGP/MIME</comment>
  <comment xml:lang="be@latin">Zahałovak paviedamleńnia, zašyfravany ŭ PGP/MIME</comment>
  <comment xml:lang="bg">Заглавна част на шифрирано съобщение — PGP/MIME</comment>
  <comment xml:lang="ca">capçalera de missatge amb xifrat PGP/MIME</comment>
  <comment xml:lang="cs">záhlaví zprávy zašifrované pomocí PGP/MIME</comment>
  <comment xml:lang="da">PGP-/MIME-krypteret meddelelseshoved</comment>
  <comment xml:lang="de">PGP/MIME-verschlüsselter Nachrichtenkopf</comment>
  <comment xml:lang="el">Κεφαλίδα μηνύματος κρυπτογραφημένου κατά PGP/MIME</comment>
  <comment xml:lang="en_GB">PGP/MIME-encrypted message header</comment>
  <comment xml:lang="eo">PGP/MIME-ĉifrita ĉapo de mesaĝo</comment>
  <comment xml:lang="es">cabecera de mensaje cifrado PGP/MIME</comment>
  <comment xml:lang="eu">PGP/MIME enkriptatutako mezu-goiburua</comment>
  <comment xml:lang="fi">PGP/MIME-salattu viestiotsikko</comment>
  <comment xml:lang="fo">PGP/MIME-encrypted boð tekshøvd</comment>
  <comment xml:lang="fr">en-tête de message codé PGP/MIME</comment>
  <comment xml:lang="ga">ceanntásc teachtaireachta ionchódaithe le PGP/MIME</comment>
  <comment xml:lang="gl">cabeceira de mensaxe cifrado PGP/MIME</comment>
  <comment xml:lang="he">כותר של קובץ מוצפן מסוג PGP/MIME</comment>
  <comment xml:lang="hr">PGP/MIME-šrifrirano zaglavlje poruke</comment>
  <comment xml:lang="hu">PGP/MIME titkosított üzenetfejléc</comment>
  <comment xml:lang="ia">Capite de message cryptate con PGP/MIME</comment>
  <comment xml:lang="id">Tajuk pesan terenkripsi PGP/MIME</comment>
  <comment xml:lang="it">Intestazione messaggio PGP/MIME-encrypted</comment>
  <comment xml:lang="ja">PGP/MIME 暗号化メッセージヘッダー</comment>
  <comment xml:lang="kk">PGP/MIME-шифрленген мәлімдеме тақырыптамасы</comment>
  <comment xml:lang="ko">PGP/MIME으로 암호화된 메시지 헤더</comment>
  <comment xml:lang="lt">PGP/MIME užšifruota žinutės antraštė</comment>
  <comment xml:lang="lv">PGP/MIME-šifrēta ziņas galvene</comment>
  <comment xml:lang="ms">Pengepala mesej terenkripsi PGP/MIME</comment>
  <comment xml:lang="nb">PGP/MIME-kryptert meldingshode</comment>
  <comment xml:lang="nl">PGP/MIME-versleutelde berichtkopregels</comment>
  <comment xml:lang="nn">PGP/MIME-kryptert meldingshovud</comment>
  <comment xml:lang="oc">entèsta de messatge encodat PGP/MIME</comment>
  <comment xml:lang="pl">Nagłówek listu zaszyfrowanego PGP/MIME</comment>
  <comment xml:lang="pt">cabeçalho de mensagem encriptada com PGP/MIME</comment>
  <comment xml:lang="pt_BR">Cabeçalho de mensagem criptografada PGP/MIME</comment>
  <comment xml:lang="ro">Antet de mesaj encriptat PGP/MIME</comment>
  <comment xml:lang="ru">Заголовок сообщения, зашифрованный PGP/MIME</comment>
  <comment xml:lang="sk">Hlavičke správy zašifrovaná pomocou PGP/MIME</comment>
  <comment xml:lang="sl">Datoteka glave šifriranega sporočila PGP/MIME</comment>
  <comment xml:lang="sq">Header mesazhi të kriptuar PGP/MIME</comment>
  <comment xml:lang="sr">ПГП/МИМЕ шифровано заглавље поруке</comment>
  <comment xml:lang="sv">PGP/MIME-krypterat meddelandehuvud</comment>
  <comment xml:lang="tr">PGP/MIME-şifreli ileti başlığı</comment>
  <comment xml:lang="uk">заголовок шифрованого PGP/MIME повідомлення</comment>
  <comment xml:lang="vi">Phần đầu thông điệp đã mật mã bằng PGP/MIME</comment>
  <comment xml:lang="zh_CN">PGP/MIME 加密的信件头</comment>
  <comment xml:lang="zh_TW">PGP/MIME 加密訊息標頭</comment>
  <sub-class-of type="text/plain"/>
  <generic-icon name="text-x-generic"/>
  <glob pattern="*.pgp"/>
  <glob pattern="*.gpg"/>
  <glob weight="10" pattern="*.asc"/>
  <alias type="application/pgp"/>

If i filter "pgp" in mime-type-editor, i found entrys:

/pgp-:encrypted
/pgp-keys
/pgp-signature

all 3 have as default application:  Mousepad

Hint: i have found on stackex: https://unix.stackexchange.com/question … e-settings


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#14 2020-03-11 12:21:02

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

Just had a closer look at an Arch install in a VM and I can see the same thing you are seeing.

However, your first post is a little confusing in that the image posted doesn't align with the command you executed. In the image, you are showing the contents of the ~/.gnupg/private-keys-v1.d folder (where the files displayed end in .key) and if you run "xdg-mime query filetype" on one of those key files, you should get a result of "application/x-iwork-keynote-sffkey". You ran "xdg-mime query filetype" on another file which confused things.

So basically, what thunar is displaying is correct. The *.key filetype is currently recognized as application/x-iwork-keynote-sffkey of which the description is (from /usr/share/mime/application/x-iwork-keynote-sffkey.xml) "Apple Keynote 5 presentation" (english translation).

What do you think it should be displaying?

Offline

#15 2020-03-11 12:39:12

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

ToZ wrote:

JWhat do you think it should be displaying?

something like gnupg (only)


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

#16 2020-03-11 14:02:18

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 6,381

Re: [SOLVED] Mime Type Issue in Thunar

You'll need to either install an application that supports a gnupg mimetype, or create your own mime and desktop entry to support it. The Arch XDG MIME Applications entry has info on how to do that.

This  process worked for me to create a dummy mimetype that changed the text in thunar (note: that without a application to open the file, double-clicking on it won't work).

  1. Create the file ~/.local/share/mime/packages/application-x-gnupg-key.xml with the following content (create the directories if needed):

    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
        <mime-type type="application/x-gnupg-key">
            <comment>GnuPG</comment>
            <icon name="application-x-gnupg-key"/>
            <glob-deleteall/>
            <glob pattern="*.key" weight="100"/>
        </mime-type>
    </mime-info>
  2. Copy /usr/share/mousepad.desktop to ~/.local/share/applications and add the following mimetype to the end of the list of mimetypes:

    application-x-gnupg-key
  3. Update the mime database:

    update-mime-database ~/.local/share/mime
  4. Refresh thunar

Of course, double-clicking on the file won't work (it will try to open it in mousepad but mousepad won't be able to recognize it). However, the mime type will show up as GnuPG

Offline

#17 2020-03-11 15:36:16

majestyx
Member
From: cyberspace
Registered: 2013-12-03
Posts: 31
Website

Re: [SOLVED] Mime Type Issue in Thunar

Big Thanks!

yes it's works!

but, take a look: https://glx.uber.space/index.php/s/fMa57MjkF79fQ2o
one f***** file left ;-)

strange, i will delete the "last" apple.key :-P


“The internet is a reflection of our society and that mirror is going to be reflecting what we see.
If we do not like what we see in that mirror the problem is not to fix the mirror, we have to fix society.” Vint Cerf

Offline

Board footer

Powered by FluxBB