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 Mon 22 Sep 2014, 04:21
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
less 4.58, Powerful CLI Text Viewer
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 3 of 3 Posts_count   Goto page: Previous 1, 2, 3
Author Message
tallboy


Joined: 21 Sep 2010
Posts: 444
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: 4238
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   65 Time(s)

less-viewing-exec.jpg

Inside-an-odt-file.jpg
 Description   
 Filesize   80.13 KB
 Viewed   60 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_website 
Display_posts:   Sort by:   
Page 3 of 3 Posts_count   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:  

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.0616s ][ Queries: 13 (0.0138s) ][ GZIP on ]