LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-22-2013, 01:24 PM   #1
hgriggs
Member
 
Registered: Mar 2010
Location: Virginia USA
Distribution: Slackware
Posts: 34

Rep: Reputation: 2
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:

XTerm*VT100*oldXtermFKeys: true

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?
 
Old 01-23-2013, 06:36 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Define key mappings to affect vi in your .exrc on the Sun box?
 
Old 01-23-2013, 06:48 AM   #3
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Have you tried ESC-1 to get F1?

I've seen that work so it might work for you.
 
Old 01-29-2013, 01:34 PM   #4
hgriggs
Member
 
Registered: Mar 2010
Location: Virginia USA
Distribution: Slackware
Posts: 34

Original Poster
Rep: Reputation: 2
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:

XTerm*tcapFunctionKeys: true

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".
 
Old 01-30-2013, 04:50 AM   #5
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
I can't set up mappings because I don't know what keystrokes are being generated.
Why do you need to know what they are? Just press those keys to produce "whatever" when defining the mappings.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Access with security keys codenjanod Linux - General 11 12-18-2008 04:48 AM
linux operating system built-in telnet command can use "VT400" function keys and key? hocheetiong Linux - Newbie 1 05-27-2008 02:54 PM
USB keyboard function keys/numeric keys on boot raypen Linux - Hardware 4 04-17-2008 03:07 PM
Could not access keyboard function keys( F1, F2 etc...) wallwaters Programming 0 08-30-2005 07:17 PM
Using Function Keys with SSH bad_andy Linux - Networking 3 01-26-2005 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration