So that for example I can open krunner,then type "sudo rm /path/to/file",then that command gets executed and if it needs root priviliges,then it just opens that normal window that asks for the root password,and if the command needs a terminal to properly work,then a terminal should be opened.
It should work when you press Shift+Enter, which will launch the command in a terminal window. Or you could use pkexec instead of sudo, this will give you a graphical prompt.
I tried it with neofetch,if type that in krunner and then press shift+enter then nothing happens.
Are you sure you actually had the terminal command item selected at the time you hit Shift+Enter?
yes
Can you please attach a screen recording that shows the problem happening?
Created attachment 138936 [details] screen recording Here,a screen recording
`sudo neofetch` requires interactivity. So that's why it doesn't seem to do anything. Also, we have a built-in system monitoring system with GUI tools and widgets and an app and everything, so hopefully running neofetch as root should be unnecessary.
This is caused by missing kinit, I'm not sure if this is a bug, but on a system without kinit, KRunner won't open the terminal.
Yeah, we're deleting KInit slowly. So if it provides this feature, we'll have to come up with a replacement.
(In reply to Nate Graham from comment #9) > Yeah, we're deleting KInit slowly. So if it provides this feature, we'll > have to come up with a replacement. We can use KTerminalLauncherJob, like https://invent.kde.org/system/dolphin/-/commit/27bfcde4efaf936243fc41e4a61d0cac32105ef6 does.
i dont know if this is related but if i start something using shift+enter the terminal shows up but i never get back to the command prompt. after execution it just sits there, accepts input but no prompt shows up, even after ctrl+c. i do however get a prompt with "sudo su"
Git commit 70d23b891e95bc6911389773f320a4406a12bd87 by Nate Graham, on behalf of Lufan Zhong. Committed on 26/12/2021 at 19:33. Pushed by ngraham into branch 'master'. runners/shell: Port from KToolInvocation::invokeTerminal to KTerminalLauncherJob kinit is being deprecated; this change will allow it to open a terminal and execute commands normally without kinit being present. FIXED-IN: 5.24 M +13 -2 runners/shell/shellrunner.cpp https://invent.kde.org/plasma/plasma-workspace/commit/70d23b891e95bc6911389773f320a4406a12bd87