Can no longer access function keys 1 to 4 when I ssh to a Sun system
I installed Slackware 14.0 at work instead of doing an upgrade. Part of my job involves ssh to Solaris boxes and doing stuff. Since the installation, function keys 1 to 4 no longer work when I am sshed to the Solaris boxes.
The desktop I am using started at Slackware 9 and I kept updating and updating to Slackware current, until finally I did a clean reinstallation to 14.0. I backed up and brought back my home directory after the installation.
I have tried several things. I have added this line to my .Xdefaults file:
This allows me to access the Sun function keys, but alters the behaviour of editing with Vim so that left arrow works as word-left and right arrow works as word-right.
So I either have no function keys but Vim works as I expect it to, or I have the function keys and Vim becomes a frustrating round of workarounds. I suspect this problem is to do with the termcap entries. Any suggestions on how to get back to something that lets me use the Sun function keys AND lets me use the arrow keys as normal arrow keys?
Define key mappings to affect vi in your .exrc on the Sun box?
Have you tried ESC-1 to get F1?
I've seen that work so it might work for you.
I have solved my problem.
First, I will reply to the two suggestions above.
linosaurusroot - the key mappings won't be much use. When I press left and right arrow, it generates some key codes, I do not know what, and they are interpreted by Vim as word-right and word-left. I can't set up mappings because I don't know what keystrokes are being generated.
wildwizard - thanks for the suggestion, I tried that but it didn't work.
I checked that Slackware is using the Dickey xterm, and it is. I checked the xterm.SlackBuild to see how it was compiled, and the old Sun and SCO keyboards are not omitted. I did recompile and force the addition of them using --enable-sco-fkeys and --enable-sun-fkeys when running ./configure, but it made no difference to the end result. I just wanted to reassure myself that xterm was compiled in good order, and I was very happy to find that the default xterm in Slackware 14 was exactly the way I like it.
I spent a lot of time working through termcap and terminfo, but no good result.
I got onto the solution when I started tracking down through /etc/X11/app-defaults and found the entry for Xterm. I was reading through there and looking at the entries for Function Keys and noticed the menu options. There are a number of options there that control Function Key operations - Old Function-Keys, Sun Function-Keys, HP Function-Keys, SCO Function-Keys, and Termcap Function-Keys. If you want to see these menu options, fire up an xterm, put cursor in the xterm and Ctrl-Left-Click and the menu will come up. I experimented with these function key settings, and found that the last one - Termcap Function Keys - gave me the result I needed. It let me use normal function keys on my local desktop, and it gave me access to the first four function keys when I was logged in to the Sun boxes, and best of all it didn't affect Vim operation. Excellent. I didn't want to have to set this every time I opened an xterm - I wanted the setting loaded by default, so I added this line to my .Xdefaults file:
and removed all other entries to do with function keys. So now when I start X, my .Xdefaults file is loaded automatically (xrdb -load $HOME/.Xdefaults), and it all works successfully exactly the way I need it to work.
I did some lookback into the Dickey xterm and I note that there have been many changes to the fucntion key functionality. The notes for xterm-271 on 2011/07/14, show some. http://lists.debian.org/debian-x/2011/07/msg00241.html. I doubt if this was when things changed. I was using xterm-271 until I installed Slackware 14 and we went to xterm-287. It could have been any of the patches between 271 and 287.
While I was working through this problem, I discovered many other things. I no longer need my xorg.conf. When I removed it, I suddenly found that fonts become beautiful. I was very happy with that. I cleaned out a lot of old cruft to do with fonts, and things look nice now. I also noticed that the approved method to start fvwm2 and xfce is to start a dbus-launch and have it run fvwm2 or xfce. I tried it with and without and cannot see any benefit to it, so I didn't bother and went back to my old methods of starting them with just "fvwm2" and "startxfce4".
|All times are GMT -5. The time now is 07:02 PM.|