How to change background image programatically?
-
Hello everyone,
I am a noob, trying to become more familiar with making apps and i created a test project for myself in which i am trying to make an app that changes the background to a random image in a specific folder each hour of the day.
This seemed like it should not be too difficult but I am running into some issues. I am currently messing around in an adb shell with gsettings and also trying dbus-send and gdbus with org.freedesktop.Accounts.User BackgroundFile but when i try to Set the value, it does not update since i don't have write ability. I am assuming this is due to sandboxing. Is there a recommended way of interacting with the system to change the background programatically?
I tried looking through the documentation but I can't find anything that really describes any of this.
-
@AdFundum did you find a command that works from the terminal/adb shell? If so, does that command work if you make your app unconfined?
Its possible that UT does not have an app armor policy that fits your use case, and that's the cause of your problem. From the list of policy groups I cannot see anything that would allow a confined app to change the background image.
https://docs.ubports.com/no/latest/appdev/platform/apparmor.html
-
@AdFundum i dont know about confined use but i know how to do it, its not a single command and has a couple of steps. look at lss background module its basically the how to for it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login