The officially official Devuan Forum!

You are not logged in.

#1 2024-01-13 05:08:19

rmrichesjr
Member
Registered: 2018-12-18
Posts: 33  

'more' in daedalus clearing the screen when it should not

In daedalus, with util-linux 2.38.1, /bin/more with no options initially clears the screen before starting to print text.  Based on over 40 years of using 'more', that is incorrect behavior--unless the -p or -c options had been supplied.  If the binary is called as 'page' or if the -p option is supplied, it's supposed to clear the screen.  In comparison, in chimaera, with util-linux 2.36.1, /bin/more with no options behaves correctly and does not initially clear the screen.  A web search did not reveal any discussion of how to work around this broken behavior.

Is there an (undocumented) option to nix the initial clearing of the screen?

As a side note, there's also a bug introduced probably over a decade ago now where 'more' quit showing one overlapping line of text.  If the binary is called as 'page', it's supposed to initially clear the screen and show zero overlap.  If the binary is called as 'more' with no options, it is supposed to _NOT_ initially clear the screen and is supposed to show one line of overlap as it scrolls.

Offline

#2 2024-01-13 06:08:01

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: 'more' in daedalus clearing the screen when it should not

Check if your environment has set the $MORE environment variable. That could be one source of implicit options. Also check if your bash profile has aliased 'more' to 'more' plus some additional options.

.bashrc, .bash_profile, would be places to look for this. Remove the options or set your own preferences there.

Offline

#3 2024-01-13 22:19:50

rmrichesjr
Member
Registered: 2018-12-18
Posts: 33  

Re: 'more' in daedalus clearing the screen when it should not

Thanks for the suggestions.  Environment variable $MORE is not set, and there is no alias set.  If I do "date | /bin/more" (without the quotation marks), it clears the screen, prints one line of text at the top, and prints reverse-video "(END)" at the bottom.  "dpkg -S /bin/more" says it comes from util-linux.  "/bin/more --version" says, "more from util-linux 2.38.1".

Does 'more' have an antidote option to negate -p (and/or -c) in case that has (perhaps unintentionally) been made the default?  No syntax for negating an option shows up in the man page or via "--help".

Offline

#4 2024-01-17 05:07:25

dave
Member
Registered: 2020-09-28
Posts: 13  

Re: 'more' in daedalus clearing the screen when it should not

Upgraded from chimaera to daedalus and found several 'improvements' throwing a screw into the works.  Among them 'more' which, on the command line,  started giving me continuous blank lines at the tail which required a Ctrl-C to get out of. :-(

It was using util-linux 2.36.1 before the upgrade and found that daedalus was using util-linux 2.38.1.

My resolution:  Downgrade back to the binary from the old release.  It (seems to be) a drop-in replacement.

There are a couple other 'improvements' that I'm still trying to get my head around: e.g. the new ntpdate utility which seems to have been deprecated and replaced with a wrapper script around ntpdig.  But the output format differs...

And 'scp' which now needs an '-O' option to return to the "old" behavior which my other systems still need.

Sigh.

Offline

#5 2024-01-17 08:38:40

mirrortokyo
Member
Registered: 2021-04-08
Posts: 54  

Re: 'more' in daedalus clearing the screen when it should not

Using more from util-linux 2.39.3 and it doesn't clear the screen when one presses q to quit.

However man 2.12.0 does clear the screen after looking up a command - if I hit the h key for help it shows a page headed SUMMARY OF LESS COMMANDS suggesting that less is being used (version 590-2 of less is installed) - it turns out that the man-db package which includes /usr/bin/man suggests less. Removing less from installed packages stops the man command from clearing the screen when quitting.

Last edited by mirrortokyo (2024-01-17 08:54:47)

Offline

#6 2024-01-17 10:33:55

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: 'more' in daedalus clearing the screen when it should not

Set the environment variable LESS=X to force 'less' to stop clearing the screen upon exit.

Offline

#7 2024-01-17 23:57:50

stultumanto
Member
Registered: 2023-12-12
Posts: 68  

Re: 'more' in daedalus clearing the screen when it should not

However man 2.12.0 does clear the screen after looking up a command - if I hit the h key for help it shows a page headed SUMMARY OF LESS COMMANDS suggesting that less is being used (version 590-2 of less is installed) - it turns out that the man-db package which includes /usr/bin/man suggests less. Removing less from installed packages stops the man command from clearing the screen when quitting.

This behavior is due to the Debian alternatives system. When both `less` and `more` are available, man will default to using less as its pager, because it has a higher priority. If you remove less, the system will fall back to more. You can see information about pagers installed on your system with `update-alternatives --display pager`.

Set the environment variable LESS=X to force 'less' to stop clearing the screen upon exit.

Unfortunately the LESS environment variable only applies to the less program, not more. more is extremely primitive, even the manpage mentions it, and steers uses toward less. dave doesn't explain why he wants to use more specifically, but I always assume people have their reasons in such situations.

I tried to replicate dave's issue on 2.39.3, and while more didn't clear the screen without the -c or -p option, I noticed a different issue. When I printed from redirected output (i.e., not from a regular file) the -c or -p option would not clear the screen. Everything worked as expected on 2.33.1, so I think it's another bug. It seems util-linux is all over the place lately.

Offline

Board footer