Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-01-31 03:22:40

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Remove Firefox as option to "open with" a file (SOLVED)

I have searched the net vigorously on this one many times over many months.
When you right click a file, you can see a list of programs to open it with. For some reason that I cannot fathom, Firefox is almost always on that list, (often the second choice) senselessly. In a hurry on occasion, I tend to hit it by accident and of course this creates a memory leak and nothing opens, so I have to log out and in again and then get back to work.
Is there anyway of disabling or removing firefox from the Open With Options?

Last edited by Aravisian (2020-02-07 12:06:38)

Offline

#2 2020-01-31 14:56:49

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

Re: Remove Firefox as option to "open with" a file (SOLVED)

I think these threads are related:

https://forum.xfce.org/viewtopic.php?id=12353

https://forum.xfce.org/viewtopic.php?id=12343

Do you have an app called "MIME Type Editor" in the Xfce Settings Manager?

Offline

#3 2020-01-31 17:29:40

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

alcornoqui wrote:

I think these threads are related:

https://forum.xfce.org/viewtopic.php?id=12353

https://forum.xfce.org/viewtopic.php?id=12343

Do you have an app called "MIME Type Editor" in the Xfce Settings Manager?

Yes... and that is something that I have done. I just did a reload of the entire system, so I will need to go through and set it all, again.  But that is only a kind of work around. But that does not remove Firefox from being offered and most often, it does not appear in that application but it does appear upon right click.

I have multiple programs that do different things, so sometimes, I do not want to use the default, but select a different one for a different function.
So, let's say that I could open an img with default _Ristretto or _Pinta. Double click works. Let's say I want to use Gimp, I right click and GImp is offered as an alt, next option down.
BUT... Sometimes it does not offer Gimp next option down, it randomly inserts Firefox as next option down. And, being in a BDH, I click it.
Leading to the situation in the O.P.
And it doesn't always do it- only sometimes, creating that unpredictability that I don't expect it.

Is there a way to tell the machine to not offer firefox, at all?

Last edited by Aravisian (2020-01-31 17:30:45)

Offline

#4 2020-01-31 17:59:14

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

Re: Remove Firefox as option to "open with" a file (SOLVED)

What about ~/.config/mimeapps.list?

This a real rabbit hole...

Offline

#5 2020-02-01 18:36:44

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Aravisian wrote:
alcornoqui wrote:

I think these threads are related:

https://forum.xfce.org/viewtopic.php?id=12353

https://forum.xfce.org/viewtopic.php?id=12343

Do you have an app called "MIME Type Editor" in the Xfce Settings Manager?

Yes... and that is something that I have done. I just did a reload of the entire system, so I will need to go through and set it all, again.  But that is only a kind of work around. But that does not remove Firefox from being offered and most often, it does not appear in that application but it does appear upon right click.

I have multiple programs that do different things, so sometimes, I do not want to use the default, but select a different one for a different function.
So, let's say that I could open an img with default _Ristretto or _Pinta. Double click works. Let's say I want to use Gimp, I right click and GImp is offered as an alt, next option down.
BUT... Sometimes it does not offer Gimp next option down, it randomly inserts Firefox as next option down. And, being in a BDH, I click it.
Leading to the situation in the O.P.
And it doesn't always do it- only sometimes, creating that unpredictability that I don't expect it.

Is there a way to tell the machine to not offer firefox, at all?

While I think alcornoqui's real link might work, you could also edit the mimetypes in firefox's desktop file that for me is /usr/share/applications/firefox.desktop and change the content that for me is this:

MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

to this:

MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

I think that should at least stop it on the image files, and possibly only until a firefox update.

Offline

#6 2020-02-01 22:57:23

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

Mimetpes.list and mime type editor do not show Firefox or Webbrowseras linked to so many files.
Yet, if I right click an image, Firefox is listed as the first alternate and below it- Is Gimp. neutral

Offline

#7 2020-02-01 23:17:19

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Hrmmm. I tried deleting the image references in /usr/share/applications/firefox.desktop and restarted Thunar but Firefox is still showing in Open with. Haven't tried rebooting, but have too many things on the go right now to try that.

Offline

#8 2020-02-01 23:25:44

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

MrEen wrote:

Hrmmm. I tried deleting the image references in /usr/share/applications/firefox.desktop and restarted Thunar but Firefox is still showing in Open with. Haven't tried rebooting, but have too many things on the go right now to try that.

I can save ya the trouble (And I appreciate your help) but I have tried that, as well. It remains after reboot.

Offline

#9 2020-02-02 00:07:27

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

Re: Remove Firefox as option to "open with" a file (SOLVED)

After reading 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

#10 2020-02-02 00:07:35

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Well, I found something that worked for me. I have no idea how long it might last, and if it's an "accepted" method.

