Announcement
Collapse
No announcement yet.
Dolphin no longer recognizing plain text files without extension
Collapse
X
-
Tags: None
- Top
- Bottom
-
Originally posted by marco07 View PostIn my case now, with or without extension,txt, files open in open office writer with a single click.
- Top
- Bottom
Comment
-
-
What's weird is I really can't fix it. I'm waiting for the re-base to 24.04 then I'm moving to a clean install and home. I've been updating/upgrading this one since 2018. Time for a "clean house"
I'm also having other problems with Dolphin - screen not refreshing, file highlights messed up, etc. I reinstalled it but no change. I have to close it after a few file moves or whatever just to refresh the screen.
- Top
- Bottom
- Likes 1
Comment
-
Originally posted by oshunluvr View Post
Right click on the file, select "Properties" then next to "Open With" click "Change" and select "Kate" and then "Move Up" until it's at the top. Open Office probably set itself as default when you installed it.
- Top
- Bottom
Comment
-
Getting weirder now...
New behavior: text files without an extension are opened by "Subtitle Composer" even though the "Properties" show a ".sub" extension for Subtitle Composer.
Further testing reveals that the text file (without an extension) is detected as a subtitle file by Dolphin if there are mac addresses in the file - which there were in this case. Deleting the mac addresses resulted in the file being opened by Kate instead.
I suspect Dolphin scans the text file if it has no extension and tries to "guess" what the file contains.
One plus to this discovery is I found that if you click the middle button on a text file with no extension, it opens in Kate. I also discovered if you attempt the middle-click on a .desktop file it opens with Kwrite instead of Kate. Kwrite was the second option listed in "Preferences".
Still, for whatever reason, Dolphin assumes a file with mac addresses in it and has no extension is a subtitle file. Preferences on the file with mac addresses in it says it's a ".sub" file even though it has no extension.Last edited by oshunluvr; Jul 24, 2024, 08:39 AM.
- Top
- Bottom
Comment
-
Originally posted by oshunluvr View PostDolphin assumes a file with mac addresses in it and has no extension is a subtitle file.Windows no longer obstructs my view.
Using Kubuntu Linux since March 23, 2007.
"It is a capital mistake to theorize before one has data." - Sherlock Holmes
- Top
- Bottom
Comment
-
Here's the content of the file:
Here's the content as viewed from Subtitle composer:
Note the contents match.
If I delete thesetwofour lines:
Code:ethernet 60:45:cb:74:ee:a4 yes wifi e8:d1:1b:6c:96:9b no ~~~ monster=01:12:46:82:ab:4f ghost=01:1a:d2:56:6b:e6
The file opens with Kate by default.
I deleted one line at a time until Kate was the default and thesetwofour lines cause the mis-match.
These lines resemble subtitle file (.srt) content but I am unfamiliar with ".sub" format. Some text from an srt file:
Code:1 00:01:40,857 --> 00:01:42,620 There was me. 2 00:01:43,026 --> 00:01:45,756 That is, Alex, and my three droogs. 3 00:01:46,029 --> 00:01:49,658 That is, Pete, Georgie and Dim.
I think Dolphin must think the MAC addresses are time codes. You can see Subtitle Composer i only 49% sure it's a subtitle file.Last edited by oshunluvr; Jul 24, 2024, 03:16 PM.
- Top
- Bottom
Comment
-
I looked up "sub" files and this is the format:
Code:{0}{100}Subtitle line 1 {150}{300}Subtitle line 2 {350}{550}Subtitle line 3
- Top
- Bottom
Comment
-
For additional conformation of what's actually happening, I delete all the lines except each of the 4 MAC lines and either (any) of them cause the false file type identification.
- Top
- Bottom
Comment
-
So I decided to "solve" it myself with this work-around. I simply changed the preferences for ".sub" files to use Kate as the primary editor and Subtitle Composer as the secondary. That way when I click on a text file with no extension but has MAC addresses in it's content, it will open with Kate.
If I ever actually encounter a .sub file, I will hit the middle mouse button to open it.
Still, poor behavior on Dolphins part, but a very small vector in my world so moving on...
- Top
- Bottom
Comment
-
On the plus side, whatever was causing the initial problem in the first post seems to have gone away. An update and/or me force re-installing Dolphin probably solved it.
- Top
- Bottom
Comment
-
You keep ascribing the problems to dolphin, but I think deciding the type of files is done by another level or service, dolphin is just invoking that.
The MIME spec implies that KDE implements the spec, but I don't know where to look for the details; I kept getting lost looking through the repository.
One can use xdg-open in a konsole to open files, and get slightly more info about what is going on, for example:Code:$ cat foo A plain text file. ALfa bravo charlie delta. $ xdg-open foo kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
Regards, John Little
- Top
- Bottom
Comment
Comment