New file creation - not opening with file editor

Bug #1497170 reported by Kev Bowring
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GLib
Fix Released
Medium
One Hundred Papercuts
High
Unassigned
glib2.0 (Ubuntu)
High
Iain Lane
xdg-utils (Ubuntu)
High
Unassigned

Bug Description

Create a new file from File - Create Empty File.

Open new document:

expected behaviour - document opens in text editor

actual behaviour - Open With dialogue opens requiring an application to open file.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: thunar 1.6.10-1
ProcVersionSignature: Ubuntu 4.2.0-10.11-generic 4.2.0
Uname: Linux 4.2.0-10-generic x86_64
ApportVersion: 2.18.1-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Sep 18 09:05:54 2015
InstallationDate: Installed on 2015-09-17 (0 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150917)
SourcePackage: thunar
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.18.1-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
DistroRelease: Ubuntu 15.10
InstallationDate: Installed on 2015-09-17 (1 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150917)
Package: xdg-utils 1.1.0~rc3+git20150907-1ubuntu2
PackageArchitecture: all
ProcVersionSignature: Ubuntu 4.2.0-10.11-generic 4.2.0
Tags: wily
Uname: Linux 4.2.0-10-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Kev Bowring (flocculant) wrote :
Revision history for this message
Kev Bowring (flocculant) wrote :

In an older vm running wily - xdg-utils is 1.1.0~rc1-2ubuntu11 and bug not present

affects: thunar (Ubuntu) → xdg-utils (Ubuntu)
Revision history for this message
Sean Davis (bluesabre) wrote :

xdg-mime query filetype FILENAME:
  1.1.0~rc1: text/plain
  1.1.0~rc3: application/octet-stream

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdg-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1497170

tags: added: iso-testing
Revision history for this message
Kev Bowring (flocculant) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Kev Bowring (flocculant) wrote : JournalErrors.txt

apport information

Revision history for this message
Kev Bowring (flocculant) wrote : ProcEnviron.txt

apport information

Revision history for this message
Kev Bowring (flocculant) wrote :

used apport-collect to grab xdg-utils as originally reported against thunar

Changed in hundredpapercuts:
status: New → Confirmed
Changed in xdg-utils (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
importance: Undecided → High
Revision history for this message
Sean Davis (bluesabre) wrote :

Found the source of the issue. Previously, xfce was not did not use gvfs-info for mimetype detection. This changed in this commit:

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=8392f94bbc640e4e69aae706d33a9e4a2f364f26

Relevant code: http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-mime.in?id=5336e0a26dbd1e7cb00a8c05678fef039ba2c3db#n76

Before xfce used info_generic, which performs the mimetype lookup with the mimetype command instead of gvfs-info. On a newly created plaintext file:

$ mimetype --brief --dereference test
text/plain

$ gvfs-info test 2> /dev/null | grep standard::content-type | cut -d' ' -f4
application/octet-stream

Revision history for this message
Sean Davis (bluesabre) wrote :

Following up with this, it's probably a bug that gvfs-info seems to think a blank file would not be plain text.

Revision history for this message
Sebastien Bacher (seb128) wrote :

That's a glib issue, reported on https://bugzilla.gnome.org/show_bug.cgi?id=755795

Changed in gvfs (Ubuntu):
assignee: nobody → Ryan Lortie (desrt)
importance: Undecided → High
status: New → Triaged
tags: added: rls-w-incoming
Changed in xdg-utils (Ubuntu):
status: Confirmed → Invalid
affects: gvfs → glib
affects: gvfs (Ubuntu) → glib2.0 (Ubuntu)
Changed in glib:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Kev Bowring (flocculant) wrote :

updates this morning - new file still appears to be unknown type when created, but does open with text editor on double click

Changed in glib2.0 (Ubuntu):
status: Triaged → Fix Committed
assignee: Ryan Lortie (desrt) → Iain Lane (laney)
Kev Bowring (flocculant)
tags: added: xubuntu-expwily
removed: wily
tags: added: wily xubuntu-exp
removed: xubuntu-expwily
Changed in glib:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glib2.0 - 2.46.1-1

---------------
glib2.0 (2.46.1-1) unstable; urgency=medium

  [ Michael Biebl ]
  * Drop clean-la.mk from debian/rules, no longer required.

  [ Iain Lane ]
  * New upstream release 2.46.1
    + Remove system_header pragma (should fix lack of warnings with things
      like g_return_if_fail)
    + move GStrv typedef (and auto-cleanup) from libgobject to libglib
    + fix order of trashing files to be closer to what is required in the
      specification. Namely, trashinfo files are written first. This should
      fix issues with the gvfs trash backend failing to correctly read the
      info for recently trashed files (preventing 'restore'). (Closes:
      #800491) (LP: #1495943)
    + tweak mime logic to return text/plain on all empty files instead of
      returning application/octet-stream. This includes files that have
      extensions that imply that they may be other types of files, which is a
      slight change of behaviour with respect to old GLib versions. (LP:
      #1497170)
  * debian/patches/0001-Revert-list-store-Fix-a-parameter-check.patch: Drop -
    this is applied upstream in this release.
  * debian/patches/0001-GDateTime-test-fix-occasional-failures.patch: Take
    patch from bgo#754994 to resolve intermittent test failures in the
    GDateTime tests.

 -- Iain Lane <email address hidden> Thu, 15 Oct 2015 16:08:30 +0100

Changed in glib2.0 (Ubuntu):
status: Fix Committed → Fix Released
Changed in glib:
status: Fix Released → Confirmed
Changed in glib:
status: Confirmed → Fix Released
Kev Bowring (flocculant)
tags: removed: xubuntu-exp
Revision history for this message
Paul White (paulw2u) wrote :

Closing by marking "Fix Released" as per other bug tasks

Changed in hundredpapercuts:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.