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 Tue 30 Sep 2014, 20:46
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Is there another way to set wallpaper for the Rox desktop?
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 7 [104 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Author Message
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Wed 21 Aug 2013, 15:52    Post subject:  

Quote:
I once did a patch to rox to use the same xdg used in glib, but couldnt find it, so I went back to the glib source to see how hard it would be to use it for implementing .desktop and mime. Unfortunately it just reminded me of all the bad crap... Functions that return a constant value or the return of another function or a property of a struct (all of which could be macros to speed up and reduce the shared lib size) as well as all of the hardcoding of gnome apps (for example using "gnome-terminal" instead of getenv("COLORTERM") or TERM then falling back to guesses (at least they do look for others if gnome-term isnt found)... Makes me want to just fork the xcb fork of gtk+-2.6 and backport the useful features like gtkbuilder and statusicon perhaps make it use linuxfb (not directfb) if DISPLAY is not set (maybe backport wayland too? In that case WAYLAND_DISPLAY)

IMHO it's high time someone took the good ideas from gtk+ and got rid of the cruft, so there's a usable toolkit that doesn't break abi every few years and suck all your resources. I was rooting for fltk a few years back but it seems pretty stagnant. Plus I just really like the look and feel of gtk+ even if there's a lot of problems.

I imagine you could answer this better than I, but just how much work would be required make a toolkit like gtk+ support linuxfb? My guess is quite a lot. It's good food for thought anyway, but I'd rather see dreams become reality.

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: Wed 21 Aug 2013, 16:09    Post subject:  

I put set_background script in my rightclick menu utility. This allows
quick setting of a jpg png or svg image as background.
It works nicely in recent puppies.

http://murga-linux.com/puppy/viewtopic.php?p=720872#720872
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: Wed 21 Aug 2013, 22:15    Post subject:  

@nathan - linuxfb was supported up to gtk+-2.12, the best idea in gtk was to open source it. Honestly I'd like to check with the netsurf guys about pulling the netsurf framebuffer toolkit out of netsurf (GPL) and merging it into nsfb (MIT licensed) which supports many backends including linuxfb, xcb and wayland.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Thu 22 Aug 2013, 00:35    Post subject:  

Hello.

argolance - of ToOpPy fame - made fun of my script... Why go to the trouble when a very simple trick already exists, he reminded me:

* First, open your backgrounds folder.
* Then, right-click on any icon;
* click the second entry from the bottom of the menu that just appeared;
* a panel shows up;
* choose the background style on the line towards the top;
* drag the desired picture to the rectangle in the panel.

Done!

Regards.

musher0
Forgotten_Trick.jpg
 Description   
 Filesize   47.45 KB
 Viewed   290 Time(s)

Forgotten_Trick.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Fri 23 Aug 2013, 00:33    Post subject:  

Hello, all.

Here is another trick, related to http://murga-linux.com/puppy/viewtopic.php?p=719803&sort=lastpost#719803
posted on p. 4 of this thread, but this time in gcview. I believe the pic at http://murga-linux.com/puppy/viewtopic.php?t=88114&sort=lastpost needs no further explanation.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
recobayu


Joined: 15 Sep 2010
Posts: 112
Location: indonesia

PostPosted: Wed 28 Aug 2013, 12:35    Post subject:  

hi all, i want to asking a question. when i use nathan wallpaper setter, i can see my current background in /root/.config/wallpaper/bg_img. but now, i use precise 571 and there is a new pwallpaper setter v1.2. i'm confusing, where is the location of my background's file (because, after choosing a picture and apply that, the file bg_img disappear). anyone know where is the file bg_img or something comfiguration like that?
fyi, i want to change the background in a session by gtkdialog and then when i close that gtkdialog, it's come back to the background before.
thanks.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: Wed 28 Aug 2013, 15:18    Post subject:  

Hi recobayu; Nathan`s very nice Wallpaper app. has been taken out of a lot of the Puppy versions.
pwallpaper is pretty sad isn`t it?

It sounds like you may need to write your own wallpaper setter to do what you want.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Wed 28 Aug 2013, 20:57    Post subject:  

sunburnt wrote:
Hi recobayu; Nathan`s very nice Wallpaper app. has been taken out of a lot of the Puppy versions.
pwallpaper is pretty sad isn`t it?

It sounds like you may need to write your own wallpaper setter to do what you want.


Well, for the time being, Nathan's wallpaper version 0.6.3 is still available here:
http://distro.ibiblio.org/puppylinux/pet_packages-slacko14/wallpaper-0.6.3.pet
and here:
http://ftp.nluug.nl/os/Linux/distr/puppylinux/pet_packages-slacko14/wallpaper-0.6.3.pet

Works fine on my wary 5.5, too.

BFN.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
recobayu


Joined: 15 Sep 2010
Posts: 112
Location: indonesia

PostPosted: Sat 31 Aug 2013, 14:59    Post subject:  

I found it!
Code:
cat /root/Choices/ROX-Filer/PuppyPin | grep backdrop | cut -d '>' -f2 | cut -d '<' -f1

and we get our current wallpaper background. Ok, thanks. Very Happy
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: Sun 01 Sep 2013, 01:17    Post subject:  

Or...
Code:
grep backdrop /root/Choices/ROX-Filer/PuppyPin | sed 's#\</.*$##;s#^.*\>##'

The sed command has 2 parts, and it`s best to do the last part of the string first.
Also grep can read a file by itself, so the cat command is unneeded and wastes cpu cycles.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2507
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Mon 02 Sep 2013, 10:00    Post subject: faster
Subject description: but false
 

sunburnt wrote:
Or...
Code:
grep backdrop /root/Choices/ROX-Filer/PuppyPin | sed 's#\</.*$##;s#^.*\>##'
Really Rolling Eyes

It is faster (only 0.024 seconds instead of 0.046 seconds on my computer)...
... but it is false Wink
Back to top
View user's profile Send private message 
some1

Joined: 17 Jan 2013
Posts: 25

PostPosted: Mon 02 Sep 2013, 10:15    Post subject:  

Hi
I copy,pasted the snippets into a terminal.
The sed-code does not work as expected -
so sunburnt may want to explain,correct...
I do not know much about sed-but generally
act on the rox-files using awk.
But for now - whats wrong in the screenshot/the sed-code?


Cheers
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 02 Sep 2013, 10:46    Post subject:  

Gnu and Linux are a worse piece of shit, worse than MicrobesWeak ..

Probably replace # by %

Rolling Eyes

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: Mon 02 Sep 2013, 11:53    Post subject:  

Really odd, I`ve used this code dozens of times, even the end only doesn`t work.
Code:
grep backdrop /root/Choices/ROX-Filer/PuppyPin |sed 's#\</.*$##'
  <backdrop style="Stretched">/mnt/sda3/docs/pics/EndlessBlue_1680.jpg</backdrop>

And I know this should work... Should take the last tag off the line.
Grep is pulling the line, but sed is doing absolutely nothing with it.!

### ODDLY; Escaping the <> is not being accepted by sed.
# This works:
Code:
grep backdrop /root/Choices/ROX-Filer/PuppyPin | sed 's#</.*$##;s#^.*>##'
Back to top
View user's profile Send private message 
some1

Joined: 17 Jan 2013
Posts: 25

PostPosted: Mon 02 Sep 2013, 13:09    Post subject:  

--meanwhile
parsing this:
# <backdrop style="Stretched">/usr/share/backgrounds/kandinsky_gugg_0910_24.jpg</backdrop>

Code:
awk -F[\>\<] '/backdrop/{print $3}' /root/Choices/ROX-Filer/PuppyPin

Fieldseparators -literal/escaped:<>
print field 3 -the pathtowallpaper

@L18L may want to time this simple awk-command
By comparative reasoning about the snippets,cpu-cycles?:
: cat,grep,cut,cut
grep,sed
awk
Count the bytecode - in this case awk will be smallest.


ASSUME that we want the contents of the third-last field
Code:
awk -F[\>\<] '/backdrop/{u=NF-2;print $u}' /root/Choices/ROX-Filer/PuppyPin


ASSUME we want BOTH the style and the pathtowallpaper
Code:
read -r style pic <<<$(awk -F[\>\<\"] '/backdrop/{printf "%s\n%s",$3,$5}' /root/Choices/ROX-Filer/PuppyPin)
echo "$style"
echo "$pic"

(Its probably faster/smaller bytecode to do something like ar=($(awk.......)),and echo the wanted array-elements in production-code - instead of calling read)
Note:style-output will be unquoted f.x Stretched
To grab the style WITH quotes try this awk-command:
Code:
awk -F[\>\<\=] '/backdrop/{printf "%s\n%s",$3,$4}' /root/Choices/ROX-Filer/PuppyPin


Note: Using \n in the printf formatting works like a sort of output-delimiter,
allowing us to extract path with spaces and other unwieldy stuff.

Awk can be used in various ways to maul,rewrite,calculate and move things around in the PuppyPin.
----
sorry guys -
life seems to pass me by while I try to post

but thanks for the attention to the sed-issue.

.@sunburnt:Thanks
grep backdrop /root/Choices/ROX-Filer/PuppyPin | sed 's#</.*$##;s#^.*>##'
WORKS at my place.

Cheers
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 of 7 [104 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.1018s ][ Queries: 12 (0.0093s) ][ GZIP on ]