Installing software overrides distribution default handlers

Hello,
I just noticed that installing software overrides distribution default handlers, example: After installing Libre Office “Writer” is now default app for handling plain text files (instead of Gedit), “Draw” becomes default handler for .PDF files (instead of Evince) etc.

Of course I can manually search for all type of files and “unset” these programs but I wonder is there any global solution for that?

Notice that even if I manually unset all these types using “Applications” settings in GNOME settings this applies only for my user, not for other users and not for root account. It’s kind of frustrating because sometimes I’m running Nautilus as root and all plain text files want to open via Libre Office Writer. And this also means that every time I want to install new software for something it overrides these settings again and it requires intervention.

Just wonder is there any “global” solution for that available? I didn’t experience this in other distros running GNOME3.

Very likely related thread:

…I have talked with enough Gnome Devs to know they don’t know half what is going on. Just a few months ago I had to educate one actual Dev about the fact that Gnome won’t let you pick a default terminal; he didn’t believe me.

Anyway, this definitely seems like a DE related “problem” since both Fedora Gnome, Arch Gnome and Arch Cinnamon and Arch Xfce has the same phenomenon. This is specifically common with media handling apps like picture viewers (where the browser tend to be set as default when you install a new one) and text editors / pdf viewers (where you office suite, if you have one, gets set as default).

1 Like

:scream: :scream: :scream: :scream: :scream: :scream: :scream: :scream: :scream: :scream: :scream:

6 Likes

Good point.

This isn’t necessary: navigate to the admin:/// location and you will be prompted for your password and thereby gain root-level access to all files. Files will open in your default application (and you will be prompted for each file to elevate permissions).

3 Likes

Better, but not nearly as convenient:

  1. make backup.
  2. copy file to ~
  3. edit that file as yourself
  4. once done, checked, double-checked and satisfied, copy/move back to original location and chown.

Actually I’m not running Nautilus as root on daily basis or anything like that :stuck_out_tongue:

Just opened it via “sudo nautilus” time or two to copy fonts or something (I don’t remember exactly) and to check default handlers issue there. I usually don’t play with root directory files unless it is absolute necessary.

Didn’t know about “admin:///” thing. Thank You very much! I found it very convenient way to gain elevated privileges in graphical interface. :slight_smile:

1 Like

or use sudo -e or sudoedit , right ?
Since that does the same thing

of course not for those don’t like terminal
1 Like

Well, it doesn’t do the same thing as you’re actually editing the root-owned files, but as long as you always take step 0 first, it shouldn’t really matter. sudoedit is indeed what I use. The multistep approach up there might be more suitable for CLI novices, to get used to that environment. Also, it gives them the opportunity to still do the editing in a GUI editor, and check it before slotting it back :wink: