Add method to run a script from DBus directly

Review Request #125648 - Created Oct. 15, 2015 and submitted

Information
David Edmundson
plasma-workspace
3c96208...
Reviewers
plasma

loadScriptInInteractiveConsole requires user interaction which blocks
some purposes, like setting the desktop background from an app.

This runs a given script directly from a passed string without any prompts.

CCBUG: 217950


Questions:

I also toyed with returning the value of a script as a QDBusVariant, thoughts?

Should I not run if widgets are locked?

Ran this:
var allDesktops = desktops();
print (allDesktops);

for (i=0;i<allDesktops.length;i++) {
d = allDesktops[i];
d.wallpaperPlugin = "org.kde.image";
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
d.writeConfig("Image", "file:///home/david/pictures/Wallpapers/northern_lights-wide.jpg")
}

also ran some with errors, that behaved as expected too.

Issues

  • 1
  • 0
  • 0
  • 1
Description From Last Updated
Should there be at least some basic input treatment to prevent malicious activity? Running arbitrary data without any checking seems ... Martin Klapetek Martin Klapetek
Martin Klapetek
Marco Martin
Eike Hein
Martin Flöser
David Edmundson
Marco Martin
David Edmundson
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 903cbfd7e267a4812a6ec222eb7e1b5dd775686f by David Edmundson to branch master.
Loading...