1

The same text file is opened with my default text editor or Firefox depending upon the content of the file.

For example, let's say I have a file "textfile.txt"

  • If I add 878 lines of text, the file will be opened with Firefox
  • If I add 72 lines of text, the file will be opened with my default text editor (leafpad).

I want to open all of them with my default text editor.

Note 1: If I remove Firefox, nothing is opened (a terminal is opened and closed quickly. I don't have time to read its content).

Note 2: The default file browser (PCManFM) always opens the text file with the default text editor no matter its size (Leafpad).

Note 3: I firstly thought it was a bug of Launchy, so I posted it here. After installing GNOME-Do, I realized it was a general issue.


UPDATE 1: full content of ~/.local/share/applications/mimeapps.list

[Added Associations]
inode/symlink=pcmanfm.desktop;
application/pdf=mupdf.desktop;
application/x-bzip-compressed-tar=synaptic.desktop;
inode/blockdevice=pcmanfm.desktop;
image/jpeg=XnView.desktop;

[Default Applications]
inode/symlink=pcmanfm.desktop
application/pdf=mupdf.desktop
image/jpeg=XnView.desktop
chelder
  • 449
  • 8
  • 18
  • What do you give to `gnome-do`? Just the file name? Do extensions make any difference? – terdon May 21 '14 at 23:42
  • @terdon, I just tried without any extension with the same result. – chelder May 22 '14 at 01:25
  • No, I meant whether different extensions make a difference. Please also tell us exactly how you launch the file. Do you just enter the file name or a full command or what? Are you using any particular plugins for this? I used gnome-do for years (using `synapse` now, in case you want to try it) but never opened files directly that way so I'm not sure what you're doing exactly. – terdon May 22 '14 at 01:27
  • @terdon, as the same is happening with launchy, I don't think it is an issue of GNOME-Do itself. I guess GNOME-Do and Launchy use a common command to open that file. The used plugin is "Files and Folders 2.5". I just enter the name of the filename and press enter. I just changed the filename to textfile.html. Curiously, the same happens (I mean, if textfile.html doesn't have a lot of text, it is still opened by the text file instead the internet browser!) – chelder May 22 '14 at 01:38
  • I just installed `launchy` to test it and it opens a 1000 line file in my default editor. What's your default editor? It might depend on that. Please [edit] your question and add the output of `echo $EDITOR` and `grep text ~/.local/share/applications/mimeapps.list`. – terdon May 22 '14 at 02:14
  • @terdon, the result of both commands is empty. At UPDATE1, I have included the full content of mimeapps.list. My default editor is leafpad. – chelder May 22 '14 at 12:08

0 Answers0