Win4Lin User's Guide |
Appendix A -- Using remote X terminals |
(User's Guide Table of Contents) | (Appendix Table of Contents) |
Previous Chapter - Mixing Windows and Linux | Next - Appendix B - National language support |
You can run DOS and Microsoft Windows programs via remote X servers (also called X terminals or X workstations) just as you do from the Desktop on your local system console. Just as with any X client program, all that needs to be set is the DISPLAY environment variable, so that Win4Lin knows which X server to use.
When Win4Lin is installed, it configures the X server for your system console so that you do not have to do any special configuration. When you use an X terminal or X workstation, you have to do some of these things yourself. Also, when using a remote X server there can be some reduced functionality. The issues are:
Win4Lin PC fonts
When Win4Lin is run remotely, all the PC fonts it uses for
DOS character
mode display need to be installed on the X server that is displaying
the MERGE_SESSION.
If these fonts are not installed, alternates are used,
but you may see funny characters, because standard X fonts do
not have all the PC characters available.
You may also see warning when starting up your Win4Lin sessions
about a font not being available.
Note that this is NOT an issue when using Windows itself in a Win4Lin session, because the problem is with DOS fonts not Windows fonts.
The Win4Lin PC font files are in the directory /opt/win4lin/xc/fonts. These font files are in bdf format and must be compiled and installed according to the instructions for your X display server.
Keyboard mappings
When running Win4Lin remotely from an X terminal or X workstation,
a mapping needs
to be established between the keyboard codes of your terminal and
PC scancodes.
For full keyboard functonality, a PC style keyboard is required. If you have a keyboard that is significantly different from the PC style then in Win4Lin sessions the keys will behave as PC keyboard keys, and might not match the printing on the keys. E.g. on a U.S. PC keyboard the equal sign key when shifted produces the plus sign, and on your keyboard you get another character when this key is shifted. So when you type this shifted key in a Win4Lin session, you will get a plus sign, and not what you get when using other programs.
The keyboard code mappings are defined in special files with extension .xcode located in the directory /opt/win4lin/xc. directory. The file xcode.readme in that directory lists all mapping files provided with Win4Lin along with which X terminals and X workstations they are for.
When Win4Lin is installed, the default mapping file is put into the file "xcode.table".
To use a particular mapping file, a special X resource needs to be defined. For example, to use a mapping file named hp.enw.xcode, set the X resource as follows:
Win4Lin*xcodetable: /opt/win4lin/xc/hp.enw.xcode
(Various X terminals and X workstations use differing methods to set X resources, so you will have to refer to your X documentation to figure out how to set X resources.)
When using Win4Lin via a remote X server, Win4Lin uses a generic mapping scheme to translate X codes to PC scancodes if no mapping file is specified. If this generic mapping is not sufficient for your X terminal, a warning message will be displayed in the status area of your DOS or Windows window and certain keys may not work correctly. Note that this generic mapping scheme slows down the startup of each Win4Lin session, so even though the generic mapping might be sufficient for your use, it is not pain free.
Warning: In some situations in non-English locales, the generic mapping scheme does not work at all, and your Win4Lin sessions will fail to start.
So for best performance you should get a new custom mapping file to use. If none of the xcode files already supplied are sufficient, then go to the TreLOS support page for xcode file updates (http://www.trelos.com/support/xcode/) to see if there is already an xcode file available for your X server. If not, then you can make a new xcode file that will work with your X server.
To make a new one, first look at an existing xcode file to see how it works. (In each file is an explanation of the format.) Then make a copy of one of the files, and update the "keycode" values in the copy to match what your X server uses. If you send your new xcode file to TreLOS support, along with an explanation of exactly which X server version it is for, then it can be made available to other Win4Lin users.