Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a firewall running Slackware v10.0 and, recently, I noticed that there's something wrong with the less program. What follows is an example of execution:
Code:
zpalmer@dib:/usr/man$ less
Missing filename ("less --help" for help)
zpalmer@dib:/usr/man$ less --helpzpalmer@dib:/usr/man$ less /etc/resolv.confzpalmer@dib:/usr/man$ cat /etc/resolv.conf
nameserver 66.118.80.5
nameserver 69.43.32.27
zpalmer@dib:/usr/man$ man resolv.conf
Error executing formatting or display command.
System command (cd /usr/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man5/resolver.5.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -S -mandoc | /usr/bin/less -is) exited with status 256.
No manual entry for resolv.conf
(Next is the exact same command, minus the call to less.)zpalmer@dib:/usr/man$ (cd /usr/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man5/resolver.5.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -S -mandoc)a correct listing of the resolv.conf man pagezpalmer@dib:/usr/man$
To the best of my knowledge, "less" has never worked on this machine. I have a webserver, however, which is also running Slackware 10.0. I performed the install the same way. It has a working copy of less so, not knowing exactly what is going on, I copied the less binary from the web server to the firewall. I saw no change in behavior, so I assume that the problem isn't with the less binary itself but something on which it relies.
However, I have run swaret to ensure that all of the firewall's components are up-to-date. Does anyone have a clue what's going on?
More information is, of course, available upon request. Thanks!
I just wanted to check both its size and location... and it seems to be fine. One option (a workaround) is to actually symlink /usr/bin/less to /usr/bin/more, if you don't mind using more instead of less.
Originally posted by Tinkster Updated to a 2.6 kernel?
Have a close look at your udev settings, have a google,
there's been a few threads with that problem.
Cheers,
Tink
I've had a couple of Googles, but I'm afraid I'm suffering from a certain degree of ineptitude at the moment. I'm not sure what the hotplug system would have to do with less not producing output... the contents of my udev.conf are as follows (excluding comments):
It's also worth noting that both the web server and the firewall are running 2.6 kernels, but only the web server's "less" works correctly. The web server is running kernel 2.6.7; the firewall is running kernel 2.6.9.
Originally posted by Matir I just wanted to check both its size and location... and it seems to be fine. One option (a workaround) is to actually symlink /usr/bin/less to /usr/bin/more, if you don't mind using more instead of less.
I'll bear that in mind, thanks. I'd really like to find out what the problem is... I never feel right when I circumvent a problem rather than solving it... but a temp fix is better than nothing.
Is there some library that less uses that could be damaged?
Originally posted by tvynr I've had a couple of Googles, but I'm afraid I'm suffering from a certain degree of ineptitude at the moment. I'm not sure what the hotplug system would have to do with less not producing output... the contents of my udev.conf are as follows (excluding comments):
It's also worth noting that both the web server and the firewall are running 2.6 kernels, but only the web server's "less" works correctly. The web server is running kernel 2.6.7; the firewall is running kernel 2.6.9.
That's because it uses tty/pty which are set-up in the
kernel ... I've googled on your behalf and found the
explanation in the LQ-wiki :P
Quote:
Q) I'm running Slackware 10.0. I updated my kernel to 2.6.X. Where have all my devices gone? Why is 'man XYZ'/'less XYZ' not working and giving me errors?
A) The 2.6 series of kernels use 'udev' to manage the devices. Unlike the devfs of old, udev works entirely in userspace and only creates nodes for devices that exist (and it does so dynamically, so if you remove the device, the nodes will be removed. Makes /dev a lot a smaller and easier to figure out what's what. For more, information on udev, see the udev FAQ (http://www.kernel.org/pub/linux/util...tplug/udev-FAQ))
udev also allows you to write rules, so that you can, theoretically, assign any name to a device that is plugged in, perhaps based on criteria such as it's name, or description (e.g. my Creative Muvo2 may be /dev/sda or /dev/sdb, but I have a rule that always creates a symlink at /dev/muvo to wherever the device is plugged in)
But what does this have to do with man page or less errors? Unfortunately, one of the rules in the udev-026-i486-1.tgz package that ships with Slackware 10.0 is wrong, causing problems with the terminals that less (which man uses) relies on. Either:
Originally posted by Tinkster That's because it uses tty/pty which are set-up in the
kernel ... I've googled on your behalf and found the
explanation in the LQ-wiki :P
Cheers,
Tink
I appreciate the effort you've put forward on my behalf. However, I found a similar Google result and applied the fix. Unfortunately, it still doesn't work. The pertinent section of my udev.rules is as follows:
As you can see, I've changed "tty/s%n" to "pty/s%n". However, I still don't get anything from less:
Code:
root@dib:~# man less
Error executing formatting or display command.
System command /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | /usr/bin/less -is exited with status 256.
root@dib:~# /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | more(works)
Is there perhaps something else wrong with one of those lines on my system?
A very valid question... I didn't know I needed to do that. However...
Code:
root@dib:~# udevstartroot@dib:~# man less
Error executing formatting or display command.
System command /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | /usr/bin/less -is exited with status 256.
check the perms on the devices, and see whether your normal
user has proper access rights ... just for good measure. I'm quite
certain that this is the cause of the problem since I had that trouble
myself a few months ago when I updated my wifes comp to 2.6
because of the lacking support for cx8800 chipsets in 2.4s v4l2.
I recently had to reinstall my firewall from scratch (hard drive blew up on me), so I got out the Slackware 10.0 CDs and went to work. After I got it up and running, I checked out less: it was working fine. I then used the man pages to refresh me on the specifics of bash, since I didn't have a full backup of all of my firewall scripts. All of this went seamlessly.
Last night, I told swaret to update everything I had installed on my system and went to bed. After I got up today, I took a look at the system and everything was running much more smoothly (upgrading SMB fixed one problem I was experiencing, etc.). However, at this point, less stopped working. I made the suggested changes to udev.rules and ran udevstart, but nothing has changed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.