[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Newbie comments & queries

On Thu, Nov 01, 2001 at 02:51:46PM +0200, Ian Balchin wrote:
| Hi, 
| A progress report. 
| I will stay in the console mode as suggested by Karsten. So no 
| more queries on Xfree at the moment. 
| > On Tue, Oct 30, 2001 at 10:17:34PM +0200, Ian Balchin wrote:
| > > device = /dev/ttys0 as now have a plain serial 2-button on COM1
| > > type=ms repeat_type=ms3  (or raw)
| > 
| > It is case sensitive. You probably want /dev/ttyS0 (tee, tee, why,
| > capital ess, zero)
| > 
| Right....... must get used to this case business. 
| 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 ( the '$' indicates a user's shell prompt ) :

$ ls -ld /usr/doc/* | head
lrwxrwxrwx    1 root     root           19 Oct 23 18:39 /usr/doc/aalib1 -> ../share/doc/aalib1/
lrwxrwxrwx    1 root     root           18 Nov  1 21:00 /usr/doc/abook -> ../share/doc/abook/
lrwxrwxrwx    1 root     root           21 Sep 23 16:55 /usr/doc/acroread -> ../share/doc/acroread/
lrwxrwxrwx    1 root     root           20 Sep 29 20:10 /usr/doc/adduser -> ../share/doc/adduser/
drwxr-xr-x    2 root     root         4096 Sep 21 17:38 /usr/doc/ae/
lrwxrwxrwx    1 root     root           22 Oct 16 10:22 /usr/doc/alsa-base -> ../share/doc/alsa-base/
lrwxrwxrwx    1 root     root           27 Sep 24 19:47 /usr/doc/alsaplayer-oss -> ../share/doc/alsaplayer-oss/
lrwxrwxrwx    1 root     root           25 Oct  5 15:42 /usr/doc/am-utils-doc -> ../share/doc/am-utils-doc/
lrwxrwxrwx    1 root     root           16 Sep 24 19:28 /usr/doc/ant -> ../share/doc/ant/
lrwxrwxrwx    1 root     root           21 Sep 23 17:34 /usr/doc/antiword -> ../share/doc/antiword/

$ ls -ld /usr/doc/* | grep -v -- "->"
drwxr-xr-x    2 root     root         4096 Sep 21 17:38 /usr/doc/ae/
drwxr-xr-x    3 root     root         4096 Sep 23 17:02 /usr/doc/gdb/
drwxr-xr-x    2 root     root         4096 Sep 23 10:19 /usr/doc/sash/

This is intended to show that all contents (except for ae, gdb, and
sash) of /usr/doc simply point to /usr/share/doc.  If you get rid of
/usr/share/doc then you will have dangling symlinks and almost no

( BTW, why does ae, gdb, and sash put their docs in /usr/doc and not
    /usr/share/doc?  Is this a packaging bug?  (woody system) )

| Well last night I got the ms mouse going nicely, corrected 
| gpm.conf, and a great moment of joy as it floated across the 
| screen in mc (well, the cursor, not the mouse itself). 


| Then I wrote a 'hello world' file and following instructions in 
| the howto actually got it to print out.  Oh frabjous joy! I was so 
| chuffed that I rushed out the back door to shout the good news to 
| my attractive neighbor Carmen, but she was nowhere to be seen. 
| Yesterday I could not spell linux guru, now I are one! 

Just curious (for below), was this using 'cat' or 'lpr'?
| 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? 

If you have X you can get some GUI-based WYSIWYG word processors.
These include AbiWord, KWord and StarOffice.  Otherwise, how will you
get WYSIWYG?  

LaTeX is an excellent typesetting package for TeX that can create
really beautiful documents.  I have using LaTeX a lot recently and now
that I understand it I really like it.  Writing a LaTeX document is
much like programming, though.  Being a programmer, I like this :-).

A LaTeX document is just a plain text file that follows certain rules.
To create the file, just use your favorite editor.  I like vim (gvim
if I have X), but some prefer emacs or xemacs.  Both of these are very
powerful editors -- much more powerful than, say, MS Word or
WordPerfect.  True, you don't get to see all sorts of fancy images and
fonts, etc, in the editor, but what you do get is a lot of powerful
commands to make editing text quick and easy.  Both vim and emacs have
a feature called "syntax highlighting".  They can highlight various
syntactical portions of a text file with different colors so that the
structure of the text file is easier to visualize.  Vim comes with
highlighting rules for many programming languages (including C, C++,
Java, sh, Python, Perl, Lisp) and many markup languages (including
HTML, XML, and LaTeX).  Install "vim" and "vim-rt" packages.  In the
file ~/.vimrc put

    source /etc/vimrc
    syntax on

I will admit that learning LaTeX is no easy task.  It is a bit
different than other typesetting (word processing) systems I've used
before (I learned MS Word and PowerPoint by myself with no docs 8th
grade) but I would not go back now that I am familiar with it.  The
best part is I can use vim to write my papers.  For a start, search on
the web for the "Not So Short Guide To LaTeX".  (It may have "Intro"
instead of "Guide" in the title)

| Tonight I must follow the instructions from Paolo and see if I can 
| get the.gz files into a format that can be printed.  Is there no 
| way of printing direct from this format, after all they can be 
| read.  I can experiment with something like zcat file > /dev/my 
| printerwhateveritiscalled 

You can use 

    $ zcat <compressed text file> > /dev/lp0

to print the docs.  This requires, though, that the user have write
permission on the device file _and_ that nothing else is currently
using the device.

As you can imagine, the second condition is difficult to ensure in a
multi-user environment, or even if you want to print several long
documents at once.  This is why spooling software was developed.

| I will read the print howtos, and see if any of the alternatives 
| look better then the default lpr.  Command line printing went out 
| on dos a decade ago, what gives? Do applications allow you to 
| print from them direct? Even mc does not have a Print command in 
| its menus which suprises me. There must be a reason for this 
| route. 
There are 2 main print spooling systems I am aware of -- lpd and
cupsd.  I use CUPS and I really like it  (packages: cupsys
cupsys-client cupsys-bsd).  Both systems use client software (lpr or
lp) to submit print jobs to the spooler.

As you learn more about Unix you will see that a Unix shell (command
line) is extremely powerful.  DOS is, IMO, a sorry excuse for a
shell-wannabe.  The beauty of unix shells is that you can use pipes
and filters to combine various commands to do complex stuff really
easily.  I've seen a quote in someone's sig that I like (paraphrased) :

    A GUI makes simple operations simple and complex operations

Another point with unix programs (at least most of them, and all the
ones made by Thompson, Ritchie and Kernighan) : they follow the
philosophy of "do one thing and do it well".  mc is a file/directory
management program.  It does file/directory management.  It doesn't
have printing because that is not it's job.  You can easily run
"lpr <file>" so there is no need for mc to duplicate that
responsibility.  So you say : "but I want to print the directory
listing, that isn't in a file".  This is where pipes and filters come
in :
    $ ls | lpr

will print the listing of the current directory.  You can stick some
grep commands in the middle there if you want to include or exclude
files whose name matches certain patterns (see my commands at the
beginning of this message for some examples).

When you get to X and see programs like galeon (web browser) and
gnome-gv (PS/PDF viewer) they have print support.  The reason is that
HTML (and images) or PS/PDF are formats that need to be rendered
before they can be sent to the printer.  When you click on the
File->Print menu item a dialog pops up that asks you various things
including what print command to use.  This is another example of the
power of pipes and filters.  Galeon doesn't need to know a thing about
what printers I have, I tell it to use
"lp -d selab_1150 -onumber-up=2" as the print command and it prints 2
pages per sheet of paper on the printer named 'selab_1150' (at
school).  Galeon just send the postscript code to lp via a pipe and lp
handles filtering it to be 2-up and spools it to the printer.  (the
n-up filtering is a part of the CUPS system)
| 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? 
| Is there a command like the dos "mem /c /p" or something that will 
| indicate resource useage? 

$ top

| As I read between the lines, some of the stuff got compiled into 
| the kernel at install time (like lp). Some stuff is configured to 
| be loaded as modules when booting up. Modules can be added and 
| subtracted and are installed seperately from the kernel. I presume 
| that they are listed for processing seperately in a .conf file 
| somewhere. Please tell. 

The modules loaded at boot time are listed in /etc/modules, one per
line.  This was created by modconf during your install.  The modules
and options on the system are listed in /etc/modules.conf.  This is a
long file that is generated from files in /etc/modutils/.  Much of the
stuff there is probably not relevant to your system, but they are
reasonable settings and are useful for some systems.  If you have an
ethernet card, for example, you would put the line "alias eth0
<driver_name>" in a file in /etc/modutils/ and run 'update-modules'
and the next time you tried to use the card (eth0) the kernel would
know which module to load to drive it.

| 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. 

Awesome, isn't it.?  Martin (a member of this list) has some boxes
that have been up for years (3?) without a reboot!

| Still, I suppose we should not compare a linux console to a
| windowing environment, I see plenty of hassle-posts starting with X. 

X is a bit complicated.  It can be complex to configure it, and once
you have it upgrading it can be a pain too.  Upgrading the fonts can
cause something to change and the fonts look ugly.  However, X is
still quite stable once you have it running.  I've had a machine
running (with X) for weeks with no reboots.
| 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! 

If you have access to a printer with plenty of paper and ink/toner you
can print out the HOWTOs from linuxdoc.org to be able to read them
offline or without a gui.  (BTW, 'links' is a good text-based web
browser)  This is what I usually do.  The problem with Linux or
programming books is they tend to become outdated rather quickly.
| I will be back.

Good :-).

|     Ian Balchin
|     Grahamstown, South Africa.

What does the .za in your domain stand for?


Reply to: