Re: Newbie comments & queries
On Thu, Nov 01, 2001 at 02:51:46PM +0200, Ian Balchin wrote:
> Brenda, I did install the newbie help files, now it would be nice
> to be able to turn some of them into hard copy. I note that the
> files in /usr/doc are the same as in /usr/share/doc (writing this
> from memory, hey) except that the former seems to catch the
> documentation packages when you install something new (like I did
> Joe last night). So can I dump the latter?
No, as explained by the other poster. I think /usr/doc is
there for historical reasons, and /usr/share/doc is the
new "right location". You can put a link from /usr/doc
to /usr/share/doc (as is done for the other packages):
$ cp hello.file /usr/share/doc
$ ln -s /usr/share/doc/hello.file /usr/doc/hello.file
and your other software will find it.
It seems the packages you installed (like joe) are installing
their docs in the wrong place. Don't worry about that for
now. You have many more relevant, interesting things
to learn about first! Maybe by the time you get to fixing
that on your own system, someone would have done it in the
latest distro, anyway. The next time you upgrade, it
might be automatically fixed.
> What do I use to do some word processing, like a la WordPerfect
> 5.1 ? Tex? Emacs? Short of Star Office, are we restricted to
> 'editors' which in my terminology mean text-only, no bold, no
> underlining, no nothing?
I'm not sure what wysiwyg word processors are out there.
I know that WordPerfect exists for linux (it was distributed
by Corel for a while). And StarOffice, as you have found.
emacs is a text editor (or "editor" as you call it).
It has syntax highlighting (as does vim) but you can
only see the highlighting in X windows. Highlighting
applies to the file as you see it in the emacs display,
not as it is printed. (Is there syntax highlighting for
text mode emacs, using console text attributes like bold,
highlight, reversevideo, underline? --Dunno) It is meant
to help you edit the file - eg, you can see right away if
you forgot to close a quote, because all the text after
the open-quote is coloured like a string (as opposed to
I too use LaTeX. Yes it can be used on a text console (as
can emacs and vi). LaTeX is a markup language (as HTML is
a markup language). It is based on a more primitive (in the
sense of "closer to the hardware", not in the sense of
"less powerful") markup language called TeX, which is
fabulous for professional typesetting.
LaTeX basically predefines a bunch of commands for documents,
making it easy to indicate chapter headings, section
headings, headers, footers, abstracts, author, etc.
It requires one to be more disciplined in choosing a style
than something like Microsoft Word.
I find if you're not too fussy about the exact layout
of the final document (ie, if you can live with the existing
report, book, etc, layouts) then you can get stuff done
reasonably quickly. On the other hand if you just have
to have extra spaces in random places or other quirks in
your document, or even different headers and footers, or
you want a different font from the default, then you should
be prepared to spend some time on learning LaTeX and TeX.
By the way, if you can find a copy of the book: The TeX Book,
(by Knuth) grab it. It's out of print (fits your criteria :-)
and is an excellent book for TeX. I wish I could lay my
hands on one.
However most of your work should be done at the LaTeX level.
What does one do with a LaTeX source file? One runs it
through LaTeX to produce a device independent file (.dvi)
($ latex file.tex), then through a filter to make a postscript
file ($ dvips file.dvi -o file.ps) - all this of course only
if you have the tetex package (and the stuff it depends on)
installed (tetex is the linux version of LaTeX).
You can preview the ps file in a ps viewer such as ghostview
($ gv file.ps), if you have X windows running.
> I seem to have stacks of stuff loaded according to the screens
> that wizz past on bootup. What is the linux equivalent of the
> autoexec.bat file, can I rem some of this stuff out for a while?
Ah the system init files. Well...
Linux systems have a lot of initialisation to do. So there are
a few files. I think the main one is /etc/inittab. Then
after that there are the init scripts in /etc/init.d, and linked
to from /etc/rc[0123456S].d. This last file spec really means
8 different directories, named:
I wouldn't mess about in there until I read up on them:
init(8), inittab(5), update-rc.d(8), and look at
$ man init
$ man inittab
$ man update-rc.d
The files in /etc/init.d are shell scripts (like .bat files).
They would contain half of the autoexec.bat contents: the
half that is for every user.
Well that's ok for bringing up the system, now for the user
init files. Depending on what shell you are using (likely
bash for a Debian system), you have different init files.
(the following assumes bash on Debian).
When you first log in, a file called /etc/profile is run.
It is a shell script (a la autoexec.bat). It should do
stuff that only needs to be done once per login, like
set environment variables. This file is for every user
on your system. In addition to this file, each user
can have a $HOME/.profile in their home directory,
and it will also be run when they log in.
Then for every shell that is launched on your system,
a file called bash.bashrc is run. It should run
per-shell commands, such as setting aliases.
Again, each user can customise their own environment
by having a $HOME/.bashrc file in their home directory,
which will be run.
Finally, you can do some cleanup upon logout with
the .bash_logout file.
Hint: When you change any user init file (global or
per-user bashrc or profile), try to run it before you
log out. If there is something wrong with it, you will
still be logged in, and you can change the file.
Otherwise, you may be in the position of being unable
to log in, if (as a silly example) one command in the
.bashrc or .profile command is to log out.
To run a script called .profile:
It has to be executable:
$ chmod u+x .profile
Read the bash(1) man page for more info on the profile and
Read the chmod(1) man page for info on file permissions
Also, read the man(1) man page for info on the manual pages.
To comment out a line in a script, put a # at the beginning.
Actaully, everything between a # and the end of the line
is a comment, in a script, unless the # is escaped with a
backslash: \#, or unless the # is in quotes (I think).
To comment out a script in an rc?.d directory, rename it to
a name that doesn't start with S or K. (Lower-case s and k
is reputedly sufficient. Personally I haven't
tried that, I created some extra directories called
rc[0123456S].comment and I move the scripts there when I
want to comment them out. But that's overkill, caused
by my not understanding the system when I did it.)
To move (and/or rename) a file:
$ mv S20hello.file s20hello.file
$ mv rc2.d/S01hello.file rc2.comment/S01hello.file
> Is there a command like the dos "mem /c /p" or something that will
> indicate resource useage?
Another poster said "top". You can also look at the contents
of /proc/meminfo like this:
$ cat /proc/meminfo
and pstree gives a list of running processes, ordered by
which process is the parent of which other processes.
Note that the files in /proc are special files, they are a view
into the kernel memory and data structures, so don't write to
them. That is, DON'T WRITE TO THEM, unless you know what you're
> Lastly, linux has been up and running continuously (but not doing
> anything much) for some days now. Considering that my W95/8
> machine has probably never run for 24 hours without a reboot over
> the past 5 years (it locks up when it wakes up even) this is
> nothing short of amazing to me. Still, I suppose we should not
> compare a linux console to a windowing environment, I see plenty
> of hassle-posts starting with X.
Well, as the other poster said, once you figure out how to get
X going, then you're ok. It's getting to that stage that
can be iffy.
By the way, X windows and each associated window manager has
its own (constantly evolving, grrr) startup file maze that you
can look forward to :-).
> I have asked my colleagues in the out of print book trade if they
> have any linux books. Let me wait and see. it goes against the
> grain to buy a new book in my position!
It may even be possible to find out-of-print LaTeX books as
LaTeX is also pretty old, but I'd recommend a more recent one
as LaTeX is often updated, and you'd be missing some useful
info if you stuck to the old books.
Consider registering as a bone marrow donor