Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-08-17 06:48:11

bitrat
Member
Registered: 2023-07-19
Posts: 20

How to remove 'Open with "Google Chrome"'

Hi,

for some misbegotten reason, and not fully appreciating it's subterfuges, I installed Chrome and not Chromium on my desktop (I needed a security flaw they both have in common).

I soon noticed that Chrome had installed itself as the (unwanted) default for opening MIME type application/pdf, but fixed that using xfce4-settings-manager | System | Default Applications | Other, and set the default to Atril.  (I'm not sure there was any default before that, but the settings manager lacks an option to set it to 'none'.)

I thought that was that, then I realised Thunar had also been infected, offering to open a boggling array of file types with Google Chrome, and (infuriatingly) hijacking the top position in the right click menu.

How can I remove/edit all of these default application settings, and how can I lock them so malware like Chrome isn't able to mess with them?

I'm running Debian Bookworm + XFCE.

Cheers,
bitrat

Last edited by bitrat (2023-08-17 06:49:07)

Offline

#2 2023-08-17 09:48:51

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

Re: How to remove 'Open with "Google Chrome"'

bitrat wrote:

How can I remove/edit all of these default application settings, and how can I lock them so malware like Chrome isn't able to mess with them?

Copy Chrome's .desktop file from /usr/share/applications to ~/.local/share/applications (create the directory if it doesn't exist) and then edit this newly copied file and delete the "MimeType=" line.


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

#3 2023-08-18 02:08:48

bitrat
Member
Registered: 2023-07-19
Posts: 20

Re: How to remove 'Open with "Google Chrome"'

ToZ wrote:
bitrat wrote:

How can I remove/edit all of these default application settings, and how can I lock them so malware like Chrome isn't able to mess with them?

Copy Chrome's .desktop file from /usr/share/applications to ~/.local/share/applications (create the directory if it doesn't exist) and then edit this newly copied file and delete the "MimeType=" line.

Cool thanks!

I'm gradually getting to know the .desktop mechanisms, but solutions like this, addressing specific problems but shedding light on the higher level file organisation, are a huge help.

Thanks again.  smile

[UPDATE]

Interestingly, this strategy worked for application/pdf mime type, but not for image/jpeg.   Chrome remains the default application at the top of the right click menu, even after I moved org.xfce.ristretto.desktop to .local/share/applications (although it already has MimeType=image/png;image/gif;image/jpeg;image/bmp;image/x-pixmap;image/tiff;image/svg+xml;image/x-xpixmap).  What I'm not understanding is how does an application gain priority in this scheme, where any number might register the same file types.

I intend to prevent installers from making these unwanted changes in future and may try using dpkg-divert, although I'd prefer not to be forced into it.

Last edited by bitrat (2023-08-18 12:02:09)

Offline

#4 2023-08-18 18:26:40

gogogadget
Member
Registered: 2023-03-19
Posts: 28

Re: How to remove 'Open with "Google Chrome"'

Hello,

bitrat wrote:

What I'm not understanding is how does an application gain priority in this scheme, where any number might register the same file types.

In Thunar, did you try right click on the jpeg file --> Open with --> Set Default Application... ?


EndeavourOS
Xfce+gtk3-classic (no CSD)+Picom

Offline

#5 2023-08-18 19:49:16

bitrat
Member
Registered: 2023-07-19
Posts: 20

Re: How to remove 'Open with "Google Chrome"'

gogogadget wrote:

Hello,

bitrat wrote:

What I'm not understanding is how does an application gain priority in this scheme, where any number might register the same file types.

In Thunar, did you try right click on the jpeg file --> Open with --> Set Default Application... ?


Have now.  Too easy, thank you!

I'm still interested in how and where this is implemented.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 536.11 KiB (Peak: 536.95 KiB) ]