How to change wallpaper from command line in KDE 4.3?

8,239

Solution 1

A trivial solution is to change your wallpaper type in Appearance Settings to slide show, point the directory to the one where your downloaded images can be found, and set an interval thereafter you want a new wallpaper.

Solution 2

Code:

*dcop kdesktop KBackgroundIface setWallpaper /home/crouse/Wallpapers/skull.jpg 5

Just don't use my file;)

Solution 3

In general, dcop was replaced by dbus. Dbus, like dcop, is an inter-application communication system, but dbus is not specific to KDE. Each dbus-using program exports an interface of methods that can be called, and signals that can be watched (kind of like the interface of an object in OOP). Anyway, the particular program you want is most likely Plasma, the KDE4 desktop shell. To browse the dbus interface of a program, I suggest D-Feet, a graphical dbus explorer and debugger. Once you find the dbus method in Plasma's interface for changing the wallpaper (If there isn't one, file a bug. There should be.), you can use D-Feet to figure out how to call it, and even test calling it. Then you want to use the dbus-send program to call this dbus method from the command-line.

Share:
8,239

Related videos on Youtube

gronostaj
Author by

gronostaj

Updated on September 17, 2022

Comments

  • gronostaj
    gronostaj almost 2 years

    Basically question is in title, but let's elaborate a bit:

    I have KDE 4.3 from Arch Linux. And a script which periodically downloads new wallpaper. So I'd like to set it as current wallpaper from command line (actually from cron job script, but it's not relevant).

    In KDE 3, it was trival with dcop. Now, dcop is gone, and I can't find a way to do it with dbus.

    Anybody's got idea how to do it?

  • Chriswall
    Chriswall over 14 years
    As I mentioned - it's in kde4. dcop was in kde3.
  • RaamEE
    RaamEE over 14 years
    1. xsetroot doesn't work in kde 2. the question you're suggesting is in reality much more general, not accurate - dcop was replaced by dbus. but it just so happens that the "wallpaper change" functionality was missing.
  • beibei
    beibei over 14 years
    didn't try it, but yaourt wally says it's out of date.
  • djac
    djac over 14 years
    thanks for information. i know what dbus is. and there is no interface in it for changing wallpaper.
  • Capi Etheriel
    Capi Etheriel over 14 years
    i think it is already latest version. try it out. and than the aur manteiners ;)
  • pbr
    pbr over 14 years
    My point is, dcop used to handle wallpaper changes, dbus doesn't. So dbus clearly doesn't replace ALL of the functionality of dcop. I've not looked deeply at this; goodness knows what else has also been dropped with this transition. Sorry I didn't add another :-) after the xsetroot recommendation; it was likewise meant as a joke.
  • help-info.de
    help-info.de over 3 years
    Please note the conventions for formatting How do I format my posts using Markdown or HTML. Please edit your question to and correct the code.
  • Georgios Syngouroglou
    Georgios Syngouroglou over 3 years
    Thank you for your comment, this is the reason I added the link to the original answer, you may find a formatted version of the command there (superuser.com/questions/488232/…). I prefer the one line command for this solution.