FS#72466 - krunner: Unable to execute command using konsole

Attached to Project: Arch Linux
Opened by Zhong Lufan (hill) - Monday, 18 October 2021, 19:51 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 26 December 2021, 21:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Entering commands in krunner and pressing Shift + Enter or clicking on the konsole icon does not open konsole and execute commands properly.

error log:
```
10月 19 03:35:13 Hill-LPC krunner[10175]: (无法调用命令行终端)ERROR: 无法调用命令行终端程序:
10月 19 03:35:13 Hill-LPC krunner[10175]: 无法通过 D-Bus 使用 KLauncher。在调用 kdeinit_exec_with_workdir 时发生错误:
10月 19 03:35:13 Hill-LPC krunner[10175]: The name org.kde.klauncher5 was not provided by any .service files
```

I'm not sure if this is a known issue upstream or if the Arch Package lacks a kinit dependency.
This task depends upon

Closed by  Antonio Rojas (arojas)
Sunday, 26 December 2021, 21:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  plasma-workspace 5.23.4-3
Comment by Zhong Lufan (hill) - Monday, 18 October 2021, 21:01 GMT Comment by Antonio Rojas (arojas) - Monday, 18 October 2021, 21:30 GMT
No, that upstream bug is unrelated.
Comment by Zhong Lufan (hill) - Monday, 18 October 2021, 21:53 GMT
The situation[1] is very similar. I executed the same command after installing kinit and everything was normal.

[1] https://bugs.kde.org/show_bug.cgi?id=437131#c2
Comment by Zhong Lufan (hill) - Tuesday, 19 October 2021, 16:56 GMT
I created a patch [1] which makes it independent of kinit.

I'm not familiar with C++ or QT, so please let me know if there are some coding errors.

[1] https://github.com/Hill-98/plasma-workspace/commit/57c9f18918e19e7d6bd7c16ee296f41b0c85d9f6.patch
Comment by Antonio Rojas (arojas) - Tuesday, 19 October 2021, 17:00 GMT
Nice, please submit a pull request upstream.
Comment by Zhong Lufan (hill) - Tuesday, 19 October 2021, 17:03 GMT
I would try to submit the PR upstream if it has no coding errors or specification issues.
Comment by Antonio Rojas (arojas) - Tuesday, 19 October 2021, 17:06 GMT
It looks fine to me, have you tested that it works? You can simplify it by using

str.split(QLatin1Char('='))

instead of a regex.
Comment by Zhong Lufan (hill) - Tuesday, 19 October 2021, 17:13 GMT
I tested it and it works perfectly.

Since I saw that the parseShellCommand below it uses regular expressions to handle env, I just took it over and used it.

I could also try using split to fix it.
Comment by Zhong Lufan (hill) - Tuesday, 19 October 2021, 17:16 GMT
But if you use split('=') to handle it, it seems to have an effect on definitions like 'X=X=X'.
Comment by Antonio Rojas (arojas) - Tuesday, 19 October 2021, 17:24 GMT
Right, then maybe better use str.section(). But this can be discussed in the upstream PR
Comment by Zhong Lufan (hill) - Tuesday, 19 October 2021, 17:25 GMT
Okay

Loading...