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 Thu 24 Jul 2014, 13:57
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
LocnRox (Enhanced with Vovchik)
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Mon 28 Sep 2009, 18:58    Post_subject:  LocnRox (Enhanced with Vovchik)
Sub_title: 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......) Rolling Eyes
locnrox.pet
Description  locnrox - locate files and open Rox
pet

 Download 
Filename  locnrox.pet 
Filesize  74.3 KB 
Downloaded  459 Time(s) 

Edited_time_total
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
Pfilefind.tar.gz
Description 
gz

 Download 
Filename  Pfilefind.tar.gz 
Filesize  47.21 KB 
Downloaded  392 Time(s) 
pfilefind2.jpg
 Description   
 Filesize   74.4 KB
 Viewed   1145 Time(s)

pfilefind2.jpg

pfilefind1.jpg
 Description   
 Filesize   48.79 KB
 Viewed   1084 Time(s)

pfilefind1.jpg

Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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? Very Happy Very Happy

Isn't Gtkdialog great for tool making?

Cheers,
s
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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.
dog-rover-gait.gif
 Description   
 Filesize   40.21 KB
 Viewed   1036 Time(s)

dog-rover-gait.gif

dog-stir-crazy.gif
 Description   
 Filesize   23.57 KB
 Viewed   1028 Time(s)

dog-stir-crazy.gif

dog-butch.gif
 Description   
 Filesize   19.96 KB
 Viewed   1034 Time(s)

dog-butch.gif

dog-pup-tailwag.gif
 Description   
 Filesize   11.23 KB
 Viewed   1020 Time(s)

dog-pup-tailwag.gif

Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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. Very Happy

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
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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) Very Happy

I did not know about running animated gifs (but then again, there is no end to things that I don't know) Very Happy

Regards,
s
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
View user's profile Send_private_message 
Keef


Joined: 20 Dec 2007
Posts: 617
Location: Staffordshire

PostPosted: 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
View user's profile Send_private_message 
Bert


Joined: 30 Jun 2006
Posts: 915

PostPosted: 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. Very Happy
s

So do I!
Looks a bit like my sister when she was younger Smile

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
Laughing

_________________


Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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 Very Happy Very Happy

Regards,
s
(hmmmm, maybe we do need a slocate version... or you'll just have to cut out your huge drive Very Happy .)

Note: if I recall correctly the first run of Mlocate is the worst, but further runs are faster -maybe?

Edited_time_total
Back to top
View user's profile Send_private_message 
Keef


Joined: 20 Dec 2007
Posts: 617
Location: Staffordshire

PostPosted: 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
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Sat 03 Oct 2009, 16:38    Post_subject:  

Keef,

Here's the first version pet.

See if that works Very Happy
LocnRoxOLD.pet
Description  LocnRox - first version
pet

 Download 
Filename  LocnRoxOLD.pet 
Filesize  31.15 KB 
Downloaded  408 Time(s) 
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0945s ][ Queries: 13 (0.0058s) ][ GZIP on ]