Bug 447444

Summary: Sudoedit doesn't with Kate when there is already an open document in Kate
Product: [Applications] kate Reporter: Lyubomir <liubomirwm>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: 21.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Lyubomir 2021-12-23 18:41:47 UTC
SUMMARY

STEPS TO REPRODUCE
1. Have some text file opened in Kate
2. Run sudoedit /etc/profile
3. Notice that sudoedit says "/etc/profile" unchanged - and inside Kate you can see a new tab with message "The file /var/tmp/profile.XXzq...." was deleted by another program.

OBSERVED RESULT
Sudoedit doesn't with Kate when there is already an open document in Kate.

EXPECTED RESULT
Sudoedit works with Kate when there is already an open document in Kate

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Christoph Cullmann 2022-01-08 22:39:57 UTC
sudoedit will not work that way with Kate.
Kate doesn't block per default if some session is already running, for that one would need to pass -b to the kate .... call.
I assume it would be easier to either use KWrite for such kind of tasks or use the polkit integration of KTextEditor that let you edit privileged files.