Version: (using KDE KDE 3.1.4) Installed from: Unlisted Binary Package Is it possible to set the kdesktop background mode on the command line/with dcop? I managed to change the background wallpaper with the following command: dcop kdesktop KBackgroundIface setWallpaper wallpaper.jpg 2 Unfortunately, there doesn't seem to be a way to change the BackgroundMode itself (setBackgroundMode() doesn't seem to be exported; I couldn't find it with kdcop). What I would like to do is to change the background mode to Flat (with a specific color) after disabling the wallpaper with dcop kdesktop KBackgroundIface setWallpaper "" 0 Is this possible? My current workaround is to create a small empty color tile and set this as a wallpaper with the command above. But this isn't very elegant.
Note that the role of the wallpaper /mode/ has been severely diminished in KDE 3.2.x
BTW: xsetroot is no alternative solution because "xsetroot -solid <color>" can't be used to set a solid background color in a KDE environment. This is how this problem came up in the first place when we migrated one of our IRIX users to a Linux+KDE machine.
Created attachment 5263 [details] Patch to export setColor method via DCOP In fact the method to change to color is already there. It just needs one line to export the method via dcop. With the patch one can use dcop kdesktop KBackgroundIface setWallpaper "" 0 dcop kdesktop KBackgroundIface setColor "gray" true dcop kdesktop KBackgroundIface setColor "gray" false
On Thursday 18 March 2004 11:42, mcamen@mcamen.de wrote: > Patch to export setColor method via DCOP Looks fine to me, except that +#include <qcolor.h> could be maybe reduced to class QColor; (or does DCOP need the full class definition?) > In fact the method to change to color is already there. It just needs one line > to export the method via dcop. With the patch one can use > dcop kdesktop KBackgroundIface setWallpaper "" 0 > dcop kdesktop KBackgroundIface setColor "gray" true > dcop kdesktop KBackgroundIface setColor "gray" false Cool. Please commit.
Yep, I also tried 'class QColor' first but the full include seems to be necessary for DCOP. I will commit...
CVS commit by mcamen: Add DCOP method for setColor. Now one can set the background color like this: dcop kdesktop KBackgroundIface setWallpaper "" 0 dcop kdesktop KBackgroundIface setColor "gray" true dcop kdesktop KBackgroundIface setColor "gray" false CCMAIL: 77678-done@bugs.kde.org M +6 -0 KBackgroundIface.h 1.10 M +1 -1 bgmanager.cc 1.86 --- kdebase/kdesktop/KBackgroundIface.h #1.9:1.10 @@ -7,4 +7,5 @@ #include <dcopobject.h> +#include <qcolor.h> class KBackgroundIface : virtual public DCOPObject @@ -39,4 +40,9 @@ k_dcop: virtual void setWallpaper(QString wallpaper, int mode) = 0; + /** Set color. + * @param c The color. + * @param isColorA true for foreground and false for background color. */ + virtual void setColor(const QColor &c, bool isColorA) = 0; + /** Change the wallpaper in "multi mode". */ virtual void changeWallpaper() = 0; --- kdebase/kdesktop/bgmanager.cc #1.85:1.86 @@ -652,4 +652,5 @@ void KBackgroundManager::desktopResized( } +// DCOP exported void KBackgroundManager::setColor(const QColor & c, bool isColorA) { @@ -674,5 +675,4 @@ void KBackgroundManager::setColor(const } -// DCOP exported void KBackgroundManager::setBackgroundEnabled( const bool enable ) {
Bug closed. Kdesktop is no more mantained.