4.2.1: Wallpaper set_bg script error RESOLVED!

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
gulk
Posts: 86
Joined: Mon 21 Apr 2008, 19:04

4.2.1: Wallpaper set_bg script error RESOLVED!

#1 Post by gulk »

Hi, I can't figure this one out and need your help...

I use Puppy 4.2.1 and installed wallpaper_setter-01-3.pet a while ago and as far as I recall all was working fine.

Today I wanted to change my wallpaper and used the wallpaper changer. As usual the widgets restarted (I think fixwidgets -wallpaper_setter is called) but the wallpaper was not modified, even after restarting X.

I tracked down all the scripts that are called when a wallpaper is changed and finally found the script that is not executing properly:
set_bg spits the following error out:

Code: Select all

-:1: parser error : Document is empty

^
-:1: parser error : Start tag expected, '<' not found

^

** ERROR **: Invalid XML in RPC
aborting...
I have no idea why.

The current content of this script is:

Code: Select all

#!/bin/sh

#2009-02-25 - zigbert
#removed fixwidgets from here. Moved to AppRun.

#2009-01-05 - hairywill 
#updated -clear function to avoid loading an empty pinboard,
#now it just sets the background as grey
#changed default mode to Stretch
#added call to fixwidgets to refresh pwidget display

# Determine the path to this application.
CURDIR="`pwd`"
APPDIR=`dirname "$0"`
cd "${APPDIR}"
APPDIR="`pwd`"
cd "${CURDIR}"
IMAGE="$1"

if [ "$1" = "-clear" ];then
  IMAGE=""
fi

MODE="`cat $HOME/.config/wallpaper/backgroundmode`"
[ "$MODE" = "" ] && MODE="Stretch"
[ "$MODE" = "Centred" ] && MODE="Centre"
[ "$MODE" = "Scaled" ] && MODE="Scale"

rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <SetBackdrop>
   <Filename>$IMAGE</Filename>
   <Style>$MODE</Style>
  </SetBackdrop>
 </env:Body>
</env:Envelope>

EOF
echo "$IMAGE" > $HOME/.config/wallpaper/bg_img
#xli -onroot -fillscreen "$IMAGE"
#[ "$(which fixwidgets)" ] && fixwidgets &

I don't know if by mistake I modified this script's content. Any idea?

PS: I checked the content of Pwidgets_background, and there is indeed the correct "new" background picture in it.
Last edited by gulk on Sun 20 Dec 2009, 17:36, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

If you get sick of this try a guaranteed simple solution
http://www.murga-linux.com/puppy/viewtopic.php?t=41395

mike

User avatar
gulk
Posts: 86
Joined: Mon 21 Apr 2008, 19:04

#3 Post by gulk »

Thanks Mike, that works indeed and is a good advice.

I could also directly go change the picture path in /root/Choices/ROX-Filer/PuppyPin :)

But I am the stubborn type and will try to "repair" my puppy the way it should work. Good scripting exercise for someone new to bash.

User avatar
gulk
Posts: 86
Joined: Mon 21 Apr 2008, 19:04

#4 Post by gulk »

Ok, being stubborn pays...

My issue was the fact that I installed the xfe pet I found somewhere on this forum.

The .pet renames "rox" executable as "rox2" and replaces "rox" by the xfe executable.
Of course xfe does not understand the <stdin> call from the "set_bg" script.

I fixed the issue by replacing the line in "set_bg"

Code: Select all

rox --RPC << EOF
by

Code: Select all

rox2 --RPC << EOF
Et voilà!

Hopefully someone will find the resolution useful.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Oh good.

Well the 'way it works' is only a serving suggestion...it's how it works for you that counts

regards

mike

Post Reply