ssh from Linux and can't edit

All types of networks, network stacks, and protocols supported by OpenVMS.
User avatar

Topic author
martin
Valued Contributor
Posts: 70
Joined: Tue Mar 22, 2022 6:47 pm
Reputation: 0
Location: England
Status: Offline

ssh from Linux and can't edit

Post by martin » Wed Mar 01, 2023 10:29 am

I have the following hobbist setup:
  • axpbox-1.1.0
  • Alpha Operating System, Version V8.4-2L1
  • Networking via a second NIC
My LOGIN.COM includes

Code: Select all

$ SET TERMINAL /INSERT /INQUIRE /NOEIGHT
The linux box runs

Code: Select all

#cat /etc/ssh/ssh_config.d/90-alpha.conf
Host alpha alpha.home
  Ciphers aes256-cbc
  HostKeyAlgorithms +ssh-dss
  KexAlgorithms +diffie-hellman-group1-sha1
I can quite happily log into the VMS system, but I'm having problems getting TPU running. My keyboard is, of course, a PC style one, not an LK201. Therefore there are no HELP, DO or PF1 keys! Does anyone have any suggestions or pointers? Please be gentle, I'm coming back to VMS after over 20 years on Linux. Alternatively, can anyone recommend a good vi editor that runs on my system?
Martin
  • Retired System Manager: VMS/UNIX/UNICOS/Linux.
  • Started on a VAX 11/782 in 1984 with VMS 3.6.


tim.stegner
VSI Expert
Valued Contributor
Posts: 55
Joined: Wed Jul 21, 2021 9:14 am
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by tim.stegner » Wed Mar 01, 2023 11:06 am

I use EDT all the time. while it's possible to get key mappings for whatever terminal emulator you are running; i find the non-Gold keypad keys work fine, and i can define keys or line-mode anything else. Possibly a similar situation works for TPU, though line-mode commands are less easy under TPU; as they are EVE commands.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by sms » Wed Mar 01, 2023 1:55 pm

Code: Select all

> [...] whatever terminal emulator you are running [...]

   And that's the question: What are you using as a terminal/emulator?

> [...] The linux box [...]

   Not enough detail.

   I normally use xterm from a Mac, with a small set of xmodmap
directives (for an Apple keyboard):

keycode  79 = KP_F1
keycode  89 = KP_F2
keycode  83 = KP_F3
keycode  75 = KP_F4
keycode  77 = KP_Separator
keycode 127 = Prior

   KP_Fx are the keypad top row; KP_Separator is the comma (marked "+"
on an Apple keyboard).  That "Prior" definition copies "Page Up" from
above "Page Down" to the left of "Page Down", as on old DEC keyboards. 
If you're trained for the modern as-marked locations, then you might not
want that.

   Some playing around with xev might be helpful to discover the
keycode values in your X environment.

   With a PC-style keyboard, you'd also need to choose an alternate
location for the missing key in the rightmost column of the keypad. 

   I also have "set keypad edt" in my TPU initialization file (logical
name: EVE$INIT), so I never bothered mapping those new-fangled
(post-VT100) keys like Do, Help, and so on.

      help edit /tpu /initialization

   With a different terminal emulator, I'd expect the key-mapping scheme
to be different, but I'd expect there to be one.


> [...] a good vi editor [...]

   I'd expect a Web search for terms like, say:
      OpenVMS Vim
to find things.


   For the record, my whole EVE$INIT  (SYS$LOGIN:EVE_INIT.EVE):

its $ type EVE$INIT
set cursor bound
set keypad edt
set right margin 72
set scroll margins 20% 20%
set wrap
tpu set( mouse, off)
def key=gold-left  "shift left 8"
def key=gold-right "shift right 8"
its $ 
Last edited by sms on Wed Mar 01, 2023 1:58 pm, edited 1 time in total.

User avatar

arne_v
Master
Posts: 308
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: ssh from Linux and can't edit

Post by arne_v » Wed Mar 01, 2023 6:57 pm

What is the problem?

Is the problem that EVE will not start?

Or is the problem only that you can't find some keys?

If the editor will not start try:

$ SHOW TERM

to see what VMS thinks the terminal is.

When working with anything else than real VT200/VT300/VT400/VT500 then I generally have better experience with:

$ SET TERM/DEV=VT400

than:

$ SET TERM/INQ

