"Linux Gazette...making Linux just a little more fun!"


The Answer Guy


By James T. Dennis, linux-questions-only@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?)Virtual System Emulator for Linux and Why NOT to Use Them

From Jeff on the L.U.S.T List on 20 Aug 1998

Now that I have LINUX installed on a machine, the question becomes what can I do with it?

I've heard there is an application that will allow me to run my standard windows programs (office, etc), anyone know anything about that?

Jeff

(!)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:
Installing Linux in the hopes of running your Windows/Office programs is certainly misguided if you intend to get any "normal" work done.
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?
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 choices. These applications are available under a few operating systems.
However, with Microsoft Office you only have two (real) choices: MS Windows, or MacOS.
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).
I personally think it's silly to install an OS and then 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?"
(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").
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.
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.
Under Windows there is essentially one 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.
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 IBM, Xerox, and AT&T. However this is not a history lesson --- which is good since I don't have textbook summaries of those cases handy.
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 'sc' or 'slsc' the "spreadsheet calculator" and the "SLang version of 'sc'").
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:
% 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}
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.
With that I can simply run a command like:
latex myletter.tex
... to typeset it and either print the resulting "dvi" file or run the 'dvips' command to convert it to PostScript and print that (even on non-PostScript printers).
Note that the letters are typeset --- with kerning, leading, etc. I don't have to concern myself with the details about line length, pagination, etc. The \vfill 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).
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:
\job {Big Former Employer} {Chief Bottle Washer}

{Feb, 29, 1931 --- May 1, 1942}
... 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 "\hfill" to fill these lines).
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 \job.
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 more work for themselves than they would by using a database, or using a "big text file" (say, tab and line delimited).
Under Unix it is more common to put these sorts of things in a text file and use the many text processing tools (sort, diff, cut, paste, join, grep, awk, perl, ... ) to work with them.
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.
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 'sort' --- 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).
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:
sort file > file.sorted
... 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).
I can sort that with a command like:
sort +2n +0M +1n
... 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).
It's the same sort utility --- and it has lots 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).
Under Unix it's also easy to use programs with 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).
It is less well known but equally handy to see how the dominant Unix/Linux editors ('vi' and 'emacs') allow one to interface with "standard" Unix commands and filters.
Under 'vi' I can mark a line in my text ("[Esc]ma" to set the "a" mark) search for an arbitrary regular expression ("/regex[Enter]") and then I can filter that block of text (from my cursor to the mark) through an arbitrary Unix command (such as 'sort') using just 3 or 4 keystrokes (plus the command's name). (In my example that would be "!'a" 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 'vi' I just type "[Esc]:r!" followed by the command. Any output from such a command is inserted into my text.
There are similar features in 'emacs' (just use C-u, M-| [That's C for "ctrl" key, M for "Meta" usually meaning the Alt key, in case yo're not familiar with Emacs documentation -- Heather] to pipe a block through a filter, and C-u, M-! to read input from a command --- I have those bound to simpler commands like "[F3]!" in my startup files).
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:
tar -tzf foo.tar.gz
... and the "tar" (tape archiver) will transparently decompress the .gz file using 'gzip -d' while it extracts the "table of contents" (-t) from it. Similarly I can type a command like:
tar cf otherhost:/home/myhome/new.tar ./*
... to create a "new.tar" file on a different system (tar will transparently call the 'rsh' 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).
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.
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 'ed' (Unix line editor).
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:
cd /usr/bin/; man *
--- that will bring up most of the man pages for most of the commands on your system (one at a time --- hit "q" then "Ctrl-C" to break out). Many of them are little tools, intended to be use for a small part of your overall work.
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 PATH by just tapping on the [Tab] key a couple of quick times to get a warning message like: "Display all 2209 possibilities? (y or n)").
Some are as simple as 'cat' (concatenate one or more file streams into standard output) and 'echo' (print a bit of text on "stdout").
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 "M-x" and then use the same double-tap on the [Tab] key, switch buffers and count the number of entries in the "Completions" buffer that pops up --- which is easier if you have your status line displaying the line count).
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.
To get some idea of what's available for Linux, browse around on Freshmeat (http://www.freshmeat.org) 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) http://sunsite.unc.edu/LDP. Then follow their link to one of the Linux Apps home pages: http://www.linuxapps.com/ and then round out your tour with visits to Linas Vepstas' page: http://www.linas.org/linux/ and Christopher B. Browne's pages: http://www.hex.net/~cbbrowne/
Those should give you a pretty good idea of what applications are out there.
Also get into Netnews and subscribe to comp.os.linux.announce.
> You can get the DosEmu program, it emulates dos and can even run
> windows 3.11(unofficially) so theoretically you could run office 4.2
> or less on it but that's a stretch. However it is still in
> development(just like linux) and eventually may officially run
> win3.11. There is no support for win95/98 apps that I know of, do to
> the structure of the OS it would require alot of time to emulate
> it in all of its instability and glory. Hope that helped. reds
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).
cheers,
Raul Dias
The name is "Bochs" and it's at:
The Bochs Software Company
http://std.world.com/~bochs/
FTP site: ftp://ftp.std.com/pub/bochs
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!
I've never run it --- but I've heard that it is pretty slow.
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).
There's also WABI, a commercial package developed by Sun and licensed to Caldera; (the sole distributor of the Linux port). This is also limited to Windows 3.1. Search around at http://www.caldera.com for details on that. (It, like Bochs and dosemu, requires that you install the copy of Windows that you intended to run
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: http://www.winehq.com.
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.
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).


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 32 September 1998


[ Answer Guy Index ] phreak abandon javaterm BBS flaws doslinux resume
softwindows convert apache emulate database distrib proxy
disable DVI superblock serial permission detach cdr
rs422 modem notfound tuning libc5 startup clock ping
accounts lilo NDS 95slow nonlinux progenv cluster ftpd


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]