Bug 481319 - [Feature Request] Add a function to execute a process from a qml page
Summary: [Feature Request] Add a function to execute a process from a qml page
Status: RESOLVED WORKSFORME
Alias: None
Product: Welcome Center
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-14 11:51 UTC by Steve Cossette
Modified: 2024-02-14 18:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
attachment-446266-0.html (1.39 KB, text/html)
2024-02-14 17:12 UTC, Steve Cossette
Details

Note You need to log in before you can comment on or make changes to this bug.
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.