[Keine deutsche Version dieses Documents verfuegbar]
Turning Win32 machines into something useful
Obviously, the "most" right solution is to eleminate your Windows
installtion and install FreeBSD or something similar, but in case you
need some less drastic solution, read this page.
The following should work both on Windows 95 and Windows NT
(all real Win32 platforms).
- Create a homedir: "/home/cracauer" or whatever, but it should be
on C: (see below).
- Set the following variables in 'system proterties/environment':
- extend $path to whereever you plan to install your news tools
(/unixtools), maybe with leading C:
- set $HOME to your home directory.
- $USER to your user name. Your user name should be
Unix-compatible, that means no special letters and not longer than 8
chars.
- Get some useful stuff:
- ftp://ftp.cygnus.com/pub/gnu-win32
- is a full set of GNU tools, including a gcc version that has
a Posix-enabled library that doesn't prevent you from using
win32 things (sockets etc.), the bash shell (including filename
and programname completion) etc.
Please note that these GNU-Win32 tools have the in common that the
author's primary intention is to make a framework where Unix sources
can be used as unchanged as possible. The obvious
problem is that handling for filesystem valume letters ("C:") is not
part of Unix. The shared library of these tools tries to map filenames
like '//D:/foobar' to the right place, but that may fail depending of
what the program does with the path. Additionally, there is a mount`
command. You can do `mount D: /d`, then you can access the contents of
D: without a volume letter. The trick is to have a global list of
mountpoints for all GNU-Win32 programs, inplemented in the common
shared library.
Anyway, the point about this toolset is to be able to compile Posix
programs without using the Microsoft-supplied Posix environment. The
latter doesn't allow you to mix Win32 and Posix calls (you can do this
with GNU-Win32), you can't even use sockets and the Posix lib has
moved out of Visual C++ anyway, you need to buy another package from
Microsoft to get the crap.
At this point of installtion, you have at least a working
Unix-compatible 'rm, with support for '-r' and '-f'. You should take
the obvious analogy and try 'rm -rf /', just in case you're not longer
sure you really want to tangle with Windows anymore.
- http://www.cs.washington.edu/homes/voelker/ntemacs.html
- is where you can get binaries of emacs-19.xx. Please note that the
original GNU Emacs sources compile and install on Windows NT without
problems (if you have Visual C++). The above are just binaries of
unchanged sources, not a port.
Emacs on NT has 'M-x shell' support. You get command-line editing
for every commandline-editing tool (like ftp), backward scrolling in
the emacs buffer and you can search in this buffer. 'Curses'- using
tools (whatever that is called in DOS, I mean non-graphics
cursor-addressing programs) will not work, of course. This feature is
just what you have under Unix Emacs.
It has dired-support, so you can get around some less intuitive
tools proved with NT. Changing permissions isn't support yet.
- http://www.itribe.net/virtunix/mystuff.html
http://www.itribe.net/virtunix/
http://www.itribe.net/virtunix/otherstuff.html
- some additional stuff, df, dd, ps, kill :-]
This site include a link to a working version of unzip.exe
(many version with long filename support can' handle
packages like these)
To "C:" or not to "C:"?
A central problem with Unix-Tools on Win32 is that some understand the
partition letters, other do not.
This problem becomes a real hassle when it comes to environment
variable settings. $HOME need to be set for a lot of tools, so should
it include "C:" or not?
The only workaround I found is to avoid using letters as much as
possible. It is absolutly necessary to have your home directory on the
same partition your Unix tools are on, so $HOME and the local
variables of the tools will point to the same partition.
Things you should know about to feel at least a bit warmer.
- I found vim to
be the best vi clone on NT (include drive letter support).
- You can set the commandline-editing behaviour to default to 'insert',
not 'overwrite' (which it did since doskey.com in 1986)
- You can change the color of command windows to be green on black
- Things you can do in the NT shell, finally:
- use the
'*' in cd commands so you don't have to type in the full directory
name, like cd emacs*`.
- You can use '/ as a pathname seperator in nearly every application,
with the exception of the NT shell (that would be difficult because
'/' is the commandline-option switch char).
- There are tools to exchange the Caps-Lock and the left control
key. Forgot the place, didn't work on Nt 4.0 yet.
Things that may get in your way
- Permission handling on NT is
- different from Unix
- difficult to support even for native NT tools
- most Windows developers don't care about them, including Microsoft's
So, almost every tools to copy, more or restore files will totally
screw up the permission settings of your files. It's a shame, really.
As soon as I use the NT box to store important data, I'll at least
run a nightly script to make a list of files and their permissions, so
at least I can look up the former state.
- NTFS is slow. On my machines 2 times slower than FAT. Since
setting permissions will be sissiphus-work anyway, I would seriously
consider using a FAT filesystem on your NT box, export nothing and use
Samba on a Unix box to distribute your files.
So, why should you *not* use Windows NT?
- Instable. I don't mean it panics all over the place or such. Just
Font support suck up system-wide for me more than once and that's a
thing you fix by reboot.
- You have to reboot for tasks where a Unix system doesn't have
to be rebooted. A Unix system can set IP addresses, routes, nameserver
setting while it is running. I think it is funny to have an OS with
loadable drivers and then make it been rebootet when you want to use
the device...
- The worst the the need to reboot when installing WWW browsers
like the Internet explorer.
- Internet Explorer has a lot of nice features, especially beeing
useable without a moure. I *really* like this feature. However, I
can't say it works stable :-(
- Although I hate Motif programs even more than Windows
applications, when I can't avoid using a GUI program (Netscape etc.),
I really need X11's capability to drag and drop text
from almost every place where text is shown. For example, I can copy a
URL from an emacs buffer and drop it into the "URL:" window of
Netscape. What am I supposed to do in Windows? Type it in again? Hah!
Never! I found the easiest way to feed new urls into Windows browsers
to always have a browser-accessible file open, cut'n paste the Url
therein and then reload the File into the browser. Braindead...
- No virtual desktop support. Even the lowest-tech X11 windows
managers with 64 KB binary size have multiple desktop support. Can't
be that hard, or what?
- More to come...
Martin Cracauer <cracauer @ cons.org> http://www.cons.org/cracauer/
©2007 Martin Cracauer $Id: win32-useful.html4m,v 1.4 1997/04/29 15:31:15 cracauer Exp $