Author |
Message |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Fri 22 Mar 2013, 15:48 Post subject:
Psearch - Puppy web search utility |
|
Here's Psearch my first proper Puppy program so go easy on me!
This utility takes your search terms prepends them with 'puppy linux' takes note of your choice of search target then launches Firefox (or a new tab if it's already open) with a ready made Google search.
The archive includes the executable (psearch) which has been packed with UPX - it's around 46K in size - and the BaCon source code.
If you use a different browser or search engine it should be easy to modify a couple of lines in the source and recompile to suit you needs.
The program doesn't have any other requirements so should run on any recent version of Puppy (I think/hope!).
Thanks to Mobeus and L18L here on the forum for their help
Paul
Description |
|
Filesize |
14.38 KB |
Viewed |
523 Time(s) |

|
Description |
|

Download |
Filename |
psearch.tar.gz |
Filesize |
41.04 KB |
Downloaded |
324 Time(s) |
|
Back to top
|
|
 |
nilsonmorales

Joined: 15 Apr 2011 Posts: 938 Location: El Salvador
|
Posted: Sat 23 Mar 2013, 00:55 Post subject:
|
|
!Awesome. Have locales?
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Sat 23 Mar 2013, 04:14 Post subject:
|
|
Sorry I don't know how to do that yet, I'll read up on it on Barry's BaCon guide.
Paul
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Sun 24 Mar 2013, 15:31 Post subject:
|
|
Here's an updated version (only 19K now ) which offers a choice of search engines.
If anyone would like to suggest a search engine or site to add feel free to shout.
Localisation is on the way... thanks again to L18L for pointing me in the right direction.
Paul
Description |
|
Filesize |
16.29 KB |
Viewed |
475 Time(s) |

|
Description |
|

Download |
Filename |
psearch1.03.tar.gz |
Filesize |
17.92 KB |
Downloaded |
319 Time(s) |
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Mon 25 Mar 2013, 02:24 Post subject:
|
|
I downloaded this utility into Puppy Lucid 5.20.
I also have BaCon installed.
But when I tried to run this program from a terminal, I got a file not found in /usr/lib/hug.so not being found.
Maybe my BaCon install is not current enough.
I did not try to use the source you had posted in another thread.
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 25 Mar 2013, 04:13 Post subject:
|
|
Dear PaulR,
Thanks for the utility. I tried the first version and it works fine. Version 1.03 complains about not finding /usr/lib/hug/so. To avoid compatibility problems of the type 8-bit and I are experiencing, I always just use hug and my compile line:
Code: | bacon -o -s -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections mybconfile |
and then UPX the binary. This gives me GTK binaries of about 19k, without the hug.so dependency. That means the binary will run on nearly all recent systems. Please post the source...so that I can recompile.
With kind regards,
vovchik
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Mon 25 Mar 2013, 04:44 Post subject:
|
|
Sorry about that, I'd been using :
Code: |
INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT
|
for speed of compilation when testing and forgot to switch it back to:
Code: |
INCLUDE "/usr/share/BaCon/hug.bac"
|
...which also explains the reduction in size
Here's the re-compiled program, source to follow
Paul
Description |
|

Download |
Filename |
psearch1-03.tar.gz |
Filesize |
39.38 KB |
Downloaded |
307 Time(s) |
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Mon 25 Mar 2013, 16:31 Post subject:
|
|
Source attached. L18L is reporting some font issues but it looks ok on my system... not sure what I've done to mess it up?
Description |
|

Download |
Filename |
psearch1-03-source.tar.gz |
Filesize |
1.76 KB |
Downloaded |
304 Time(s) |
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 25 Mar 2013, 17:52 Post subject:
|
|
Dear PaulR,
Thanks. I compiled in Lucid and it works fine and IS USEFUL. Just used hug.bac and got rid of the USEC/END USEC stuff. Not needed. You could just use 0.0 at the end of SETPROPERTY or DECLARE that ALIGNLEFT var as a FLOATING or CONST.
With kind regards,
vovchik
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 26 Mar 2013, 06:27 Post subject:
Psearch - Puppy web search utility Subject description: font |
|
PaulR wrote: | Source attached. L18L is reporting some font issues but it looks ok on my system... not sure what I've done to mess it up?  |
BarryK on http://bkhome.org/bacon/hug/layout.htm wrote: | REM fix window font layout regardless of dpi...
REM 78 is the Xft.dpi in /root/.Xresources when I designed the layout...
HUGOPTIONS("BASEXFTDPI 78") |
Code: | HUGOPTIONS("BASEXFTDPI 66") | has fixed it
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Tue 26 Mar 2013, 12:45 Post subject:
|
|
OK, if I understand correctly I need to put
Code: |
HUGOPTIONS("BASEXFTDPI 78")
|
in the source as my system has "Xft.dpi: 78" in /root/.Xresources. If someone else has a different dpi setting or screen size (resolution?) the window will then automatically scale on their system to maintain the correct appearance (or they could re-compile and manually change the value as you have done).
That right?
Paul
Last edited by PaulR on Tue 26 Mar 2013, 16:27; edited 1 time in total
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 26 Mar 2013, 15:06 Post subject:
Subject description: font |
|
Quote: | (or they could re-compile and manually change the value as you have done). | Of course, not
Now I don't understand anything anymore.
My
Xft.dpi: 96
the default, see also http://bkhome.org/blog2/?viewDetailed=00190
I have inserted
HUGOPTIONS("BASEXFTDPI 66")
and compiled.
See the result, your original and mine
Description |
|
Filesize |
59.94 KB |
Viewed |
380 Time(s) |

|
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Tue 26 Mar 2013, 16:41 Post subject:
|
|
My Slacko 5.5 has 78 DPI as the setting.
I've recompiled with:
Code: |
HUGOPTIONS("BASEXFTDPI 78")
|
The executable is attached, does that look right on your system L18L now that I've explicitly set the DPI?
Paul
Description |
|

Download |
Filename |
psearch1-03-testdpi.tar.gz |
Filesize |
39.59 KB |
Downloaded |
336 Time(s) |
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Tue 26 Mar 2013, 17:58 Post subject:
|
|
PaulR.
Here's the recompile on precise 5.4.3 at Xft.dpi: 96.
I remember this being a problem when bacon was first introduced, and I'm hoping vovchik knows the fix.
Cheers,
s
Description |
Recompile at 78dpi |
Filesize |
17.33 KB |
Viewed |
375 Time(s) |

|
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Tue 26 Mar 2013, 18:18 Post subject:
|
|
Thanks for that seaside - what if you run the executable in my last post without recompiling?
Paul
|
Back to top
|
|
 |
|