Bug 162113

Summary: "set as background" export tool
Product: [Applications] digikam Reporter: John Calixto <john>
Component: Plugin-Generic-WallPaperAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, caulier.gilles, kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0

Description John Calixto 2008-05-15 07:51:55 UTC
Version:           0.9.3 (using KDE 3.5.9)
Installed from:    Ubuntu Packages
OS:                Linux

If the path to an image file contains a single quote character ('),
digikam is not able to set it as the desktop background image.

Steps To Reproduce
------------------
- Create an album with a single quote character (') in its name, or
  add a photo with a single quote character in its name.  E.g.

    Garp's Birthday.jpg

- Try to set it as the desktop background using the "Set As
  Background" entry in the Image menu.
Comment 1 John Calixto 2008-05-15 08:01:07 UTC
With strace, I found the following errors when trying to set the
background:

    [pid  8172] write(2, "/bin/sh: ", 9)    = 9
    [pid  8172] write(2, "Syntax error: Unterminated quote"..., 40) = 40

Further investigation with strace revealed that digikam uses dcop to
set the background image - something to the effect of:

    dcop kdesktop KBackgroundIface setWallpaper ...

I'm not sure if this is the correct place for the fix, but I found
the following code in imageviewer.cpp:

        QString com=QString("dcop kdesktop KBackgroundIface setWallpaper '%1' %2 >/dev/null 2>/dev/null")
                                .arg(m_loaded_image_url.url())

The problem seems pretty obvious from that snippet.  I'll try and
submit a patch later.

Comment 2 caulier.gilles 2008-05-15 08:47:19 UTC
John,

The code to set an image as desktop wallpaper is embeded in a kipi-plugin, not in digiKam core. Code is here:

http://websvn.kde.org/branches/extragear/kde3/libs/kipi-plugins/wallpaper/plugin_wallpaper.cpp?revision=670712&view=markup

Look the method Plugin_WallPaper::setWallpaper() for details

Gilles Caulier
Comment 3 caulier.gilles 2008-12-08 09:21:30 UTC
John,

What's news about this file ?

Gilles Caulier
Comment 4 Nicolas L. 2009-07-05 02:09:39 UTC
this plugin is currently disabled
Comment 5 caulier.gilles 2009-07-05 08:45:44 UTC
yes, because a Plasma do not have yet an interface to push image over background desktop. I don't know yet about KDE 4.3 (can be fixed).

DBUS Interface must be called "org.kde.desktop.Background.xml"...

Gilles Caulier
Comment 6 caulier.gilles 2011-12-21 18:09:28 UTC

*** This bug has been marked as a duplicate of bug 217950 ***
Comment 7 caulier.gilles 2019-07-28 21:21:36 UTC
Fixed with bug #217950