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 06 Mar 2015, 10:16
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
less 470, Powerful CLI Text Viewer
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Author Message
tallboy


Joined: 21 Sep 2010
Posts: 457
Location: Oslo, Norway

PostPosted: Fri 24 Jan 2014, 00:07    Post subject:  

Late (from me) but good: Thank you Keef! Very Happy
There was an interesting comment in response to the link you posted on libtinfo:
Quote:
Alice Chapman Says:
December 24th, 2009 at 5:11 pm

The lack of libtinfo.so is not so much a specific Ubuntu oddity, some other distributions don’t provide it either. The default behaviour when building NCurses is not to produce a separate libtinfo.so. It is only done when adding the –with-termlib switch to the NCurses configure script when building NCurses.

I do agree that linking libtinfo.so explicitly is broken behaviour, as it will not exist with a default shared library build of NCurses.

The same issue can arise with libtic.so, which can also be built as a separate library from libncurses.so by use of the –with-ticlib switch.


musher0, it may be something to remember if ncurses is used in later versions of puppy, a recompile will solve the problem(s). I have run into the problem before, but I cannot recall which program that refused to open.

Keef wrote:
This is the important bit:
Code:
cd /usr/lib
ln -s libncurses.so.5 libtinfo.so.5
ln -s libtinfo.so.5 libtinfo.so

When browsing my /lib and /usr/lib in my LupuPlus 5.2.8_005-1., I discovered something very odd.

In my /lib:
libncurses.so.5 -> libncurses.so.5.7

In my /usr/lib:
libncurses.so -> /lib/libncurses.so.5
libncurses.so.5 -> libtermcap.so What the h...??
and then
libtermcap.so -> libncurses.so More what the h...??
So I made symlinks in /lib and /usr/lib:
Code:
cd /lib
ln -s libncurses.so.5.7 libtinfo.so.5
cd /usr/lib
ln -s /lib/libncurses.so.5.7 libtinfo.so.5

It works! Now I have to find out what the mysterious libtermcap.so link is intended for! I have installed lynx, xpdf and pdftk, and I suspect one of them needed that link.

Finally my old $LESS:
Code:
export LESS='-Ij20Wsz-5M'

You have to check out the option list for that one! Very Happy

EDIT: If you install the companion .pet, right-clicking on a bin-file let you choose view-with-less.sh, which open the text in a urxvt window. The problem is that you get the question: This file seem to be a bin file, open anyway? If yes, lots of unreadable code! If you open a terminal instead and write less /bin/somefile, it open as a normal readable file would do. Something is wrong here, musher0.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Fri 24 Jan 2014, 13:23    Post subject:  

Hello, Tallboy.

I don't have the problem you mention viewing executables. For ex. I have attached a
picture of less "viewing" the wmx executable, with a search for the word "menu".

When less loaded it, there was a line at top saying "==append to filename" and some
other words, and then less picked up the ASCII characters (but not the machine code)
in the file and displayed them. I don't think there is anything wrong. I use that feature
sometimes to see if there are some undocumented commands in an executable.

