How Can I change wallpaper from CLI?

Giuseppe Calà jiveaxe at gmail.com
Wed Sep 5 20:28:03 UTC 2012


Actually, it is possible to change all kde settings with kwriteconfig
command tool; f.i.

kwriteconfig --file plasma-desktop-appletsrc --group Containments
--group # --group Wallpaper --group image --key wallpaper --type
string /path/to/file/image

As Nicolas stated, plasma has more containments and you need to get
the correct group number and replace # in the command above.

Giuseppe

2012/9/5 Nicolás Alvarez <nicolas.alvarez at gmail.com>:
> 2012/9/5, Nicolás Alvarez <nicolas.alvarez at gmail.com>:
>> 2012/9/5, Alexander Neundorf <neundorf at kde.org>:
>>> On Wednesday 05 September 2012, Jeremy Whiting wrote:
>>>> On Wed, Sep 5, 2012 at 11:30 AM, Alexander Neundorf <neundorf at kde.org>
>>> wrote:
>>>> > On Wednesday 05 September 2012, Shaun Reich wrote:
>>>> >> On Wed, Sep 5, 2012 at 10:53 AM, Tomaz Canabrava <tcanabrava at kde.org>
>>> wrote:
>>>> >> > 2012/9/5 Weng Xuetian <wengxt at gmail.com>:
>>>> >> >> On Wed, Sep 5, 2012 at 9:48 AM, kevinzhow <kevinchou.c at gmail.com>
>>> wrote:
>>>> >> >>> hello~
>>>> >> >>>
>>>> >> >>> Sorry to brother,I don not know which channel should i send this
>>>> >> >>> mail exactly , so i send this mail to kde, kde-devel and
>>>> >> >>> ode-core-devel, but i really need this help,  please
>>>> >> >
>>>> >> > This looks like the KDE Get Hot New Stuff for the desktop
>>>> >> > wallpaper,
>>>> >> > from your screenshoots.
>>>> >> > why don't you create a backend for the GetHotNewStuff for your
>>>> >> > wallpapers?
>>>> >>
>>>> >> there's more to it than just "a source for wallpapers" afict, so i
>>>> >> don't think that's a valid solution.
>>>> >
>>>> > This should be possible using wget and some dbus calls, shouldn't it ?
>>>> >
>>>> > Alex
>>>>
>>>> No, I don't think any plasma containments expose their configuration on
>>>> dbus.
>>>
>>> In KDE3 it was possible to set the wallpaper via dcop in kdesktop. So we
>>> can't
>>> do this anymore ?
>>
>> In the past, a desktop had a wallpaper. Now, a plasma desktop can have
>> one or more desktop containments (activities) which may have any
>> wallpaper plugin which may or may not have the concept of a static
>> image that you can configure.
>
> Apparently you can set a wallpaper like this:
>
> function setWallpaperOnActivity(activity) {
>     if (activity.wallpaperPlugin != "image") return false;
>     activity.currentConfigGroup=["Wallpaper","image"];
>     activity.writeConfig("wallpaper","/usr/share/wallpapers/Foobar");
> }
>
> (untested!)
>
> But there seems to be no DBus method to run JS scripts in Plasma
> without using the interactive console dialog...
>
> --
> Nicolás
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the Plasma-devel mailing list