Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Problem with spaces in wallpaper file names

  • Daeroncs

    I haven't used gnome in a while, and was disappointed that it still doesn't have a built in wallpaper changer.  However, I googled around and found this one, which seems to work quite well, except for the problem that it seems to fall over when it finds a wallpaper filename with spaces in it.  Of course, i only found this after I had added a heap of files to the filelist, and then had to delete most of them!  I think I would be right in uggesting that most wallpaper files you find on the net feature filenames with spaces.  Linux, Windows and OS X all allow these filenames.  Don't you just have to put quotes around the filename in the command line?

    Anyway, thanks for the useful tool - keep up the good work.

    • We did end up finding a solution to this.  It was in the bgchanger.py located in the /usr/share/bgchanger/lib/ folder.  Simply change one line.

      Old line:
      cmd += "--set /desktop/gnome/background/picture_filename %s " % pic

      New line:
      cmd += "--set /desktop/gnome/background/picture_filename '%s' " % pic

      It was literally that simple but it took me a bit to realize what was the program was doing in the code and my boyfriend to deduce how to change the code to reflect the solution.


    • Rhuac

      Actually change it so this and it'll fix it:

      cmd += "--set /desktop/gnome/background/picture_filename \"%s\" " % pic