Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xterm terminal type always selected #50

Open
hackerb9 opened this issue Apr 12, 2024 · 7 comments
Open

xterm terminal type always selected #50

hackerb9 opened this issue Apr 12, 2024 · 7 comments

Comments

@hackerb9
Copy link

hackerb9 commented Apr 12, 2024

WordPerfect does not appear to be paying attention to my TERM or WPTERM environment variables and always selects terminal type "xterm". Is that how it is supposed to work?

I am testing wpunix on a genuine DEC VT340 and to get it to work I had to change the terminal type from the command line:

wp -t vt220 -g vt340_sixelhi

It does work. In fact it seems to work better than "xterm" which kept dying from segmentation faults when I was in the equation editor. But, it seems like wp is supposed to use TERM, no?

@taviso
Copy link
Owner

taviso commented Apr 12, 2024

That's awesome, thanks for taking the photos!

Hmm, it is supposed to work, but as I usually only test on xterm compatible terminal I might have broken it - let me check. The equation editor also shouldn't crash, I thought I had it working.

There was also some feature that I needed to know what a real vt340 did, but I can't remember what it was - let me see if I can find my notes.

@krackout
Copy link

@hackerb9 I cannot get the results of screenshots wp80-dectermcolor-help1.jpg up to help4 (function keys layout). After pressing help (F3 key) twice I only get the cancel and undelete screen. I use xterm, are these screens available on physical terminal only?

PS: I tried wp -t vt220 -g vt340_sixelhi inside xterm but no function key pressed is recognized, I had to kill the process to exit. xterm -ti vt220 was the command to start xterm.

@hackerb9
Copy link
Author

hackerb9 commented Apr 13, 2024

I think you need to use xterm's vt220 keyboard setting so that you can use Ctrl + the function keys to get the keys beyond F12. On the DEC LK-201 keyboard (used by both the VT220 and VT340), the Help key is, I believe, F15.

image


Note: To temporarily turn on the VT220 keyboard in xterm, hold down control and the left mouse button to get to the menu. To enable it from the command line, try -kt vt220.

@hackerb9
Copy link
Author

hackerb9 commented Apr 13, 2024

PS. I just tested xterm -kt vt220 and PF1..PF4 are mapped to F1..F4.

CtrlF5 worked for me to get the help screen.

I think DECTerm presumed you'd be using a mouse so it has no menu accelerator. However, with wp -t vt220 -G vt340hi_sixel, you you can get the menu by PF3, =.

@krackout
Copy link

krackout commented Apr 14, 2024 via email

@hackerb9
Copy link
Author

hackerb9 commented Apr 16, 2024

I've created a file called vt340.trs based on vt220.trs but with better defaults for the VT340 terminal. (Correct name, correct font for line drawing characters, and correct graphics driver.) You can download it from https://github.com/hackerb9/vt340test/raw/main/sixeltests/wp/vt340.trs .

I notice that now that I have a "vt340" terminal type in shlib10, the wpterm program does use TERM=vt340 correctly. It is still ignored when running wp, but this is further evidence that maybe WordPerfect was supposed to use $TERM.

As a workaround, one can set the WPTERM environment variable.

These work:

wp -t vt340
WPTERM=vt340 wp

However, the xterm terminal type is still selected when I do this:

TERM=vt340 wp

@hackerb9
Copy link
Author

Very interesting, thank you. It worked for me also. Seems that on plain xterm the keyboard shortcuts are identical to MS-DOS WP5 - pity that they are not shown in menus or in keyboard template on double F3 press.

I was just reading the wpterm manual and it looks like you can add the keyboard shortcuts for xterm by setting the "Template Flag".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants