Bug 101227 - xdg-open on text files doesn't work the first time
Summary: xdg-open on text files doesn't work the first time
Status: RESOLVED NOTOURBUG
Alias: None
Product: desktop-file-utils
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Hans Petter Jansson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-29 15:13 UTC by S.
Modified: 2017-11-08 19:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description S. 2017-05-29 15:13:02 UTC
Hi, I have a file named /home/myself/mystuff.txt 
However, nothing happens the first time I try to launch it with:
xdg-open /home/myself/mystuff.txt
The default application for text files is gedit. I also tried changing the extension to .md and simply removing the extension, but it makes no difference. Also the name of the file makes no difference, all text files behave the same. There are no error codes, the command simply completes but nothing opens. Then when I immediately repeat the command a second time it opens correctly.
Comment 1 S. 2017-05-29 15:13:52 UTC
I forgot to mention that this happens with xdg-utils 1.1.2+ and 1.1.1+
Comment 2 Siva 2017-11-01 19:06:49 UTC
(In reply to S. from comment #0)
> Hi, I have a file named /home/myself/mystuff.txt 
> However, nothing happens the first time I try to launch it with:
> xdg-open /home/myself/mystuff.txt
> The default application for text files is gedit. I also tried changing the
> extension to .md and simply removing the extension, but it makes no
> difference. Also the name of the file makes no difference, all text files
> behave the same. There are no error codes, the command simply completes but
> nothing opens. Then when I immediately repeat the command a second time it
> opens correctly.

I have the IDENTICAL issue--running kernel 4.13.5-200, xdg-utils v 1.1.1-5 .  Need to do xdg-open <text file> twice quickly before the file opens
Comment 3 Jerther 2017-11-07 20:28:05 UTC
The problem seems to be related to the associated default program. I have this problem with text files being associated with gedit. If I change this for leafpad, then it works fine.
Comment 4 S. 2017-11-07 22:52:16 UTC
@Jerther: Ah you're right, gedit was the problem. I switched to xed and it seems to open on the first try now.
Comment 5 Hans Petter Jansson 2017-11-08 19:50:55 UTC
Hi, I'm closing this since it's unrelated to desktop-file-utils. If you're still having problems with recent versions of GEdit, I suggest filing a new bug in your Linux distribution's bug tracker and/or in the GNOME bug tracker.

Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.