1Using w3m on Cygwin 2 3 2003/02/20 4 Katsuyuki Watanabe 5 Dai Sato 6 7You can use w3m on Windows with a UNIX compatible environment "Cygwin". For 8detailed information of Cygwin, See http://cygwin.com/. 9 10Build 11 12After w3m-0.2, patches for Cygwin have been marged to w3m packages. If you use 13cygwin-1.1.4 or later, w3m shuould be build without any problems. 14 (*) on Cygwin B20.1, you should add -luser32 to LOCAL_LIBRARIES 15 16The newest version of termcap and ncurses package are recomended. Especially, 17older versions of termcap have bugs in the entry for Cygwin which make the 18screen collapsed. The problem was fixed in termcap-20001020-1. 19 20Please make sure to execute ./configure before the make. The macros explained 21in "Macros" are defined by ./configure, and they are nessary to make this 22package. When you have some problem in making w3m, please check the points 23below: 24 25 o Do make veryclean, then exec ./configure && make. 26 o Check gcc and binutils are properly installed. setup.exe might have 27 finished without reporting any errors, though the download of package 28 files was end in failure. In this case, you should try to setup again. 29 30Using Cygwin with Win95/98/ME, configure will not run correctly when 31environment variable CYGWIN includes "ntsec" and/or "ntea", because shell 32scripts will not have executable attribute. It is recomended to remove "ntsec" 33and "ntea" from environment variable CYGWIN to load cygwin1.dll for the first 34time. 35 36Macros 37 38The macros below are defined in config.h for Cygwin environment. 39 40USE_BINMODE_STREAM 41 With -dump, -dump_{head,source,both,extra} option, output to stdout are 42 done in binary mode. It might not been needed with cygwin-1.3.11 or later, 43 but remained for safe. 44 In common with Cygwin and EMX. 45SUPPORT_DOS_DRIVE_PREFIX 46 The path names are handled as file names when they includes drive letters 47 like "C:", "C:/", "file://C:/", "file://C|/", and so on. 48 In common with Cygwin and EMX. 49SUPPORT_NETBIOS_SHARE 50 URIs of common resources of NETBIOS in "//NETBIOSHOST/SHARE/PATH", 51 "file://NETBIOSHOST/SHARE/PATH" format are handled as file: schema instead 52 of ftp: schema. 53 Only for Cygwin environments. 54SUPPORT_WIN9X_CONSOLE_MBCS 55 Search and line input to forms are supported. But input through IME is 56 available only with the local console when TERM=cygwin, and environment 57 variable CYGWIN is not include "tty". The restrictions avoid the problems 58 of the DOS prompt of Win9x and tty layer of Cygwin. For WinNT, the macro 59 doesn't change any behavior of w3m, IME is always available with local 60 consoles. 61 Only for Cygwin environments and LANG=JA. 62 63Cooperation with Native Applications 64 65When calling the Win32 Native Abblications, "File not found" errors might be 66raised because of difference in formats of path name between Win32 and UNIX. 67 68Local CGIs 69 70Local CGIs in $LIB (/usr/local/lib/w3m/cgi-bin by default) use /usr/bin/perl. 71If you want to use ActivePerl (a native application) and so on, please modify 72the each scripts in $LIB with wrapper scripts as follows: 73 74------ /usr/local/bin/winperl ------ 75#!/bin/sh 76# wrapper script for Win32 Native Perl 77PERL=/cygdrive/c/Perl/bin/perl.exe 78case $1 in 79 -*) 80 ;; 81 *) 82 SCRIPT=`cygpath -w $1` 83 shift 84 ;; 85esac 86exec "$PERL" "$SCRIPT" $@ 87------------------------------------ 88 89Where the PERL= is the path of Native Perl in Cygwin context. cygpath 90utilities come with Cygwin packages. 91 92For directory listing, when "Use external program for directory listing" is 93set "NO", you can browse the directory list without local CGIs. 94 95Editors 96 97w3m uses external editors to operate texts textareas and so on. You can use 98any native application as the external editor with the script as below: 99 100------ /usr/local/lib/w3m/winedit ------ 101#!/bin/sh 102EDITOR='/cygdrive/c/Program Files/sakura/sakura.exe' 103FILE=`cygpath -a -w $1` 104exec "$EDITOR" "$FILE" 105---------------------------------------- 106 107Where the EDITOR= is the path of Native editor in Cygwin context. 108 109If you use inetd as a service in WinNT and connect to localhost by telnet, 110the windows will be opened only if "Allow service to interact with the 111desktop" is ON. 112 113Known Bugs 114 115LF is converted to CR+LF when use -dump or -dump-source options. 116 Make sure USE_BINMODE_STREAM was defined in compilation. Try to 117 re-configure and make, or set binmode to the environment variable CYGWIN. 118Can't input through IME in DOS prompt of Win9x. 119 When "tty" is included in the environment variable CYGWIN, it is not 120 permitted to avoid problems in tty layer of Cygwin. Remove "tty" from 121 CYGWIN. 122Cursor keys doesn't work when IME is ON in DOS prompt of Win9x. 123 This is the problem of DOS prompt of Win9x and tty layer of Cygwin. Use 124 C-f, C-b, C-p, and C-n instead. 125Screen is not controled correctly in command prompt of WinNT. 126 Set the each size of screen buffer and window in a same value. 127Can't use the mouse with DOS prompt or command prompt. 128 When "Quick Edit" is ON, mouse events are not handed to w3m. Set it OFF. 129Mouse buttons behave funny with DOS prompt or command prompt. 130 In cygwin-1.3.15 or earlier, the escape sequence of the right and center 131 button of the mouse are inverted. It is fixed in cygwin-1.3.16-1. Please 132 make w3m in the environment you use, because w3m can't judge the versions 133 of Cygwin perfectly, 134 135Others 136 137In Cygwin environment, it should be confortable to use not DOS prompt or 138command prompt but telnet clients like TeraTerm, PuTTY, and so on with inetd 139in localhost, or other tools as rxvt or cygterm. 140 141 o rxvt with japanese enhancement: 142 rxvt on Cygwin 143 http://hp.vector.co.jp/authors/VA021953/rxvt/ 144 compiled package 145 http://matsu-www.is.titech.ac.jp/~sohda/cygwin/dist/ 146 147 o cygterm: 148 CygTerm - Yet another Cygwin console 149 http://www.dd.iij4u.or.jp/~nsym/cygwin/cygterm/ 150 151 152