This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CLI to set wallpaper

Tags: None
(comma "," separated)
bricerebsamen
Registered Member
Posts
18
Karma
0

CLI to set wallpaper

Wed Aug 05, 2009 10:09 am
Is there any command line to change wallpaper in KDE4?
i.e. in Gnome: gconftool-2 -t string -s /desktop/gnome/background/picture_filename <path_to_image>

If not, would be nice to have one, so that one could write a script that would control the wallpaper (such as xplanet)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: CLI to set wallpaper

Thu Aug 06, 2009 4:45 am
At this time, it is not possible to set the wallpaper via the command line, unless you wish to manually wrangle the text of the plasma-desktoprc file, without Plasma running.

This is because Plasma completely rewrites its configuration file when shutting down, and when changes are made through its interface.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

Re: CLI to set wallpaper

Thu Aug 06, 2009 10:04 am
This could change when Plasma will get an overhaul in its DBus interface, IIRC. And going from memory I think that such a thing will be discussed at the upcoming Plasma development sprint (Tokamak III).


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
mark9117
Registered Member
Posts
12
Karma
0

Re: CLI to set wallpaper

Sun Oct 04, 2009 4:13 pm
einar wrote:This could change when Plasma will get an overhaul in its DBus interface, IIRC. And going from memory I think that such a thing will be discussed at the upcoming Plasma development sprint (Tokamak III).


Would you be willing to speculate as to how long this might take?

Thanks.

Mark


mark9117, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: CLI to set wallpaper

Mon Oct 05, 2009 1:07 am
Unfortunately a plan for implementing a DBUS interface to Plasma does not exist at this time. You may be able to use the Javascript console to perform something however.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
bricerebsamen
Registered Member
Posts
18
Karma
0

Re: CLI to set wallpaper

Mon Oct 05, 2009 4:30 am
That's a pity that KDE does not provide any programmatic interface to the desktop background.

My goal was to write a script that would download random wallpapers from various websites and display them as background pics. I could achieve it with the following workaround: save the downloaded picture to a folder (i.e. ~/.wallpaper/picture.jpg) and then tell plasma to show pictures in that folder in a slideshow. Since there is only one picture it works.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: CLI to set wallpaper

Mon Oct 05, 2009 11:23 pm
This would perhaps better be done through a Plasma wallpaper plugin.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
ivan
KDE Developer
Posts
918
Karma
14
OS

Re: CLI to set wallpaper

Tue Oct 06, 2009 9:25 am
Although the idea of a complete d-bus interface for Plasma is abandoned due to Aaron's work on JavaScript console (decision made at Tokamak 3) a few functions could be added to it.

The wallpaper one is requested often, so ... maybe.


Image


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient