Graceful shutdown of fedora kde using Kde Connect
So, I have been shutting down my pc from a different room using Run Command feature of Kde Connect, it has a command "systemctl poweroff" and it shuts down my pc instantly.
What I want to ask is that sometimes that said pc is doing some work, like some apps or maybe watching youtube or something. Is this method okay to shut it down? will it corrupt my pc?
If there is a better command then I am happy to learn it.
Chatgpt told me to use this command
"qdbus org.kde.ksmserver /KSMServer logout 0 2 2"
and I don't know what this command does or if it is safe.
Thanks for your time