Bug 447444 - Sudoedit doesn't with Kate when there is already an open document in Kate
Summary: Sudoedit doesn't with Kate when there is already an open document in Kate
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-23 18:41 UTC by Lyubomir
Modified: 2022-01-08 22:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.