taviso / wpunix

WordPerfect for UNIX Character Terminals
603 stars 17 forks source link

Some information worth adding to the wiki #11

Open Vasja1986 opened 1 year ago

Vasja1986 commented 1 year ago

The wiki contains currently the following text:

If you would prefer to use your printer directly, remember to install the cups-bsd package to get lpr. If you don't do this, WordPerfect will not be able to submit print jobs.

Unfortunately installing the cups-bsd package is not enough on some platforms to populate the /etc/printcap file. In Debian 11 (might apply to earlier versions as well) a symlink has to be created. To quote https://debian-handbook.info/browse/squeeze/sect.config-printing.html : cups no longer uses the /etc/printcap file, which is now obsolete. Programs that rely upon this file to get a list of available printers will, thus, fail. To avoid this problem, delete this file and make it a symbolic link (see sidebar [BACK TO BASICS Symbolic links](https://debian-handbook.info/browse/squeeze/sect.config-misc.html#cadre.lien-symbolique)) to /var/run/cups/printcap, which is maintained by cups to ensure compatibility.

It might also be valuable to provide a sample .Xresources file in the wiki (I reckon Xterm is the best terminal to run wp in). For example:

XTerm*faceName: Monospace Regular XTerm*faceSize: 13 XTerm*selectToClipboard:true xterm*decTerminalID: vt340 XTerm*metaSendsEscape: true XTerm.omitTranslation: fullscreen

The faceName and faceSize can be arbitrary values to the individual user liking, however the benefits of the last 3 statements are worth emphasizing:

@emendelson might also want to include the above information on his page.

emendelson commented 1 year ago

@Vasja1986 - Thank you for this. I will be traveling for the next few days, and won't get a chance to see exactly how this works. It seems like excellent advice.

taviso commented 1 year ago

Thanks for the suggestion! Makes sense to me, i've added a link to the Debian Administrators guide.

I did write a FAQ question about XTerm:

https://github.com/taviso/wpunix/wiki/FAQ#q-how-do-i-enable-graphical-print-previews-or-the-graphical-equation-editor

You're right, I should include a minimal Xresources to get people started. Does that mean Alt+Enter doesn't work in a default XTerm on some distributions? Hmm, that's annoying - maybe that binding isn't a good choice.

Vasja1986 commented 1 year ago

I checked the upstream man page: https://invisible-island.net/xterm/manpage/xterm.html#h3-Default-Key-Bindings which specifically states that ALT+Return is the default key-binding for full-screen. I.E. this is not a debian thing.

taviso commented 1 year ago

I see - I must have changed that in my config years ago and forgot 😄

I guess there are two options, I can change all the docs to say Esc+Enter instead, or change to a more universally available binding...?

Vasja1986 commented 1 year ago

Hehe, stuff like that happens. I only figured the printcap stuff out when installing wp to a newly install and was wondering why I could not select a destination.

Personally, I dislike the Esc-Enter combination, because if you press Esc too early wp will invoke the Repeat value failure. No such things occur with a proper modifier key. You may change to a more universally available key-binding, but the question is if such a key-binding is available and will not cause other issues. I in part opened this ticket to advocate inclusion of instructions to modify Xresources. In any case metaSendsEscape should be set for other key-bindings to work correctly. When not set, then ALT-= will not open the menu, for example. Also to display sixels the Xresources shall be modified. Therefore I think it is unavoidable to modify Xresources for a proper working of wp. I do not think it is a big effort to insert one or two extra lines in Xresources, when properly documented. But those are my two cents.

emendelson commented 1 year ago

@Vasja1986 - Thank you for this. Your printcap discovery made it possible to choose a printer in Windows Subsystem for Linux Ubuntu - but not actually to print to the selected printer, so I'm continuing to work on that mystery. (Creating a destination with wpdest does make it possible to print, but I have to write a script that does the job.)

EDIT: The solution to the "not printing" mystery is to enter the spool option: -P NameOfPrinter

Interestingly, when I create a set of destinations with wpdest WP lets me select ONLY from those destinations, not from my printers - at least in WSL. I suppose that's working by design.