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
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.