Computer Corner #81, Part 2, by Bill Kibler

The Move to Linux


This article started out as an email article which is why the format is
slightly odd.  I plan on converting the TCJ/DIBs BBS to Linux one of
these days (in my spare time) and I keep on asking Bill about
Unix/Linux. We felt we ought to publish it for everyone.  

More Power

Notes on upgrading to Linux

In a recent Computer Corner, I discussed moving from NT back to DOS or
ahead to Linux. I was rather unhappy with NT's poor performance,
especially items like crashing often or incredibly poor speed when using
DOS boxes. Since I do more DOS type operations than windows it seemed
that maybe going back to DOS might be an appropriate change. However I
use Unix at work and have come to like having many terminal screens open
and being able to cut and paste between text screens and so changing to
linux sounds better. It will also give me the chance to test how well
linux does DOS and Windows (which it can).

I had NT up and running, but tried to do my last article using PageMaker
5 and found several functions to NOT work correctly. I use version 6.5
on a NT station at work and was a bit surprised to see the difference. I
think it has to do with changes to NT over Win3.1 API interfaces. The
fact that it was different - sort of pushed me over the edge. For me
that was the last I wanted anything to do with NT. So next up was
backing off all the needed files and changing over to linux.

In my setup, I already have a linux server running with a very large
drive. It uses samba and thus works very well as remote DOS file system
to save files off to. I started copying files over and ran into a few
problems. Linux worked just fine, but first the NT DOS box locked up
while trying to delete subdirectories that had been transferred. It
ended up sending a prompt message to the printer, which I had to turn
off to stop printing even after closing the DOS box.

After dumping my D: and E: partitions, I tried to dump the main or C:
drive. I copied about ten files then hit a protected file which stopped
everything. The swap or pagefile.sys can not be copied, and thus so much
for backing up a drive with it. I thought I could get around this by
changing the configuration setup and move the pagefile to one of my
other drives, and then tried, just to see how many other files will stop
the backup. It didn't work since changing the pagefile location doesn't
remove the old pagefile, which can leave an unused 70meg file that can't
be deleted! So I just fdisk'd all away after saving some of the
directories one at a time.

This is of course one of the other reason I hate NT and Win95, as I was
logged in as administrator and as such should be able to do anything I
want or need to do. But no, Microsoft knows better and will not let you
do many things that most expert users find necessary to do. As part of
this ongoing discussion I will explain how to do things in Unix or linux
world. This whole topic of who has control is a great place to start
explaining things.

In the Microsoft world, they know better than even the administators. In
Unix the administrator is who is in charge, whether or not they know
what they are doing. It is a two edged sword, you have full control of
everything and can change or do anything - including trashing or erasing
the whole file system. For those of us who have spent more than a few
years working on systems, this full control is absolutely necessary if
you are to properly maintain your system. Many times I have had
programs, users, and just power failures cause problems that being root
solved.

What is "root" you say. In Unix the altimate power user is "root." This
person or user has full control over the system. With this power comes
the abiltiy to fix anything, setup new users, erase any files, restore
file systems, and just be in charge. This also explains why all the
manuals are very clear about making sure you log in as a normal user
without root access. That way if you make a mistake, the system levels
of protection will prevent a major disaster. Since "levels of
protection" is a whole topic or article (to be done later), users
normally can see or read system files, but not write or erase them (you
have flags associated with all files controling who can do what with the
file).

To bring this start to an end, what will have happen under linux when it
finds a protected file? It skips it. A very simple solution to a common
problem. If I don't have authority to view the file, I can't copy it
either. But copy will just step over that file and continue on, which is
what makes more sense and what I wanted to happen.

>From here I will blow away NT and MSDOS for good and move on to linux
as a power user. Stay tuned as I keep you posted on my search for a
better platform and teach you a few things about linux or Unix.

Bill.

P.S.

