Hello all,
I recently upgraded two slackware 10 boxes from 2.4.26 to the 2.6.10 kernel.
I had a lot of gotchas but everything seems working now except that the 'less' comand is not working. If I do 'less sometext.txt' it will show the first screen and go back to the shell without an error message.
This forum helped me a lot already. I hope you have a solution for this, too, cause it is driving me mad.
Thx in advance
PTY change
It is a change in PTY handling. To get less work, you can remove BSD pseudo TTY support in the kernel configuration (everything will work without that).
It is supposed to be a bug in udev scripts, at least in slackware, upgrading to latest udev should solve the problem. However, I didn't tried this solution.
It seems that 'less', and som
It seems that 'less', and some other programs I wanted to run need
to open /dev/tty, however udev created a directory with the same name in /dev and put PTY files in there, and created symlinks.
I fixed it (on Slackware 10) by editing /etc/udev/rules.d/udev.rules
so that two lines read:
# pty devices
KERNEL="pty[p-za-e][0-9a-f]*", NAME="ptysym/m%n", SYMLINK="%k"
KERNEL="tty[p-za-e][0-9a-f]*", NAME="ttysym/s%n", SYMLINK="%k"
After that, I think I just rebooted and udev created the /dev/ptysym/ and /dev/ttysym/ directories, created symlinks, and gave me back my /dev/tty node. After this, 'less' and other programs worked fine.
Worked perfectly for me, Slackware 10.0
Note that the above two lines -REPLACE- the two similar existing lines in /etc/udev/rules.d/udev.rules. In my case I could not run xterm, or less because of the /dev/tty problem. Thanks for the help!
Better solution
I found the following advice on another site. The only change required is the following:
change
KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
to
KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k"
The easiest way to do this is to add the 2nd rule to a .rules file in the /etc/udev/rules.d directory that comes lexically before the default rules file, udev.rules. On my system, I use local.rules.