Bug 422160

Summary: shutdown by key
Product: [I don't know] kde Reporter: mehl
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: wbauer1
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mehl 2020-05-28 08:46:23 UTC
SUMMARY
shutdown by key should be possible without skipping services 
of the OS

STEPS TO REPRODUCE
1. Nothing to reproduce as this feature lacks as of now
2. 
3. 

OBSERVED RESULT
see additional information below

EXPECTED RESULT
see additional information below

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
A kde session can be closed by using the mouse:
   launcher > leave > shut down
Usage of just the key board is preferable. So it would be fine to have 
information about which file is activated by the sequence above. This 
information should be readily available, e.g. when pointing the mouse 
pointer on 'shut down'. Then one could use it by including it in a 
skript which could be activated by a shortcut.

Having just halt or shutdown in a script would not help as I am told 
that several kde and/or linux services are skipped then.

Hopefully my first bugzilla report is understandable for the gurus.

A. Mehl
Comment 1 Wolfgang Bauer 2020-05-31 19:05:41 UTC
*** Bug 422212 has been marked as a duplicate of this bug. ***
Comment 2 Wolfgang Bauer 2020-05-31 19:35:49 UTC
That's already possible since years.

You can assign a keyboard shortcut to the shutdown actions in systemsettings5->Shortcuts->Global Shortcuts.
Check the "KDE Session Management" and "org_kde_powerdevil" components.

It's also possible to do it from a script via D-BUS, run something like:
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
See https://superuser.com/questions/395820/how-to-properly-end-a-kde-session-from-shell-without-root-privileges
(you may have to replace qdbus by qdbus-qt5)

Please feel free to reopen this bug if I misunderstood you.