thesamet / webilder

Wallpaper downloader and rotator that uses Flickr and Webshots.
http://www.webilder.org/
Other
30 stars 12 forks source link

Unable to view wallpapers in Mint 16 with Mate #45

Open smozius opened 10 years ago

smozius commented 10 years ago

I've installed Mint 16 with mate, I installed Webilder by downloading the tar and setting it up with Python. When opening the Webilder Desktop, I can see all of the wallpapers and download more, but when setting a wall paper nothing happens.

I've tried all of the display manager listings in the advanced preferences along with trying Compiz, but nothing changes the default wall papers from mate.

Any ideas?

Corin-EU commented 10 years ago

"but nothing changes the default wall papers from mate."

The reason for this is because the Mate desktop uses caja in desktop grabbing mode. When caja is run in this way, it is possible to display icons on the background.

So when you run webilder in default mode, it paints the wallpaper as is normal on the root background which is "underneath" the desktop background displayed by caja. If you were to kill the caja process, you would see the wallpapers on the background.

Thus what is needed is to tell webilder to change the background picture setting used by caja to the path to the image file selected by webilder.

This difficulty is also found with other desktops which use a utility to overlay the root background with another image, usually to allow icons to be drawn on the picture eg LXDE with pcmanfm.

So the solution then is to change webilder configuration

Tools -> Preferences -> Advance

for Wallpaper Settings

Set a wallpaper by running

to point to custom external shell script eg

/usr/local/share/sh/set_wallpaper "%f"

to use an appropriately crafted command for whatever desktop is running (easier than having to change the limited desktop options in preferences).

In the script /usr/local/share/sh/set_walllpaper, if the DESKTOP is Mate (v1.6 or greater using dconf which replaces mateconf), the following function is called

set_wallpaper_mate ()
{

 local changer command wallpaper status

 wallpaper="${1}"
 changer="gsettings"

 command="`command -v ${changer}`"

 if [ -n "${command}" ]
then
      "${command}" set "org.mate.background" "picture-filename" "${wallpaper}"
     status=${?}
 else
     msg_error "executable" "${changer}" "is not available"
     status=5
 fi

 return ${status}

}

The appropriate function is called from another function in which

  case "${DESKTOP}" in
      "LXDE")  set_wallpaper_lxde "${wallpaper}" ; status=${?} ;;
      "Mate")  set_wallpaper_mate "${wallpaper}" ; status=${?} ;;
      "XFCE")  set_wallpaper_xfce "${wallpaper}" ; status=${?} ;;
                *)  set_wallpaper      "${wallpaper}" ; status=${?} ;;
 esac

This has been tested on Linux Mint 16 Petra with a Mate desktop and it works.