Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 03:06
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
4.2.1: Wallpaper set_bg script error RESOLVED!
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
gulk


Joined: 21 Apr 2008
Posts: 86

PostPosted: Sat 19 Dec 2009, 17:51    Post subject:  4.2.1: Wallpaper set_bg script error RESOLVED!  

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:
-: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:
#!/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, 13:36; edited 1 time in total
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8711

PostPosted: Sun 20 Dec 2009, 07:07    Post subject:  

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

mike
Back to top
View user's profile Send private message 
gulk


Joined: 21 Apr 2008
Posts: 86

PostPosted: Sun 20 Dec 2009, 13:05    Post subject:  

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 Smile

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.
Back to top
View user's profile Send private message 
gulk


Joined: 21 Apr 2008
Posts: 86

PostPosted: Sun 20 Dec 2009, 13:35    Post subject:  

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:
rox --RPC << EOF

by
Code:
rox2 --RPC << EOF


Et voilà!

Hopefully someone will find the resolution useful.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8711

PostPosted: Sun 20 Dec 2009, 15:57    Post subject:  

Oh good.

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

regards

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0538s ][ Queries: 11 (0.0047s) ][ GZIP on ]