Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-10-07 11:30:40

Friedrich
Member
Registered: 2016-09-18
Posts: 140

How to manager the entries in Thunars "open with" dialog

Hi,

when i open the "open with" and then search for an other application i have a very big list of applications, a lot of them absolutely useless (its not usefull to open a text file with "display settings" or the "logout dialog"). I guess the list is created my analysing the files in

/usr/share/applications
~/.local/share/applications[/python]

But i can find out what i have to write to the desktop file so that it creates an entries in the application list. There is a desktop file for blender, blender isn't installed using apt. Its simply downloaded and moved to ~/bin. There is no entry for blender in the application list.

The desktop file is really simple

Version=1.0
Type=Application
Name=Blender
Exec=/home/friedrich/bin/Blender/blender
Icon=blender
Terminal=false
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
StartupNotify=true
MimeType=image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;application/postscript;image/png;image/x-icon;image/x-xpixmap;image/x-exr;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/x-xcursor;

friedrich

Offline

#2 2020-10-07 14:22:38

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: How to manager the entries in Thunars "open with" dialog

Take a look at these two links:

Thunar's volatile default application

Association between MIME types and applications: Adding/removing associations

I think the key would be to add a [Removed Associations] section to the ~/.config/mimeapps.list file.

Offline

#3 2020-10-08 06:46:41

Friedrich
Member
Registered: 2016-09-18
Posts: 140

Re: How to manager the entries in Thunars "open with" dialog

This doesn't work. This works for the list when i right click on a file and move the mouse to "open with". Then i have a list with applications right to the context menu. But this is not what i mean.

There is an other menu entry below the application list: open with other applications (i don't know the correct english text, on my computer its ion german). Here i have a very big list with almost all applications installed, also  absolutely useless applications for the mimetype. This is the list i want to edit.

EDIT
i found something here: https://docs.xfce.org/xfce/thunar/send-to. I mean the entry above "send to".

Offline

#4 2020-10-08 08:53:59

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: How to manager the entries in Thunars "open with" dialog

(Sorry, I didn't read your first post properly and posted something not very helpful)

I'll try to answer later, oops!

Offline

#5 2020-10-08 09:42:58

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: How to manager the entries in Thunars "open with" dialog

I think this is the good link: https://docs.xfce.org/xfce/thunar/worki … nd-folders

Please tell us how it goes, and ask anything, good luck!

Offline

#6 2020-10-25 09:33:35

Friedrich
Member
Registered: 2016-09-18
Posts: 140

Re: How to manager the entries in Thunars "open with" dialog

This is not what i mean.

I don't want to change one special preferred application for an file type. I know how i can do this. When i right-click on a file and choose "Open with" and then "open with other application" i have a huge list of "preferred applications". I can choose one of this applications. But there are a lot of apps in that list that are absolutely useless. There are entries for all settings i can choose using the whisker menu. I will never open a file with the "printer settings".

I guess there are *.desktop files for all entries in the settings menu and because of that they are interpreted as "normal" applications. This is how the "xfce4-session-logout.desktop" (truncated) looks:

[Desktop Entry]
Version=1.0
Type=Application
Exec=xfce4-session-logout
Icon=system-log-out
StartupNotify=false
Terminal=false
Categories=System;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
Name=Log Out

When i delete "type=application" logout isn't in the preferred list anymore. But i'm not sure this results in other problems.

As i could see here https://specifications.freedesktop.org/ … nized-keys there is no type like "menu" or so. There is only "link" and "directory".

Is there an other way to hide this application?

Offline

#7 2020-10-25 11:04:56

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How to manager the entries in Thunars "open with" dialog

You could temporarily hide the list by double-clicking on it, but it is not persistent. It may be best to create a bug/enhancement request.

The code to do this is located in the thunar/thunar-chooser-dialog.c file, in the thunar_chooser_dialog_expand function. Comment out the whole block that talks about "other applications". This will not expand this list by default limiting the default view in the dialog to just the recommended applications, but you can still double-click on "Other applications" to show that list.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 545.38 KiB (Peak: 546.22 KiB) ]