In the file /usr/share/applications/mimeinfo.cache, I deleted the firefox.desktop; entry on the image/jpeg= line then restarted Thunar (don't know if that was necessary) and right clicking on any jpg file no longer had Firefox in the Open with list.

I'm somewhat doubting this will survive a reboot. Will let you know if I get there.

Caution: I don't use Firefox at all anymore, so I wasn't afraid to "wreak" any of it's functionality.

Offline

#11 2020-02-02 00:10:22

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

In addition to the caution, there's this from here:

The files in /usr/share/applications/ should not be edited directly, it is possible to maintain a separate database on a per-user basis in the ~/.local/share/applications/ tree.

Offline

#12 2020-02-02 00:20:31

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Not sure, but I may have messed up the Open with listings a bit by doing the above. I believe the order has reversed itself. I'm not concerned at all for myself, but wanted to through that out there.

Offline

#13 2020-02-02 00:41:08

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

MrEen wrote:

Not sure, but I may have messed up the Open with listings a bit by doing the above. I believe the order has reversed itself. I'm not concerned at all for myself, but wanted to throw that out there.

Easily fixable by setting the default if you need.
I tried the above suggestion of creating the mimeinfo.cache in ~.local/share/applications and then rebooted. No change, even the the list remained unchanged.

Then I directly edited the miminfo.cache that is in /usr/share/applications. Then rebooted.
That did the trick and firefox is no longer presented as an option to open an image instead of Gimpy.
Will it revert at some point? It might. But it survived a reboot, so no need to create a script for it. If an Update or something reverts it later, I will just redo the steps above. Thans Mr.Een and Alcor...Acornicopod... Alcornique...

One of these days, I am gonna make flash cards so I remember the exact spelling of some internet handles.

Offline

#14 2020-02-02 01:33:14

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

Re: Remove Firefox as option to "open with" a file (SOLVED)

Aravisian wrote:

Thans Mr.Een and Alcor...Acornicopod... Alcornique...

One of these days, I am gonna make flash cards so I remember the exact spelling of some internet handles.

It's just alcornoque, ended in "i". Glad you could solve it.

Offline

#15 2020-02-02 01:49:24

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

I like Acornocopod. neutral



EDIT" Well, computer just randomly rebooted itself and now--- Firefox is First Freakin Option to open an image. It has been reset in /usr/share/applications/mimeinfo.cache. Something is telling it to put it there...
I'm getting Pissed.

Last edited by Aravisian (2020-02-02 02:00:36)

Offline

#16 2020-02-02 02:13:17

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Damn!

I'm assuming Firefox is your preferred browser? I'd purge the sucker if not.

Otherwise, how about looking at it's own settings? I'm pretty sure I remember there being some Mime stuff in there.

Offline

#17 2020-02-02 02:16:46

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Nah, it's not what I thought it was. It's for asking if you want to save the file or open it with another application.

Offline

#18 2020-02-02 02:51:31

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Once again, I think I've got it (let's see I'm correct this time). This has removed Firefox from the list for jpg, gif and png files. Here's the tail of my ~/.config/mimeapps.list:

[Removed Associations]
image/jpg=firefox.desktop
image/png=firefox.desktop
image/gif=firefox.desktop

It's a tiny bit different than the link from you-know-who. smile

Last edited by MrEen (2020-02-02 02:52:21)

Offline

#19 2020-02-02 03:06:50

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

MrEen wrote:

Once again, I think I've got it (let's see I'm correct this time). This has removed Firefox from the list for jpg, gif and png files. Here's the tail of my ~/.config/mimeapps.list:

[Removed Associations]
image/jpg=firefox.desktop
image/png=firefox.desktop
image/gif=firefox.desktop

I set that in there and saved it. Will update after a couple of reboots. I am mid-project at the moment, so no rebooting for me for a few hours.

MrEen wrote:

It's a tiny bit different than the link from you-know-who. smile

ALCORNAWHO!




He's gonna kill me... :S

Offline

#20 2020-02-04 00:20:38

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

Aravisian wrote:

I set that in there and saved it. Will update after a couple of reboots.

Does not survive reboot.
At least I know how to make it stop- temporarily. I wonder if I could create a script to run on boot that would do it.

Offline

#21 2020-02-04 00:57:35

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Does ~/.local/share/applications/mimeapps.list have any content for you? Mine doesn't, but when I open it and close it, ~/.config/mimeapps.list says the file has changed on disk and asks if I want to reload it. Reloading doesn't seem to change anything for me.

That all occurs in the text editor Xed BTW.

Offline

#22 2020-02-04 02:18:51

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

MrEen wrote:

Does ~/.local/share/applications/mimeapps.list have any content for you? Mine doesn't, but when I open it and close it, ~/.config/mimeapps.list says the file has changed on disk and asks if I want to reload it. Reloading doesn't seem to change anything for me.

That all occurs in the text editor Xed BTW.

It does since I had added it several posts ago- but it does not seem to have any effect.

Offline

#23 2020-02-04 02:38:46

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

Several posts ago was .local/share/applications/mimeinfo.cache I believe. Just want to be sure.

Offline

#24 2020-02-04 02:49:21

Aravisian
Member
Registered: 2019-08-17
Posts: 410

Re: Remove Firefox as option to "open with" a file (SOLVED)

MrEen wrote:

Several posts ago was .local/share/applications/mimeinfo.cache I believe. Just want to be sure.

-Facepalm- You are 100% right. I just changed the file to mimeapps.list - we will see what happens.

Offline

#25 2020-02-04 02:57:32

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Remove Firefox as option to "open with" a file (SOLVED)

*Fingers crossed*

Offline

Registered users online in this topic: 0, guests: 2
[Bot] ClaudeBot (2)

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 636.86 KiB (Peak: 670.14 KiB) ]