Bug 481319

Summary: [Feature Request] Add a function to execute a process from a qml page
Product: [Applications] Welcome Center Reporter: Steve Cossette <farchord>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: fanzhuyifan, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: attachment-446266-0.html

Description Steve Cossette 2024-02-14 11:51:26 UTC
Good morning!

I'm working on customizing plasma-welcome for Fedora using it's function to add more pages by simply adding qml pages to /usr/share/plasma/plasma-welcome/extra-pages.

The page we're trying to add would allow the user to enable third party repositories in dnf by pressing a button. Said button, once pressed, should spawn a process in the background (pkexec fedora-third-party enable).

I've been searching on ways to do this, but that'd require a qml binding around QProcess (If I understand qml properly -- I am very much 100% a newbie at qml and c++, but I'm able to get around by looking at the logic of things).

IF something like that could be implemented in plasma-welcome, it would be awesome!

Thank you!
Comment 1 fanzhuyifan 2024-02-14 15:34:47 UTC
This is a question about QML in general, and not about KDE software. E.g., see https://forum.qt.io/topic/75176/external-process-from-qml

For support, the forum https://discuss.kde.org/ and the matrix channel #kde:kde.org are better resources.
Comment 2 Nate Graham 2024-02-14 15:36:17 UTC
In fact this is already implemented and documented here: https://invent.kde.org/plasma/plasma-welcome#run-a-terminal-command

Did you miss that, or did you try it and find that it doesn't meet your needs?
Comment 3 Steve Cossette 2024-02-14 17:12:32 UTC
Created attachment 165822 [details]
attachment-446266-0.html

Oh i did not see that… sorry!

On Wed, Feb 14, 2024 at 10:36 AM Nate Graham <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=481319
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|NOT A BUG                   |WORKSFORME
>
> --- Comment #2 from Nate Graham <nate@kde.org> ---
> In fact this is already implemented and documented here:
> https://invent.kde.org/plasma/plasma-welcome#run-a-terminal-command
>
> Did you miss that, or did you try it and find that it doesn't meet your
> needs?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 4 Nate Graham 2024-02-14 17:33:26 UTC
No worries. I'm open to suggestions on how we can improve the documentation to make sure things are obvious.
Comment 5 Steve Cossette 2024-02-14 18:02:25 UTC
No that's adequate. To be completely honest, I was looking at documentation on api.kde.org and not plasma-welcome's readme. That's 100% my bad.