The time now is Mon 20 May 2013, 15:06
All times are UTC - 4 |
|
Page 1 of 2 [18 Posts] |
Goto page: 1, 2 Next |
| Author |
Message |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Mon 28 Sep 2009, 18:58 Post subject:
LocnRox (Enhanced with Vovchik) Subject description: Locate files fast and open Rox |
|
There is an outstanding program for simple searchs that aragon uploaded called Mlocate. Thanks aragon and vovchik.
This is a very nice, compact program which produces a small indexed database of all files on your system and is lightning fast. You just enter a search term and bang! it shows all the hits.
For me, the drawback is that I don't necessarily just want to know what files are there and where they are - I'd also like to take some further action on the files found.
To that end, I've created LocnRox.
LocnRox is a Gtkdialog interface that quickly -
1) Pops up a highlighted search box.
2) You key in the search term and hit enter.
The bottom part of the dialog then instantly shows all the found files.
Double-click on any found file and Rox will open in that directory. Now, you can DO SOMETHING with your "found" files - copy,move,delete,symlink,run,edit.. whatever.
The LocnRox pet contains the Mlocate program (Locate), the file "00-update-mlocatedb" in the /Startup directory which runs the updatedb command at boot, so that the index is always up to date.
LocnRox is under Menu > Filesystem and after you install the pet, be sure to press the "update database" button before using the first time (after that it will update at every boot, or you can update anytime that you've added additional drives or files during a session..
Restart JWM, and it should be in the menu system.
(What would really be great is to have this integrated into the Pfind program, for even greater capabilities......)
 |
| Description |
locnrox - locate files and open Rox
|

Download |
| Filename |
locnrox.pet |
| Filesize |
74.3 KB |
| Downloaded |
292 Time(s) |
Last edited by seaside on Sat 03 Oct 2009, 10:50; edited 1 time in total
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Tue 29 Sep 2009, 15:17 Post subject:
|
|
Dear seaside,
I like your file find utility very much. I think I made it a little prettier, added slocate to the mix, a help screen and little C file I wrote some time back to show an animated gif while slocate is doing its work. Please have a look and tell me what you think. It should be unpacked into /usr/local. It could start with a little bash script that does a cd to the pfilefind dir and then launches the real prog.
I have added two screenshots.
With kind regards,
vovchik
| Description |
|

Download |
| Filename |
Pfilefind.tar.gz |
| Filesize |
47.21 KB |
| Downloaded |
248 Time(s) |
| Description |
|
| Filesize |
74.4 KB |
| Viewed |
879 Time(s) |

|
| Description |
|
| Filesize |
48.79 KB |
| Viewed |
870 Time(s) |

|
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Wed 30 Sep 2009, 18:52 Post subject:
|
|
vovchik,
Thanks very much.
That looks much better with help and an update of the database buttons.
I will download it and take a look.
Regards,
s
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Thu 01 Oct 2009, 11:57 Post subject:
|
|
vovchik,
Very nicely done and some additional changes are needed to make it work -
**setup**
Add command "addgroup slocate"
Create directory "/var/lib/slocate"
Add file "/etc/updatedb.conf" (default config file)
Change --
| Code: |
function findfiles()
# ------------------------
{
slocate "$ENTRY" | sort > /tmp/locatefoundfiles
}
|
Since "slocate" is not in the path, it needs a "./bin/slocate"
The "waiting" and pacing cat is great, but shouldn't it be a Puppy?
Isn't Gtkdialog great for tool making?
Cheers,
s
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Thu 01 Oct 2009, 13:22 Post subject:
|
|
Dear seaside,
Do you want to make the changes or shall I? I have been using slocate forever, so I didn't remember the installation steps. And it was in my path, so I got no errors. Oops! Sorry about that.
As for the puppy gif, how about some of the ones below?
With kind regards,
vovchik
PS. If you make the changes, you could post a new pet. I have never created one.
| Description |
|
| Filesize |
40.21 KB |
| Viewed |
826 Time(s) |

|
| Description |
|
| Filesize |
23.57 KB |
| Viewed |
819 Time(s) |

|
| Description |
|
| Filesize |
19.96 KB |
| Viewed |
822 Time(s) |

|
| Description |
|
| Filesize |
11.23 KB |
| Viewed |
804 Time(s) |

|
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Fri 02 Oct 2009, 15:16 Post subject:
|
|
vovchik,
My inclination is to favor Mlocate as it seems to have more speed and efficiency over Slocate see -
http://carolina.mff.cuni.cz/~trmac/blog/mlocate/
Those attached Puppies are all so good, it's very hard to pick one. Although my wife likes the last one the best.
I could repackage the LocnRox pet with Mlocate and your enhancements or you could make a pet with Slocate -
Making a pet is really the same as a Tar.
Open terminal at level of DIRNAME
dir2pet DIRNAME - mostly hit enter for a couple of questions and it makes a pet.
Regards,
s
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Fri 02 Oct 2009, 16:19 Post subject:
|
|
Dear seaside,
You might be right about mlocate being faster - although it has been a long time since I compared and I now have a 1.5 TB disk with 12 partitions and had 100 GB before, so circumstances have changed. Why don't you go ahead and package the mlocate version? Just for your info, I also like the last pup in that gif series. Incidentally, the reason I wrote that little gif launcher is that gtkdialog is notoriously hard to kill and may lead to undesirable consequences if another gtkdialog prog is loaded. It's a cheap kluge but works as expected. Otherwise, gtkdialog, via gdk-pixbuf, displays animated gifs nicely (but you probably know that):
| Code: | #! /bin/bash
mypic=$1
echo $mypic
mypic1=`basename $mypic`
export wait_splash='
<window title="Showing: '$mypic1'" icon-name="gtk-refresh">
<vbox>
<frame>
<pixmap><input file>'$mypic'</input></pixmap>
<text use-markup="true"><label>"<b>Please be patient...</b>"</label></text>
</frame>
</vbox></window>
'
gtkdialog3 --program=wait_splash --center
|
I am eager to see your finished pet. I will try to do an slocate one too.
With kind regards,
vovchik
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Sat 03 Oct 2009, 11:05 Post subject:
|
|
| vovchik wrote: | Dear seaside,
You might be right about mlocate being faster - although it has been a long time since I compared and I now have a 1.5 TB disk with 12 partitions and had 100 GB before, so circumstances have changed. Why don't you go ahead and package the mlocate version? Just for your info, I also like the last pup in that gif series. Incidentally, the reason I wrote that little gif launcher is that gtkdialog is notoriously hard to kill and may lead to undesirable consequences if another gtkdialog prog is loaded. It's a cheap kluge but works as expected. Otherwise, gtkdialog, via gdk-pixbuf, displays animated gifs nicely (but you probably know that):
|
Vovchik,
I have updated LocnRox with your enhancements at the first post.
Yes, gtkdialog sometimes needs alot of "sweeping up" after. That's a handy program you made to visually pass some time - (on my system the dog only takes a half wag and it's done)
I did not know about running animated gifs (but then again, there is no end to things that I don't know)
Regards,
s
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Sat 03 Oct 2009, 15:05 Post subject:
|
|
Dear seaside,
Very nice. I do need the screen gif because mlocate indexing on my machine took a good 7 minutes. It produced a file of 23 mb, whereas the slocate db is 13 mb. Incidentally, mlocate does not recognize wildcards in the way that slocate does (e.g. /icons*glass*png), so there are plusses and minuses with each of them.
With kind regards,
vovchik
|
|
Back to top
|
|
 |
Keef

Joined: 20 Dec 2007 Posts: 428 Location: Staffordshire
|
Posted: Sat 03 Oct 2009, 15:30 Post subject:
|
|
Evening All,
Tried this in 214X14.1, but nothing appears. Below is what is running according to htop, the first using 100% CPU:
| Code: |
gtkdialog -i /usr/local/LocnRox/locnrox
/usr/sbin/gtkdialog3 -e /usr/local/LocnRox/locnrox
/bin/sh /usr/local/LocnRox/locnrox
sh -c source /usr/local/LocnRox/locnrox; gtkdialog -i /usr/local/LocnRox/locnrox
|
If I try running it from a terminal, I get:
| Code: |
# locnrox
Tinylogin v1.4 (2005.08.02-19:41+0000) multi-call binary
Usage: addgroup [OPTIONS] <group_name>
|
... which seems a little strange.
In htop, only the gtkdialog line is showing, but again running at 100%
|
|
Back to top
|
|
 |
Bert

Joined: 30 Jun 2006 Posts: 699
|
Posted: Sat 03 Oct 2009, 15:37 Post subject:
|
|
| seaside wrote: | vovchik,
Those attached Puppies are all so good, it's very hard to pick one. Although my wife likes the last one the best.
s |
So do I!
Looks a bit like my sister when she was younger
Dog 1 is not receiving enough nourishment
Dog 2 looks like my brother-in-law when he gets nervous
Dog 3 needs a special-care kennel
_________________

|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Sat 03 Oct 2009, 16:04 Post subject:
|
|
| Keef wrote: |
If I try running it from a terminal, I get:
| Code: |
# locnrox
Tinylogin v1.4 (2005.08.02-19:41+0000) multi-call binary
Usage: addgroup [OPTIONS] <group_name>
|
... which seems a little strange.
In htop, only the gtkdialog line is showing, but again running at 100% |
Hi Keef,
Let's try typing in a terminal in the locnrox directory - "addgroup mlocate" and then "./locnrox" and see what happens.
Perhaps there is a problem with that puppy version as this was tested and made on 4.12.
Did you by any chance try the first LocnRox version with success?
Good luck,
s
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Sat 03 Oct 2009, 16:14 Post subject:
|
|
| vovchik wrote: | Dear seaside,
Very nice. I do need the screen gif because mlocate indexing on my machine took a good 7 minutes. It produced a file of 23 mb,
vovchik |
Vovchik,
Now, I just have to ask you?
Are you going to believe your own eyes and experience, or the author of Mlocate's website showing his benchmarks demonstrating a clear superiority over Slocate
Regards,
s
(hmmmm, maybe we do need a slocate version... or you'll just have to cut out your huge drive .)
Note: if I recall correctly the first run of Mlocate is the worst, but further runs are faster -maybe?
Last edited by seaside on Sat 03 Oct 2009, 16:28; edited 1 time in total
|
|
Back to top
|
|
 |
Keef

Joined: 20 Dec 2007 Posts: 428 Location: Staffordshire
|
Posted: Sat 03 Oct 2009, 16:21 Post subject:
|
|
Seaside,
Just tried your suggestion, but no change - exactly same result as before (get the Tinylogin output again after running "addgroup mlocate")
I've only tried the most current version.
I'll try it on some other pups just for comparison (3.01, 301X and slaxer)
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Sat 03 Oct 2009, 16:38 Post subject:
|
|
Keef,
Here's the first version pet.
See if that works
| Description |
LocnRox - first version
|

Download |
| Filename |
LocnRoxOLD.pet |
| Filesize |
31.15 KB |
| Downloaded |
258 Time(s) |
|
|
Back to top
|
|
 |
|
|
Page 1 of 2 [18 Posts] |
Goto page: 1, 2 Next |
|
|
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
|