
Linux, Unix, /etc/
$ To set up this Linux system, do I really have to type long,
cryptic, frequently inconsistent and undocumented commands with
occasional long strings of hex digits?
# Yeah. You got a problem with that?
|
Sponsored links (requires javascript):
Linux as a Desktop OS
Nowadays, people are bombarded with pro-Linux propaganda: "Linux can do
this, Linux can do that". What is usually lacking is a clear account
of how Linux functions in everyday use, for everyday tasks. Obviously,
I can't give a universal account; but here is how Linux works for me.
My Working Environment
Terminals running shells: the quintessence of Unix. My working environment
is basically the command line shell, and a means to manage more than one
such shell at a time.
Command Line
The most important program on the system from my users-eye view is
the shell. I prefer pdksh
a public-domain implementation of the Korn Shell. This gives me command history (navigated using vi
keys, natürlich), command and file-name completion, and Bourne shell
compatibility for off-the-cuff scripting. All in all, a lot of power at
my fingertips.
Window Manager
I don't have much use for GUIs: the standard Linux VGA terminal driver
is just fine for me. On the other hand, a GUI does provide some useful
features, most notably multiple logins and cut-and-paste. Screen gives me
the best of both worlds. Up to serveral dozen (I forget the exact limit,
it's something like 40) virtual terminals on the console display, with
switching to and fro handled by a simple keystroke comamnd; a cut-and-paste
buffer (with vi keys to select text!); and many other features.
My Working Tasks
Well, it's great having the kernel source and all, but Linux wouldn't
be much use if all you could do was compile and recompile your
kernel sources. I've been using Linux for everything since 1994.
Here's what I do.
Writing
The most important aspect of a computer system for a writer is, naturally,
the support it offers for writing. The orginal Unix at Bell Labs was
first sold as a text-processing system, and powerful editors and formatters
continue to be a feature of Unix-like operating systems, including Linux.
I like to use a text editor, rather than
a word-processor to write in.
I use tried and trusted vi. Further help comes from
sed(1), awk(1), ispell(1) and a bunch of other
helpful programs. The hierarchical directory system of Unix is a
great aid in organising my work. When it's time for a hardcopy,
pr(1) and lpr(1) usually suffice.
I don't have much need for formatting beyond what fmt(1) and a few vi
macros can do. Usually, my writing is marked up in HTML, if at all.
Something I've found useful for that is the M4 macro processor, which,
in conjunction with make, RCS and sitecopy, makes maintaining a set of
HTML pages so much easier.
Lastly, I don't like the standard PC keyboard layout, and I need keys
for European languages that aren't in the standard character set.
So, I use the Linux loadkeys(8) program to remap my keyboard.
Here is my keymap file if you're interested.
Control is where it should be, there's not a CapsLock in sight, and
those useless functions keys are made to do some work.
E-mail
I run sendmail as an MTA (Mail Transport
Agent), to give me as much control over my e-mail as possible — I prefer
to read in /var/log/mail that an e-mail intended for joe.bloggs@example.com
has actually got there, rather merely that it was handed over to some
"smart host". If my ISP doesn't support batch SMTP (most don't), I can
use
Charles
Casabon's getmail
to check my POP3 mailbox(es). Now that my machine
is connected to the Net 24/7, retrieving e-mail this way isn't necessary
any more; it all comes straight to port 25. For user-side mail handling,
I think the best "MUA" (mail user agent), and I've tried a good few over
the years, is MH. I like it beacuse
rather than one monolithic application program, MH is a set of small tools
that each do one thing well — Unix philosophy
in action again.
Web browsing
I like Lynx. It runs in
a text console, and I can navigate using those old familar "vi keys".
While it isn't up to the mark with the latest "bells and whistles" such
as Javascript, I for one find these mostly get in the way, so I don't
miss them. One rather overlooked feature of lynx is the ability to launch
a local editor to edit the contents of a "text area" box. This makes using
forms to post to web logs, for example, much, much easier. Lynx cookie
handling is very flexible. SSL support is available by patching the
source. For extra flexibility in Linux web browsing, why not run your
own HTTP proxy locally? I do. This gives me the full power of apache:
the ProxyBlock statement, rewriting rules, caching, and so on.
Programming
Yes, I still get to do some coding from time to time, if you can
call little scripts coding. You can't beat /bin/sh, but I'm getting
into perl (Hey! Better late than never!),
converted by Jeffrey Friedl's excellent coverage of its support for
regular expressions in his book
Mastering Regular Expressions.
Games
The Linux SVGA library allows developers to write graphical
console applications — Linux Doom, for example. On a more serious
notes, both crafty and
GNU Chess,
to name but two, are strong opponents.
A graphical board display for Linux chess programs is provided by
Xboard. If I want to play on the Net, I just telnet over to
freechess.org: there I can either use Xboard,
or get out my real board and men and use the telnet interface.
Scheduling & Planning
Like most self-employed people, I need as much structure to my working
day as I can get. pcal allows me to generate calendars, either in a
basic format for viewing on a terminal, or in Postcript for printing.
Accounts
I'm an accountant, and consequently too boring to be of
interest.
Yes, well, nevertheless, they have to be done. My accounts are in
a custom system modified from the accounting package that comes with
/rdb. I supplement this with spreadsheets
in sc, a free Unix spreadsheet. /rdb combines plain ASCII text
files with a set of powerful relational database tools: doing things
the Unix Way.
A Note on GUIs
So far, I haven't mentioned any type of graphical user interface.
This isn't because they don't exist for Linux. Indeed, there
are plenty, all based on the Unix standard X Window System.
Although I prefer a terminal, there are times when X is handy.
On my system, therefore, I have XFree86, the free software version of X.
I use a window manager called
lwm, the Lightweight Window
Manager, minimalism incarnate in every byte of its 24k (that is not a
typo: twenty four kilobytes). Elliot
Hughes has also written two other handy little programs that put together
with lwm do everything I want as regards controlling X. "clock" displays a
simple digital clock, but, and this is the clever part, only when the mouse
pointer strays into a four-pixel region in an upper corner of the screen
(right by default). Further, you can chose to have clock execute arbitrary
programs when different mouse buttons are pressed while it is active.
For me, pressing button 1 gives me xkill, and pressing button 2 (or 1
and 3 together for us two-button mouse users) runs another enh special,
"terminator", which ends the X session. Getting this behaviour is simple.
The relevant section of .Xresources looks like this:
!clock
!clock*viewCommand:
clock*leftHanded: yes
clock*button1: xkill
clock*button2: terminator
!clock*button3:
And the end of .xinitrc looks like this:
lwm&
clock&
exec terminator daemon
What I actually do with X is fairly limited. Mozilla for occasional visits to pages that don't work under lynx
(shame!), xv for image display and manipulation (especially the
all-important daily dilbert),
xboard for playing chess on FICS or
with two strong chess programs, gnuchess and crafty, and, er,... you see,
I told you I didn't have much time for GUIs.
Paul Dunne 2003
main |
scripts |
contact |
links
Sponsored links (requires javascript):