If it is just the keys then you need to look at the key mapping.

There are vi clones available for VMS.

30 years ago I remember one written in TPU.

But this will probably work better for you:

http://www.polarhome.com/vim/
Arne
arne@vajhoej.dk
VMS user since 1986


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by sms » Wed Mar 01, 2023 7:24 pm

Code: Select all

   Regarding Vim on VMS (from polarhome.com)...

   I seem to have this version installed here:

ITS $ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 11 2017 22:35:59)
OpenVMS version - IA64
Compiled by SYSTEM@ITS::ITS.ANTINODE.INFO
[...]

   I almost certainly had it working on Alpha, too, but I don't have an
Alpha system running at the moment to check.

   Note that as shipped, Vim on VMS handles upper-case command-line
options differently from every other program I've ever seen
(https://vimhelp.org/os_vms.txt.html#os_vms.txt):

[...]
IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line
parameters are assumed to be lowercase. In order to indicate that a command
line parameter is uppercase "/" sign must be used.

Examples:
  
        vim -R  filename  ! means: -r List swap files and exit
        vim -/r filename  ! means: -R Readonly mode (like "view")
[...]


   Given how long SET PROCESS /PARSE_STYLE = EXTENDED has been available
(on non-VAX), this never made sense to me.  And trying to remember to do
upper-case stuff differently for this one program was hopeless (for me).

   So, a while ago (30-APR-2005), I made some changes (for Vim version
6.3) to expunge that annoyance, and passed the suggestions along, but
they seem not to have been adopted.

   I re-did those changes for 7.4, which is the last version whose
source code I've touched.  I use Vim on VMS seldom enough that I haven't
noticed any problems with which a newer version might help.

   So, around here, a command like
      vim -R abc.txt
works the same on VMS ("[readonly]") as it does on non-VMS systems. 
(For VAX or obsolete Alpha, you'd need to quote upper-case command-line
items, as with every normal program on VMS.)

   It might be possible to change the program to allow the (much
despised) "-/" notation while actually preserving the command-line case,
but I didn't try.

User avatar

Topic author
martin
Valued Contributor
Posts: 70
Joined: Tue Mar 22, 2022 6:47 pm
Reputation: 0
Location: England
Status: Offline

Re: ssh from Linux and can't edit

Post by martin » Thu Mar 02, 2023 3:17 am

@sms
sms wrote:
Wed Mar 01, 2023 1:55 pm

Code: Select all

> [...] whatever terminal emulator you are running [...]

   And that's the question: What are you using as a terminal/emulator?

> [...] The linux box [...]

   Not enough detail.
Terminal emulators are
  • GNOME Terminal 3.28.3 "A terminal emulator for the GNOME desktop Using VTE version 0.52.4 +GNUTLS"
  • Konsole
both accessing the Alpha with either "$ ssh alpha" or "$ ssh system@alpha", config as above.

Linux box:
  • Operating System: AlmaLinux 8.7
  • KDE Plasma Version: 5.24.6
  • KDE Frameworks Version: 5.96.0
  • Qt Version: 5.15.3
  • Kernel Version: 4.18.0-425.13.1.el8_7.x86_64 (64-bit)
  • Graphics Platform: X11
  • Processors: 4 × Intel® Core™ i3-4150 CPU @ 3.50GHz
  • Memory: 15.5 GiB of RAM
  • Graphics Processor: Mesa Intel® HD Graphics 4400
Networking for the host and most VMs is via a software bridge to one NIC. The "axpbox" software connects via a second NIC to the hardware switch. The relevant stanza from es40.cfg is:

Code: Select all

pci0.4 = dec21143
  {
    adapter = "enpXsX"
    mac = "08-00-DE-XX-XX-XX";
  }
Added in 1 hour 49 minutes 36 seconds:
arne_v wrote:
Wed Mar 01, 2023 6:57 pm
What is the problem?

Is the problem that EVE will not start?
>>>No, escape sequences won't work and there are missing keys.
Or is the problem only that you can't find some keys?
>>>Can't find/they are not there
If the editor will not start try:

$ SHOW TERM
>>>See below
to see what VMS thinks the terminal is.

When working with anything else than real VT200/VT300/VT400/VT500 then I generally have better experience with:

$ SET TERM/DEV=VT400
>>>I've just tried that, no change
than:

$ SET TERM/INQ

If it is just the keys then you need to look at the key mapping.

There are vi clones available for VMS.

30 years ago I remember one written in TPU.

But this will probably work better for you:

http://www.polarhome.com/vim/
>>>I've already downloaded that one, but have disapeared down a rabbit hole with unzip. I might try again later.

Code: Select all

$ show term
Terminal: _FTA1:      Device_Type: VT400_Series  Owner: JMR

   Input:    9600     LFfill:  0      Width:  80      Parity: None
   Output:   9600     CRfill:  0      Page:   24      

Terminal Characteristics:
   Interactive        Echo               Type_ahead         No Escape
   Hostsync           TTsync             Lowercase          Tab
   Wrap               Scope              No Remote          Eightbit
   Broadcast          No Readsync        No Form            Fulldup
   No Modem           No Local_echo      No Autobaud        No Hangup
   No Brdcstmbx       No DMA             No Altypeahd       Set_speed
   No Commsync        Line Editing       Insert editing     No Fallback
   No Dialup          Secure server      No Disconnect      No Pasthru
   No Syspassword     No SIXEL Graphics  No Soft Characters No Printer Port
   Numeric Keypad     ANSI_CRT           No Regis           No Block_mode
   Advanced_video     Edit_mode          DEC_CRT            DEC_CRT2
   DEC_CRT3           DEC_CRT4           No DEC_CRT5        No Ansi_Color
   VMS Style Input    <CTRL-H> Backspace
I've tried running TPU on the PuTTY console, and the escape sequences work there. So - I ran up a PuTTY session from a terminal emulator and that worked :D Personally I prefer to use a standard terminal emulator for all machines (various Linux + Windows), but if I need PuTTY for VMS I can live with that. I'll have a play with the key definitions, NumLock seems to be caught by the host, so I probably can't reprogram that as <GOLD>. SMS has a few suggestions, I'll start there.
Martin
  • Retired System Manager: VMS/UNIX/UNICOS/Linux.
  • Started on a VAX 11/782 in 1984 with VMS 3.6.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by sms » Thu Mar 02, 2023 8:24 am

Code: Select all

> GNOME Terminal [...]
> Konsole

   I'd need to consult the docs on either of those.

> [...] have disapeared down a rabbit hole with unzip. [...]

   Not much meat on that bone.  As usual, a transcript showing actual
actions/commands and results/messages could be more helpful than a vague
description.  Copy+paste is your friend.

> [...] NumLock seems to be caught by the host, so I probably can't
> reprogram that as <GOLD>. [...]

   I wouldn't be amazed by that.


mw
Member
Posts: 8
Joined: Mon Jul 06, 2020 4:38 am
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by mw » Thu Mar 02, 2023 8:47 am

FWIW, there was/is a lot of discussion (and noise) on comp.os.vms regarding terminal emulators. I would search there, especially for Xmodmap input.

User avatar

Topic author
martin
Valued Contributor
Posts: 70
Joined: Tue Mar 22, 2022 6:47 pm
Reputation: 0
Location: England
Status: Offline

Re: ssh from Linux and can't edit

Post by martin » Thu Mar 02, 2023 9:16 am

sms wrote:
Thu Mar 02, 2023 8:24 am

Code: Select all

> [...] have disapeared down a rabbit hole with unzip. [...]

   Not much meat on that bone.  As usual, a transcript showing actual
actions/commands and results/messages could be more helpful than a vague
description.  Copy+paste is your friend.

>>>I didn't think it relevant to getting TPU going.  Off the top of my head I had to download unz552xv-axp.exe and was having a problem with that.  I'll try again later today and post the results if you are interested.

Martin
  • Retired System Manager: VMS/UNIX/UNICOS/Linux.
  • Started on a VAX 11/782 in 1984 with VMS 3.6.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: ssh from Linux and can't edit

Post by sms » Thu Mar 02, 2023 9:37 am

Code: Select all

> >>>I didn't think it relevant to getting TPU going. [...]

   True, but I happen to be involved with the Info-ZIP programs, too.

> [...] Off the top of my head I had to download unz552xv-axp.exe and
> was having a problem with that.  I'll try again later today and post the
> results if you are interested.

   First, I'd avoid anything before UnZip 6.0 (and Zip 3.0).  Bugs and
features.

   Second: https://vmssoftware.com/products/zip-tools/

Post Reply