The only other executable "viewer" I know in Linux is joe ("joe's own editor"), which has
a hex mode. (But I don't have lots of experience with hex editors.)

There is also a hook for less to see "odt" files, and there you will see "garbage" mixed in
with other information, such as word count or paragraph count. Yeah it's not pretty to
look at, but it does not bite ! Smile

Again, I find this helpful when I want to refresh my memory about word count and such.
Using less is instantaneous, no need to wait for OpenOffice to load. You type "/" and the
word "count", and you soon know !

As to the extra libraries, I had similar surprises as you had, but I'll have to back-track
what I did. Keef's short message was extremely helpful in this.

If I remember correctly, I cleaned up the libs. I believe I had ncurses-blabla-
so-version in /lib and /usr/lib, which is unnecessary. Only one copy is necessary, of
course.

BFN

musher0
less-viewing-exec.jpg
 Description   
 Filesize   56.86 KB
 Viewed   247 Time(s)

less-viewing-exec.jpg

Inside-an-odt-file.jpg
 Description   
 Filesize   80.13 KB
 Viewed   243 Time(s)

Inside-an-odt-file.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: 4852
Location: Gatineau (Qc), Canada

PostPosted: Wed 17 Dec 2014, 08:52    Post subject:  

Hi, Puppyists.

I believe this could be another interesting tool in the less toolbox:
http://murga-linux.com/puppy/viewtopic.php?p=815375&sort=lastpost#815375
It's for viewing pdf files in plain text format. It uses pdftotext and less. Might be useful
for taking a quick glance at what a pdf is about. I find it a little faster than epdfview, if
I may say so.

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 
musher0


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

PostPosted: Wed 17 Dec 2014, 21:08    Post subject:  

The new less-470 has been out for a few months now, so here you go! Smile Enjoy! Smile
less-470.pet
Description  Should be a drop-in replacement for any of the earlier versions above. The "view-with-less"
script works fine with it, at least on this Slacko-6.0b Puppy.
pet

 Download 
Filename  less-470.pet 
Filesize  106.09 KB 
Downloaded  60 Time(s) 

_________________
"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: 4852
Location: Gatineau (Qc), Canada

PostPosted: Sat 17 Jan 2015, 18:29    Post subject:  

Hello, people!

I've uploaded a new less script to follow errors while developing scripts or configuring at:
http://murga-linux.com/puppy/viewtopic.php?p=821855&sort=lastpost#821855

Enjoy!

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 
tallboy


Joined: 21 Sep 2010
Posts: 457
Location: Oslo, Norway

PostPosted: Mon 26 Jan 2015, 00:17    Post subject:  

Thank you, musher0!
Less 470 works!

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 270

PostPosted: Mon 26 Jan 2015, 13:50    Post subject:  

I'm on Fatdog64 most of the time, so I can't use your pets, but - as a long-time less fan - I still want to thank you for your less posts!
_________________
FatDog64 631|Blue Pup 4|DebianDog+OpenMediaVault stick
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Mon 26 Jan 2015, 23:51    Post subject:  

step wrote:
I'm on Fatdog64 most of the time, so I can't use your pets, but - as a long-time less fan - I still want to thank you for your less posts!


Hi, step.

Can't you? Have you tried? Sixty-four-bit machines are advertised as being able to
run 32-bit programs without a sweat, are they not ? Shocked

And thanks for the thanks, of course! My pleasure! Smile

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Last edited by musher0 on Thu 29 Jan 2015, 02:12; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
step

Joined: 04 May 2012
Posts: 270

PostPosted: Wed 28 Jan 2015, 18:42    Post subject:  

musher0 wrote:
step wrote:
I'm on Fatdog64 most of the time, so I can't use your pets, but - as a long-time less fan - I still want to thank you for your less posts!


Hi, step.

Can't you? Have you tried? Sixty-four--bit machines are advertised as being able to
run 32-bit programs without a sweat, are they not ? Shocked

And thanks for the thanks, of course! My pleasure! Smile

BFN.

musher0
No I haven't tried yours. Fatdog64 already includes less, albeit an older version. The thing is that I've been nailed on Windows for a few days, and will continue to be so for awhile. I don't get enough play time on my fav linux desktop. Sad
_________________
FatDog64 631|Blue Pup 4|DebianDog+OpenMediaVault stick
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Mon 09 Feb 2015, 04:47    Post subject:
Subject description: Cool less tricks
 

Hi, folks.

Sorry for not referring to the paragraph directly, but the page has no subdivision or
"tag", in html parlance, to refer to.

It's from the less FAQ at http://www.greenwoodsoftware.com/less/faq.html#tricks
Quote:
Cool less tricks

New users of less sometimes find that less doesn't behave exactly the way they
expect. If this is the case, don't despair. Less has an enormous number of options
(perhaps too many) which let you change the way it behaves. Chances are, there is a
way to make less do what you want. A complete description of all these features is in
the less man page, but here's a summary of some of the more popular ones.

Quit at end-of-file
To make less automatically quit as soon as it reaches the end of the file (so you don't
have to hit "q"), set the -E option.

Verbose prompt
To see a more verbose prompt, set the -m or -M option. You can also design your own
prompt; see the man page for details.

Clear the whole screen
To make less clear and repaint the screen rather than scrolling when you move to a
new page of text, set the -C option.

Case-less searches
To treat upper-case and lower-case letters the same in searches, set the -I option.

Start at a specific place in the file
To start at a specific line number, say line 150, use "less +150 filename". To start
where a specific pattern first appears, use "less +/pattern filename". To start at the
end of the file, use "less +G filename".

Scan all instances of a pattern in a set of files
To search multiple files, use "/*pattern" instead of just "/pattern". To do this from the
command line, use "less '+/*pattern' ...". Note that you may need to quote the "+/
*pattern" argument to prevent your shell from interpreting the "*".

Watch a growing file
Use the F command to go to the end of the file and keep displaying more text as the
file grows. You can do this from the command line by using "less +F ...".

Change keys
The lesskey program lets you change the meaning of any key or sequence of keys. See
the lesskey man page for details.

Save your favorite options
If you want certain options to be in effect whenever you run less, without needing to
type them in every time, just set your "LESS" environment variable to the options you
want. (If you don't know how to set an environment variable, consult the
documentation for your system or your shell.) For example, if your LESS environment
variable is set to "-IE", every time you run less it will do case-less searches and quit at
end-of-file.

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 
Display posts from previous:   Sort by:   
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.0951s ][ Queries: 12 (0.0149s) ][ GZIP on ]