Bug 942813 - All plain text file types associated with LibreOffice Writer instead of gedit
Summary: All plain text file types associated with LibreOffice Writer instead of gedit
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal with 1 vote (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 14:27 UTC by Atri Bhattacharya
Modified: 2016-06-24 12:28 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Atri Bhattacharya 2015-08-23 14:27:50 UTC
Steps to reproduce:
* Install "20150821 (Tumbleweed)"
* Create a plain text file (I did "touch abc.txt" from the terminal).
* Open nautilus and double click on the text file...
* ...see it open with LO writer instead of gedit (expected).

This is true of spec files, .changes files, etc. as well.
Comment 1 Dominique Leuenberger 2015-08-31 10:14:46 UTC
what does

xdg-mime query default text/plain

tell you?
Comment 2 Atri Bhattacharya 2015-08-31 13:54:00 UTC
(In reply to Dominique Leuenberger from comment #1)
> what does
> 
> xdg-mime query default text/plain
> 

writer.desktop
Comment 3 Dominique Leuenberger 2015-08-31 20:40:01 UTC
(In reply to Atri Bhattacharya from comment #2)
> (In reply to Dominique Leuenberger from comment #1)
> > what does
> > 
> > xdg-mime query default text/plain
> > 
> 
> writer.desktop

ok, so writer IS indeed set as the default.. now let's chase down the why :)

do you have gio-branding-openSUSE installed?

The 2nd latest entry in the changelog should be:

>* Mon Nov 03 2014 badshah400@gmail.com
>- Gedit desktop file got renamed to org.gnome.gedit.desktop,
>  update gnome_defaults.conf accordingly (boo#904010).

gedit is installed? (rpm -q gedit)

Does the xdg-mime command give the same result when started as 'root' ? (su -)

Does running (As root)
> /usr/bin/update-mime-database "/usr/share/mime"

change anything? (This could mean that during install, when installing gio-branding-openSUSE, the updaye-mime-database binary could have been missing for example... /var/log/zypp or /var/log/YaST might have pointers to that)
Comment 4 Atri Bhattacharya 2015-09-01 09:24:47 UTC
(In reply to Dominique Leuenberger from comment #3)
> 
> ok, so writer IS indeed set as the default.. now let's chase down the why :)
> 
> do you have gio-branding-openSUSE installed?
> 
> The 2nd latest entry in the changelog should be:
> 
> >* Mon Nov 03 2014 badshah400@gmail.com
> >- Gedit desktop file got renamed to org.gnome.gedit.desktop,
> >  update gnome_defaults.conf accordingly (boo#904010).

Yes. Correct changelog (I have the latest version from TW).

> 
> gedit is installed? (rpm -q gedit)

Yes

> 
> Does the xdg-mime command give the same result when started as 'root' ? (su
> -)

Yes, same result (writer.desktop)

> 
> Does running (As root)
> > /usr/bin/update-mime-database "/usr/share/mime"
> 
> change anything? (This could mean that during install, when installing
> gio-branding-openSUSE, the updaye-mime-database binary could have been
> missing for example... /var/log/zypp or /var/log/YaST might have pointers to
> that)

No, no change after running the command.

I have no clue what is going on, /etc/gnome_defaults.conf suggests org.gnome.gedit.desktop over anything else for text/plain, so that isn't being read somehow? I have seen other mimetype associations messed up as well (can't recall which off the top of my head). And this text/plain messed up association was right from the get-go since I installed a fresh TW system on a VM. So nothing that I touched (at least knowingly).
Comment 5 Bjørn Lie 2016-06-24 12:28:02 UTC
Going out on a limb here and assuming this was fixed with the changes we did in

https://build.opensuse.org/request/show/355257