You are not logged in.

#1 2021-02-07 16:11:47

Condor
Member
Registered: 2017-12-01
Posts: 54

[SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

I have an issue with Xfce’s file manager Thunar (version 4.16.2). The “Open With” list gets cluttered with entries when I act on a file by performing a “Send To“ action. This behaviour was not present in versions of Thunar prior to the larger 4.16 update.

The Xfce documentation send-to explains how to set up entries to be shown when right-clicking a file and selecting “Send To“.
I have: ~/.local/share/Thunar/sendto/ocr.desktop (Send a PDF file to OCRmyPDF for some OCR and reformatting)

[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Perform OCR
Comment=Perform OCR on a single or multiple PDF in-place
Exec=fish --command="ocr %F; set -l ec $status; if test $ec -gt 0; echo; echo \\"Error $ec\\"; read --nchars=1 --prompt-str=\\"Press any key to close window\\"; end"
Icon=ocrfeeder
MimeType=application/pdf;
Path=
Terminal=true
StartupNotify=false

Don't be confused by the longish Exec command. OCRmyPDF runs in a terminal and I want to prevent it from closing when an error occurs.

When using this ”Send To” entry, a copy of it is automatically created for the “Open With” dialogue and listed when right-clicking another PDF file. The corresponding .desktop files are stored in ~/.local/share/applications/ with filenames like userapp-Perform OCR-TOW0Y0.desktop. An example:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
Exec=fish --command="ocr %F; set -l ec $status; if test $ec -gt 0; echo; echo \\"Error $ec\\"; read --nchars=1 --prompt-str=\\"Press any key to close window\\"; end"
Name=Perform OCR
Comment=Perform OCR on a single or multiple PDF in-place

Note that even though the MimeType entry is missing on this copy, it is only shown when right-clicking PDF.


Can anyone reproduce my problem?
Is there an option to disable this behaviour?

Last edited by Condor (2021-02-10 13:35:28)

Offline

#2 2021-02-08 12:20:28

toz
Member
Registered: 2011-10-28
Posts: 513

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

I've noticed the same. Upstream bug report created.

Offline

#3 2021-02-08 18:07:08

Condor
Member
Registered: 2017-12-01
Posts: 54

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

Thank you for confirming the issue - and for creating a bug report!
I’ll leave this topic dangling until a fix has been published.

Offline

#4 2021-02-08 21:41:19

toz
Member
Registered: 2011-10-28
Posts: 513

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

As a workaround until the regression is fixed, you can add a command to your Exec line before the end to delete all existing "~/.local/share/applications/userapp-Perform OCR-*" files.

This will clear and keep the list cleared for this sendto action.

Offline

#5 2021-02-09 16:42:09

Condor
Member
Registered: 2017-12-01
Posts: 54

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

Good idea. I’ve extended the command by a rm that gets rid of the just created desktop file. Bit nasty, but does the job ;-)

Offline

#6 2021-02-09 17:49:10

toz
Member
Registered: 2011-10-28
Posts: 513

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

Regression has been fixed and released in 4.16.3. The new version has hit the repositories.

Offline

#7 2021-02-10 13:34:53

Condor
Member
Registered: 2017-12-01
Posts: 54

Re: [SOLVED] (bug fixed) Xfce Thunar "Open With" list gets cluttered

That was … lightning fast! I have updated Thunar and can confirm: the issue is fixed.
Marking thread as solved!

Offline

Board footer

Powered by FluxBB