Bug 512016

Summary: Run Commands sample commands should be different on Windows
Product: [Applications] kdeconnect Reporter: treaki
Component: windows-applicationAssignee: brute4s99 <piyushaggarwal002>
Status: RESOLVED FIXED    
Severity: normal CC: albertvaka
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description treaki 2025-11-12 22:33:50 UTC
Hi,

on windows the default command "Lock screen" should be something like 

rundll32.exe user32.dll,LockWorkStation

that works fine with me, but loginctrl youll find hardly on a windows system. i guess unlock screen is not supported...

Also its a hassle to reenter all commands for 4 devices i have connected, maybe add a way to also list commands defined on other device config screen that can be enabled with a simple checkbox ;)

thanks in advance
Comment 1 treaki 2025-11-12 22:34:48 UTC
Regarding not having the latest version installed, i used the microsoft store for it and thats the version it came with...
Comment 2 Albert Vaca Cintora 2025-12-10 21:22:05 UTC
I don't know how to check for Windows from QML, but we used to have different commands when the settings were widgets-based: https://invent.kde.org/network/kdeconnect-kde/-/blob/1275c8e031fc06c5f31bb1448b31676cb8127315/plugins/runcommand/runcommand_config.cpp#L40-68
Comment 3 Bug Janitor Service 2026-01-03 14:16:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/897
Comment 4 Aleix Pol 2026-01-06 23:07:01 UTC
Git commit f02331eec9ee9e0db06ee0ea00cb7588fa398f7c by Aleix Pol Gonzalez, on behalf of Stephan Seitz.
Committed on 06/01/2026 at 23:00.
Pushed by apol into branch 'master'.

runcommand: Make sample command OS-specific

Extend JS model for sample commands to have OS-specific entries.

I did not test the Windows commands specifically but took them from the old
codebase https://invent.kde.org/network/kdeconnect-kde/-/blob/1275c8e031fc06c5f31bb1448b31676cb8127315/plugins/runcommand/runcommand_config.cpp#L40-68.

M  +51   -30   plugins/runcommand/kdeconnect_runcommand_config.qml

https://invent.kde.org/network/kdeconnect-kde/-/commit/f02331eec9ee9e0db06ee0ea00cb7588fa398f7c