old-www/LDP/LG/issue32/tag_emulate.html

547 lines
23 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<META NAME="generator" CONTENT="lgazmail v1.1preB">
<TITLE>The Answer Guy 32:
Virtual System Emulator for Linux and Why NOT to Use Them
</TITLE>
<!-- ORIGINAL SUBJECT:
What to do with LINUX??
JTD SUBTITLE:
-->
</head>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H1 align="center"><A NAME="answer">
<img src="../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
<a href="./index.html">The Answer Guy</a>
<img src="../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
</A></H1>
<BR>
<H4 align="center">By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H4>
<p><hr><p>
<!--endcut ========================================================= -->
<H3><img src="../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>Virtual System Emulator for Linux and Why NOT to Use Them</H3>
<p><strong>From Jeff on the L.U.S.T List on 20 Aug 1998 </strong></p>
<!-- begin body -->
<p><strong>Now that I have LINUX installed on a machine, the question becomes
what can I do with it?
</strong></p>
<p><strong>I've heard there is an application that will allow me to run my standard
windows programs (office, etc), anyone know anything about that?
</strong></p>
<p><strong>Jeff
</strong></p>
<blockquote><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>There are several efforts to provide this sort of thing.
Page down to the end to see some notes about those. Meanwhile
here's a rambling rant:
</blockquote>
<blockquote>Installing Linux in the hopes of running your Windows/Office
programs is certainly misguided if you intend to get any
"normal" work done.
</blockquote>
<blockquote>What you do with any OS is run programs. When selecting which
OS(es) to install and use your chief consideration is: what
programs do I want to run?
</blockquote>
<blockquote>Thus, if you wanted to run WordPerfect, or Mathematica, or
Applixware (an applications suite which is available on
several forms of Unix, and in a Windows version as well) ---
you'd then have <EM>choices</EM>. These applications are available
under a few operating systems.
</blockquote>
<blockquote>However, with Microsoft Office you only have two (real)
choices: MS Windows, or MacOS.
</blockquote>
<blockquote>As noted below many people have attempted to expand your
choices (by allowing you to run Windows programs under various
forms of emulation and capability interfaces).
</blockquote>
<blockquote>I personally think it's silly to install an OS and <EM>then</EM> ask
"now what do I do with it?" It seems analagous to ripping the
powertrain out of a car, fitting it with a "formula 1" engine,
blowers, and a custom tranny and asking: "Now what do I do
with it? Can I use this for my daily commute and grocery
shopping?"
</blockquote>
<blockquote>(The answer, in this hypothetical case is, "Maybe, but why? A
racing car is for racing, it makes a poor choice for more
general use").
</blockquote>
<blockquote>Of course my analogy breaks down at this point since Linux is
not so specialized. I don't want to perpetuate the notion that
Linux is a "server" OS. That's just where it's currently popular.
</blockquote>
<blockquote>There are general applications for Linux --- they just aren't
the same brands that you're used to seeing for Windows
software. There are more office applications suites for Linux
than there are for Windows. This is nice from the point of
view of the consumer that wants choices; but crippling from a
"big business" perspective.
</blockquote>
<blockquote>Under Windows there is essentially <EM>one</EM> dominant office
suite. (A couple of others exist, like Lotus Smartsuite, and
Corel's Office, and Applixware --- but they get essentially no
press coverage and have just about nil "mindshare"). It is
almost certainly no accident that the company that controls
this proprietary OS also dominates the applications that are
available for it. That is a major point in this DoJ
investigation of Microsoft's business practices.
</blockquote>
<blockquote>Other companies have dominated other fledgling industries
in our nation's history. At least three of them were subject
to "consent decrees" (agreements with our federal government
regarding their responsibilities as recognized monopolies)
--- I'm referring to <a href="http://www.ibm.com/">IBM</a>,
<a href="http://www.xerox.com/">Xerox</a>, and
<a href="http://www.att.com/">AT&amp;T</a>. However this
is not a history lesson --- which is good since I don't
have textbook summaries of those cases handy.
</blockquote>
<blockquote>So, under Linux you can run Applixware, WordPerfect,
StarOffice, Cliq (a character based suite) and various
freeware packages like LyX, SIAG (Scheme in a Grid ---
a spreadsheet package), and Maxwell (a word processor) and
others (like '<tt>sc</tt>' or '<tt>slsc</tt>' the "spreadsheet calculator"
and the "SLang version of '<tt>sc</tt>'").
</blockquote>
<blockquote>A more popular way for many Linux users to work is with text
editors (rather than word processors) --- and using markup and
typesetting languages. These are whole different approaches
to the situation. Instead of using some proprietary word
processor interface and document/file format I use simple text
like:
</blockquote>
<pre>
% Template for a LaTeX Letter
\documentclass{letter}
\begin{document}
\begin{letter} {%
\\ % full name and title
\\ % address
% city, state, zip-code
\vfill
\opening{Dear %
Sir or Madam%
,}
\vfill
\closing{Sincerely,}
\vspace{1in}
\signature{Jim Dennis,}
\vfill
\end{letter}
%% end letter (Repeat as necessary)
\end{document}
</pre>
<blockquote>I can use this template for all of my personal letters and a
similar one (with spacing set aside for a letterhead --- or
even with letterhead macros --- etc) for business.
</blockquote>
<blockquote>With that I can simply run a command like:
</blockquote>
<blockquote><blockquote><code>latex myletter.tex
</code></blockquote></blockquote>
<blockquote>... to typeset it and either print the resulting "dvi" file or
run the '<tt>dvips</tt>' command to convert it to PostScript and print
that (even on non-PostScript printers).
</blockquote>
<blockquote>Note that the letters are <EM>typeset</EM> --- with kerning,
leading, etc. I don't have to concern myself with the details
about line length, pagination, etc. The <tt>\vfill</tt> commands
(macros) are hints about how I want the portions the first and
last pages filled (providing visual separation between the
addressing and salutation, and between the text and the
signature/closing).
</blockquote>
<blockquote>I can create my own "styles" and "document classes" and I can
create my own abbreviations and macros for doing things my
way. For example a friend of mine has a couple of macros for
his resume (which can be easily rendered with a properly
accented 'e' under LaTeX) which allow him to put in a line
like:
</blockquote>
<pre>\job {Big Former Employer} {Chief Bottle Washer}
{Feb, 29, 1931 --- May 1, 1942}
</pre>
<blockquote>... and have each element of that (company, title, date range)
typeset in a particular fashion (such as "Large bold" for the
company, "large italics" for the title and "small caps" for
the dates, with "<tt>\hfill</tt>" to fill these lines).
</blockquote>
<blockquote>If he decides that he doesn't like the look of one resume ---
he can redefine his "job" macro and all of the jobs will be
consistently rendered the new way. He and I don't have hand
edit all of the jobs on the list --- just the definition of
<tt>\job</tt>.
</blockquote>
<blockquote>As another example; there are many things that Windows users
put in spreadsheets (Excel) that are more like databases or
tables (that is tabular data without any computations
involved). They use Excel (or other spreadsheets) for this
because the things are already available and they know how to
use them. In some cases this is a reasonable choice. In
others they make <EM>more</EM> work for themselves than they would by
using a database, or using a "big text file" (say, tab and
line delimited).
</blockquote>
<blockquote>Under Unix it is more common to put these sorts of things in a
text file and use the many text processing tools (<tt>sort</tt>, <tt>diff</tt>,
<tt>cut</tt>, <tt>paste</tt>, <tt>join</tt>, <tt>grep</tt>, <tt>awk</tt>,
<tt>perl</tt>, ... ) to work with them.
</blockquote>
<blockquote>As the Windows user continues to use a spreadsheet (especially
for tracking lots of data and importing long tables) he or she
hits the capacity limits imposed by their memory and
applications. Spreadsheets programs typically have to load
whole spreadsheets into RAM. I don't know of any of them that
can "page through" a large spreadsheet effectively.
</blockquote>
<blockquote>The Unix user's capacity is typically limited by diskspace. In
other words the text processing approaches usually scale well.
Things like awk, grep, join, etc just filter through the
file(s) and don't have to load any more than a small buffer's
worth at any given time. Even '<tt>sort</tt>' --- which necessarily
must go through whole files --- scales pretty well (I've
sorted files that were hundreds of megabytes --- it takes a
while and plenty of temporary disk space --- but GNU sort will
do it).
</blockquote>
<blockquote>As a side note most programs under Linux/Unix are "toolkits"
or "little languages." For example you can simply "sort" a
list by "ASCII collating sequence" by just using a command
like:
</blockquote>
<blockquote><blockquote><code>sort file &gt; file.sorted
</code></blockquote></blockquote>
<blockquote>... which is the simple case. But you can also deal with more
complex cases like this: let's say I have a list of
appointments of the form: MMM, DD, YYYY Notes (three letter
abbreviation for the month, on or two digit date, four digit
year followed by some text).
</blockquote>
<blockquote>I can sort that with a command like:
</blockquote>
<blockquote><blockquote><code>sort +2n +0M +1n
</code></blockquote></blockquote>
<blockquote>... note that I sort first, numerically by year (+2 columns
from the start of each line), secondarily by the first column
by "Month" (a special sorting key per your locale), and
tertiarily by date (also numerically).
</blockquote>
<blockquote>It's the same sort utility --- and it has <EM>lots</EM> of other
options (about things like "folding/ignoring the case"
specifying field separators, using an offset within the
column/field, counting consecutive blanks as singular or
multiple field seperators, and things like that).
</blockquote>
<blockquote>Under Unix it's also easy to use programs <EM>with</EM> one another.
This is obvious when by pipe the output of one filter into
another (also available under DOS --- but much less widely
used due to the relative obscurity/unavailability of good
filters to use, and crippled by the implementation of pipes
--- which is basically a set of "anonymous tempfiles" with
"transparent redirection" --- as opposed to Unix pipes in
which the processes are running concurrently).
</blockquote>
<blockquote>It is less well known but equally handy to see how the
dominant Unix/Linux editors ('<tt>vi</tt>' and '<tt>emacs</tt>') allow one to
interface with "standard" Unix commands and filters.
</blockquote>
<blockquote>Under '<tt>vi</tt>' I can mark a line in my text ("<tt>[Esc]ma</tt>"
to set the "<tt>a</tt>" mark) search for an arbitrary regular expression
("<tt>/regex[Enter]</tt>") and then I can filter that block of text
(from my cursor to the mark) through an arbitrary Unix command
(such as '<tt>sort</tt>') using just 3 or 4 keystrokes (plus the
command's name). (In my example that would be "<tt>!'a</tt>" followed
by "sort." All of the lines of text would be fed to the
filter, and anything returned by the filter would replace them
in my text). To read the output of some simple command under
'<tt>vi</tt>' I just type "<tt>[Esc]:r!</tt>" followed by the command. Any
output from such a command is inserted into my text.
</blockquote>
<blockquote>There are similar features in '<tt>emacs</tt>' (just use <tt>C-u</tt>,
<tt>M-|</tt> <em>[That's C for "ctrl" key, M for "Meta" usually meaning the Alt key,
in case yo're not familiar with Emacs documentation -- Heather]</em> to
pipe a block through a filter, and <tt>C-u</tt>, <tt>M-!</tt> to read input
from a command --- I have those bound to simpler commands like
"<tt>[F3]!</tt>" in my startup files).
</blockquote>
<blockquote>Those examples are "power users tricks" --- but the point out
something more important. Many Unix/Linux commands
autommatically and transparently use other programs in their
normal operation. Thus you can type the command:
</blockquote>
<blockquote><blockquote><code>tar -tzf foo.tar.gz
</code></blockquote></blockquote>
<blockquote>... and the "<tt>tar</tt>" (tape archiver) will transparently
decompress the .gz file using '<tt>gzip -d</tt>' while it extracts the
"table of contents" (<tt>-t</tt>) from it. Similarly I can type a
command like:
</blockquote>
<blockquote><blockquote><code>tar cf otherhost:/home/myhome/new.tar ./*
</code></blockquote></blockquote>
<blockquote>... to create a "<tt>new.tar</tt>" file on a different system
(<tt>tar</tt> will transparently call the '<tt>rsh</tt>' command to let me do
that --- assuming that I have set up the permissions and security to
allow it --- in other words, assuming that my security if very lax).
</blockquote>
<blockquote>More obvious examples show up in most mail programs and
newsreaders under Unix. Most of them (elm, pine, tin, trn)
don't implement text editing functions. They pass your
replies, compositions, and other texts to your preferred
editor.
</blockquote>
<blockquote>Under DOS/Windows every mail package, newsreader and many
other applications implement some cheesy little "editing mode"
(or screen/dialog) -- each with its own quirks and none with
as much power or flexibility as the old '<tt>ed</tt>' (Unix line
editor).
</blockquote>
<blockquote>If you installed Linux to learn about it --- then get out
there and learn about the commands you've installed. Try this
series of commands:
</blockquote>
<blockquote><blockquote><code>cd /usr/bin/; man *
</code></blockquote></blockquote>
<blockquote>--- that will bring up most of the man pages for most of the
commands on your system (one at a time --- hit "<tt>q</tt>" then
"<tt>Ctrl-C</tt>" to break out). Many of them are little tools,
intended to be use for a small part of your overall work.
</blockquote>
<blockquote>On a couple of my systems I have over 2200 commands available.
(From bash you can quickly find out how many commands are on
your <tt>PATH</tt> by just tapping on the <tt>[Tab]</tt> key a couple of quick
times to get a warning message like: "<tt>Display all 2209
possibilities? (y or n)</tt>").
</blockquote>
<blockquote>Some are as simple as '<tt>cat</tt>' (concatenate one or more file
streams into standard output) and '<tt>echo</tt>' (print a bit of text
on "stdout").
</blockquote>
<blockquote>Others are as complex as Perl, C, and emacs. GNU emacs and
Xemacs are complete programming and applications environments
--- with hundreds of packages and about 1800 user accessible
commands (a quick way to find this is to type "<tt>M-x</tt>" and then
use the same double-tap on the <tt>[Tab]</tt> key, switch buffers and
count the number of entries in the "<EM>Completions</EM>" buffer that
pops up --- which is easier if you have your status line
displaying the line count).
</blockquote>
<blockquote>I think there are about 1000 functions (system calls, stdio
and stdlib, etc) in a standard C programming package, and
there are several hundred in Perl and maybe one or two hundred
in awk. Then there's othe programming languages like TCL,
expect, Python, etc). Luckily many of these overlap and are
essentially "dialects" of a common set of "Unix conventions"
There's also quite a bit of overlap and duplication among
these.
</blockquote>
<blockquote>To get some idea of what's available for Linux, browse
around on Freshmeat
(<A HREF="http://www.freshmeat.org">http://www.freshmeat.org</A>) for
about a week. Note that those daily changes are new
releases and updates to these programs. Also take a
look at the home site for the LDP (Linux Documentation Project)
<A HREF="http://sunsite.unc.edu/LDP">http://sunsite.unc.edu/LDP</A>.
Then follow their link to one of the Linux Apps home pages:
<A HREF="http://www.linuxapps.com/">http://www.linuxapps.com/</A>
and then round out your tour with visits to Linas Vepstas'
page: <A HREF="http://www.linas.org/linux/">http://www.linas.org/linux/</A>
and Christopher B. Browne's pages:
<A HREF="http://www.hex.net/~cbrowne/">http://www.hex.net/~cbbrowne/</A>
</blockquote>
<blockquote>Those should give you a pretty good idea of what applications
are out there.
</blockquote>
<blockquote>Also get into Netnews and subscribe to
<a href="news://comp.os.linux.announce/">comp.os.linux.announce</a>.
</blockquote>
<blockquote>
<em><font color="navy">
&gt; You can get the DosEmu program, it emulates dos and can even run
<br>&gt; windows 3.11(unofficially) so theoretically you could run office 4.2
<br>&gt; or less on it but that's a stretch. However it is still in
<br>&gt; development(just like linux) and eventually may officially run
<br>&gt; win3.11. There is no support for win95/98 apps that I know of, do to
<br>&gt; the structure of the OS it would require <em>alot</em> of time to emulate
<br>&gt; it in all of its instability and glory. Hope that helped. reds
</font></em>
</blockquote>
<blockquote>
<em><font color="navy">
If you really want to do it, look for an app called BOSCH (I think).
With it you can run WIndows 95 (Probably 98 too) from Linux. I know
that they have the opposite too. A version to run Linux from a
Windows 95 box (I wouldn't recommend it).
</font></em>
</blockquote>
<blockquote>
<em><font color="navy">
cheers,
<br>Raul Dias
</font></em>
</blockquote>
<blockquote>The name is "Bochs" and it's at:
</blockquote>
<blockquote>
<dl><dt>The Bochs Software Company
<dd><A HREF="http://std.world.com/~bochs/">http://std.world.com/~bochs/</A>
<br>FTP site: <A HREF="ftp://ftp.std.com/pub/bochs"
>ftp://ftp.std.com/pub/bochs</A>
</dl>
</blockquote>
<blockquote>This implements a virtual PC under Linux or other
forms of Unix (it's shareware distributed sources).
There is also, as Raul says, a port to Win32S that allows
one to run Linux under Win '95 or NT!
</blockquote>
<blockquote>I've never run it --- but I've heard that it is pretty
slow.
</blockquote>
<blockquote>dosemu purportedly works for some Windows 3.1 programs
--- and I know it works find with many DOS programs
(use the "alphas" --- the betas are old and less functional).
</blockquote>
<blockquote>There's also WABI, a commercial package developed by
Sun and licensed to <A HREF="http://www.caldera.com">Caldera</A>;
(the sole distributor of the Linux port). This is also limited to Windows 3.1.
Search around at <A HREF="http://www.caldera.com">http://www.caldera.com</A>
for details on that. (It, like Bochs and dosemu, requires that you install
the copy of Windows that you intended to run
</blockquote>
<blockquote>Finally there's WINE (Wine Is Not an Emulator, or WINdows
emulator --- depending on who you ask). WINE is an ongoing
attempt to implement a full set of the MS Windows API's libraries
and DLL's sufficient to run a typical Windows application
without requiring any Microsoft code on the system.
You can read more about it at:
<A HREF="http://www.winehq.com">http://www.winehq.com</A>.
</blockquote>
<blockquote>Another approach that might be amusing is to buy a copy
of Executor (a Mac emulator for Linux) and try to run
the Mac version of MS Office under that.
</blockquote>
<blockquote>I personally these these approaches are silly and worthless
except for the most casual use and (for the amusement and
research value of those that enjoy that sort of thing).
</blockquote>
<!-- end body -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 1998, James T. Dennis <BR>
Published in <I>Linux Gazette</I> Issue 32 September 1998</H5>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<table width="98%"><tr valign="center" align="center">
<td rowspan="3"><A HREF="./lg_answer32.html"><IMG
SRC="../gx/dennis/answernew.gif"
ALT="[ Answer Guy Index ]"></A></td>
<td><A HREF="tag_phreak.html">phreak</A>
<td><A HREF="tag_abandon.html">abandon</A>
<td><A HREF="tag_javaterm.html">javaterm</A>
<td><A HREF="tag_BBS.html">BBS</A>
<td><A HREF="tag_flaws.html">flaws</A>
<td><A HREF="tag_doslinux.html">doslinux</A>
<td><A HREF="tag_resume.html">resume</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_softwindows.html">softwindows</A>
<td><A HREF="tag_convert.html">convert</A>
<td><A HREF="tag_apache.html">apache</A>
<td><A HREF="tag_emulate.html">emulate</A>
<td><A HREF="tag_database.html">database</A>
<td><A HREF="tag_distrib.html">distrib</A>
<td><A HREF="tag_proxy.html">proxy</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_disable.html">disable</A>
<td><A HREF="tag_DVI.html">DVI</A>
<td><A HREF="tag_superblock.html">superblock</A>
<td><A HREF="tag_serial.html">serial</A>
<td><A HREF="tag_permission.html">permission</A>
<td><A HREF="tag_detach.html">detach</A>
<td><A HREF="tag_cdr.html">cdr</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_rs422.html">rs422</A>
<td><A HREF="tag_modem.html">modem</A>
<td><A HREF="tag_notfound.html">notfound</A>
<td><A HREF="tag_tuning.html">tuning</A>
<td><A HREF="tag_libc5.html">libc5</A>
<td><A HREF="tag_startup.html">startup</A>
<td><A HREF="tag_clock.html">clock</A>
<td><A HREF="tag_ping.html">ping</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_accounts.html">accounts</A>
<td><A HREF="tag_lilo.html">lilo</A>
<td><A HREF="tag_NDS.html">NDS</A>
<td><A HREF="tag_95slow.html">95slow</A>
<td><A HREF="tag_nonlinux.html">nonlinux</A>
<td><A HREF="tag_progenv.html">progenv</A>
<td><A HREF="tag_cluster.html">cluster</A>
<td><A HREF="tag_ftpd.html">ftpd</A>
</tr></table>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif"
ALT="[ Table Of Contents ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ Front Page ]"></A>
<A HREF="lg_bytes32.html"><IMG SRC="../gx/back2.gif"
ALT="[ Previous Section ]"></A>
<A HREF="./stemen.html"><IMG SRC="../gx/fwd.gif"
ALT="[ Next Section ]"></A>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
</body>
</html>
<!--endcut ========================================================= -->