After talking to Dave at TCJ he asked about the cutting and pasting
between terminals that I mentioned in the first paragraph. First I need
to make sure you understand that the reference is to Xwindows term
sessions (mostly). These term sessions are like DOS boxes where you are
running a terminal process against the host system. You have a screen or
box or window that looks and feels like a terminal, in fact you can even
make it emulate your favorite terminal.

These are all part of the Xwindows feature, which can be found on all
the releases of linux. You must install the X windows server for your
hardware, and there are plenty of help files and utilities for that
(more later). When you boot up linux, you are given a prompt >login:
from a terminal session. After logging you in, you start your X session
or can have it be started automatically as part of the login process.
One of the ways is to run startx and there are others depending on which
X server you have. Simply put, X is like windows on a PC only a bit more
standardized and can work over a network not just on your physical PC
(much more on X later).

Lets take the situation where you have a very long path name to some
file. In a NT DOS box you must type this in by hand, each character
without mistake. Often that can be very hard. In Xwindows, you might
have several term windows open, and one of which has this 60 character
path name. No problem, move the mouse to the window with the path, hit
left button and drag down the path name highlighting it.  Move the
pointer to the other term session, type "cd " then hit the middle button
or both left and right at same time, and the highlighted text pops in
place. Simple, straight forward and the same whether or not it is a
program or a simple term session.

So I tried to do this on NT and at first it couldn't be done. But I
tried a few other things and discovered the pull down menu in the
corner. This has the resize, edit, properties options. You select edit
and see "mark" which you can click on. Now you can mark the text you
want, and hit return which puts the test in the clipboard buffer. You
then can go to another DOS box, program, another place in the screen and
select the location to put it and select the pull down in the corner if
it is a DOS box (no hot key for paste in DOS box) and the string will be
pasted.

So not only are DOS boxes in NT slow, but cutting and pasting is almost
useless. Now we could say they want it that way, but the point is, in
linux or Unix the idea is a terminal session is still the fastest and
easiest way to enter data and handle lots of normal items. So the
terminal sessions work very well and are easy to use. Most Unix users
have several terminal sessions open at once, cutting and pasting between
them, quickly and effortlessly. I almost never use graphic oriented
programs and thus anything that must be used graphically, by that I mean
only by using a mouse, is not very productive for me.

In my column I mentioned that I like SPE, a professional editor. One of
the reasons I like this program is it's abiltiy to cut and paste from
text file to file without using a mouse (I have mine set up to use same
keys as Wordstar). After using Unix for some time, I have found the use
of the mouse for selecting just the text you need an exceptable
compromise and almost as good as using my SPE which I keep planning on
making a version for use under linux.

I have loaded DOSEMU or the DOS emulator on my linux system (actually
was there all along, just needed setting up) and given it a try, with
SPE no less. SPE worked just fine and I was able to cut and paste
between screens. Now I tried this in Xwindows, then tried it with a
regular terminal or VC for virtual console.

Linux has 6 virtual consoles (not Xwindows, but keyboard based terminals
- think of them as actual terminals - only no serial cables here.. and
each can be logged into as a different user as well ) you use these
terminals simply by doing an alt-f2 or f3 to f6. What you have is
multiple sessions or terminals available at all times. The VC's are a
bit like starting Xterm session in Xwindows, and in fact a program
called "gpm" is suppose to allow you to cut and paste in VC's.

So far I know DOSEMU works a lot like OS2's DOS function in which you
have a virtual PC platform, and must load the DOS files you want to run.
If you do a DOS -A, it will boot the operating system that is on the
disk in the A drive. A configuration file controls the normal DOS
parameters and what file name you want loaded. You can load an entire
hard drive image, much like myz80 does. I look forward to playing with
the option and will keep you posted as I test more programs.

bdk.


Kibler Electronics, PO Box 535, Lincoln, CA 95648-0535, USA.
Email: bill@kiblerelectronics.com
Copyright © 1996,1997,1998, Kibler Electronics. 7/5/98