Changing File Associations in Gnome

Hi All,

I have recently changed to Leap 42.3 from Leap 42.1. I am having problems with file associations. For example, I like ‘kate’ as text editor and have installed it but the gnome’s default text editor ‘gedit’ is also installed. In Leap 42.1, I could change default associations easily by right clicking the document and then clicking ‘Open with other applications’ and selecting the application of my choice.

In Leap 42.3, even though the above facility is still available, the ‘Open with other applications’ List shows neither ‘gedit’ nor ‘kate’; when I wish to select either of them for opening a ‘.txt’ document. Clicking a text document, opens it in LibreOffice Writer. I want to open all text documents in kate.

Guidance in this shall be highly appreciated.

Regards,

RSP2

Try selecting a text file, “Ctrl+I” (or right-click+Properties), then the “Open With” tab should reveal all relevant applications, unless there is something else wrong.

Hi Wise Penguin,

Ya, there obviously is something “else” wrong because as I stated in my earlier mail, both the relevant applications ‘gedit’ and ‘kate’ are not listed in the drop-down list of applications.

Regards,

RSP2

Are just “gedit” and “kate” missing or other applications too? For instance, evince (AKA Document Viewer) should be listed under Recommended Applications or Other Applications both under > File Properties > Open With tab or > Right Click > Open With Other Application > View All Applications button.

And most (all?) other applications should appear in the “Other Applications” list…

On Thu 14 Sep 2017 12:16:01 PM CDT, rsp2 wrote:

Hi Wise Penguin,

Ya, there obviously is something “else” wrong because as I stated in my
earlier mail, both the relevant applications ‘gedit’ and ‘kate’ are not
listed in the drop-down list of applications.

Regards,

RSP2

Hi
Gedit is listed as the ‘default text editor’ (rather than the word
gedit). So even in the list of other applications Kate doesn’t show up?

If you create a test user and login, does the issue duplicate?

I use medit and just set as the default via right click and open with
tab, then set as default.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.79-18.26-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Wise Penguin wrote:

Are just “gedit” and “kate” missing or other applications too? For instance, evince (AKA Document Viewer) should be listed under Recommended Applications or Other Applications both under > File Properties > Open With tab or > Right Click > Open With Other Application > View All Applications button.

And most (all?) other applications should appear in the “Other Applications” list…

Main: Leap 42.2 Gnome on i7 4720HQ + Geforce GTX960M
Test: Leap 42.2 (& others) on Core2Duo + GM965

“Find new application” tab has installed ‘gedit’ once again. It now shows as the default application (and I can open ‘.text’ document with it) but ‘kate’ is still not shown even though it is shown as installed. All other applications are shown but “Evince” is not shown.

Regards,

RSP2

The “Find new application” button starts Gnome-Software and indeed there is something odd: in a test install of mine it offers to install Gedit and LibreOffice Writer, but those two apps are already installed on my system and are shown as “Recommended applications” in the “Open File” menu…
I tried to install Kate, but stopped there since it wanted to pull in half of KDE/Plasma that I don’t want on my system.

Please create a new test user as **malcolmlewis **asked, and see if your problem still exists when you log in as that new user.

Kate not being shown might be due to inconsistent configs between KDE and Gnome.
Please be aware that “evince” should show up in the “Other Applications” list as “Document Viewer”: please double check it, since it would be very strange not finding a native Gnome application installed by default…:\

**Hi Malcolmlewls,
Hi Wise Penguin,

Please create a new test user as malcolmlewis asked, and see if your problem still exists when you log in as that new user.

I did what you and Wise Penguin said. Created a new user and then logging in as that user, did right click on a text document. There I found ‘kate’ and ‘text editor’ (which I presume is Gedit) listed as recommended applications.
BTW Wise Penguin, Evince does appear as a document viewer. Thanks a lot for this part.

But what do I do next to get kate in my own login?

Regards,

RSP2**

Good news, that means that your system is sound and the problem is at user level.
Please open a terminal and issue:


ls /usr/share/applications

You should find a file like <something including “kate”>.desktop
Then look in your home folder for file .config/mimeapps.list, open it and edit so that it includes a line like:

**[Default Applications]
text/plain=<something including “kate”>.desktop **

where you substitute the actual name of the kate launcher.
Save, logout, login back and you should be good to go with kate.

Thanks a lot to Malcolmlewis; Wise Penguin and Orso.

Mimeapps.lst worked.

Kate is now shown as default for opening .txt files.

Regards,

RSP2