Bug 471004

Summary: ctrl-clicking a .txt file does not open the editor I expect.
Product: [Applications] konsole Reporter: Andy <kde.20.andromodon>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 21.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andy 2023-06-14 03:22:31 UTC
I have vscode set up as my mimetype for text files:
```
[andromodon@potens cs]$ xdg-mime query default text/plain
code.desktop
```
I can test that with this command and the file opens correctly in vscode:

```
[andromodon@potens cs]$ ls -l *.txt
-rw------- 1 andromodon andromodon 12527 Jun 14 10:09 todo.txt
[andromodon@potens cs]$ kde-open todo.txt
```

Just as another sanity check, if I click on the file in dophin it also opens in vscode.

Yet, when I ctrl-click on that same `todo.txt` entry in konsole, it opens in kate.  Why is that?  Why wouldn't konsole respect the same application settings as other KDE applications?  

What I would love help with:
1. Help me find some temporary fix so I can get konsole to open these files  using `code`
2. Figure out if konsole is doing the "right thing" right now and if it's not, let's fix it.

Thanks for your help.
Comment 1 Andy 2023-08-04 01:57:53 UTC
(In reply to Andy from comment #0)
> I have vscode set up as my mimetype for text files:
> ```
> [andromodon@potens cs]$ xdg-mime query default text/plain
> code.desktop
> ```
> I can test that with this command and the file opens correctly in vscode:
> 
> ```
> [andromodon@potens cs]$ ls -l *.txt
> -rw------- 1 andromodon andromodon 12527 Jun 14 10:09 todo.txt
> [andromodon@potens cs]$ kde-open todo.txt
> ```
> 
> Just as another sanity check, if I click on the file in dophin it also opens
> in vscode.
> 
> Yet, when I ctrl-click on that same `todo.txt` entry in konsole, it opens in
> kate.  Why is that?  Why wouldn't konsole respect the same application
> settings as other KDE applications?  
> 
> What I would love help with:
> 1. Help me find some temporary fix so I can get konsole to open these files 
> using `code`
> 2. Figure out if konsole is doing the "right thing" right now and if it's
> not, let's fix it.
> 
> Thanks for your help.

At https://discuss.kde.org/t/ctrl-click-on-a-py-file-listing-in-konsole-opens-kate-instead-of-default-editor/3406, they poitned out that this is accessible via ` Settings -> Edit current Profile... -> Mouse -> Miscellaneous -> Text Editor Command`.  Deleting the custom setting there makes Konsole use the system-wide default.  Whew! :)