File: clueless.html

package info (click to toggle)
lg-issue25 4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,552 kB
  • ctags: 68
  • sloc: tcl: 69; makefile: 37; sh: 4
file content (308 lines) | stat: -rw-r--r-- 12,021 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Clueless at the Prompt Issue 25</title>
</HEAD>
<body>
<!--endcut ============================================================-->

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P>
<!--===================================================================-->
<center><H2>Clueless at the Prompt</H2>
<H4>By Mike List,
<a href="mailto:troll@net-link.net">troll@net-link.net</a></H4>
</center>
<P> <HR> <P>
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>

<h4>Welcome to installment 9 of Clueless at the Prompt:</h4>

<p>
Here's this month's account of the triumphs, trials and 
tribulations that I caused myself or encountered since the last
time, and a couple tips that may come in handy and increase your 
understanding of linux.

<hr><p><h4>
*Changing Disks:</h4> If you make partitions the same size as your
previous disk's, you can simply hook up your new disk as
slave(See the documentation that comes with your new drive, or
sometimes there's a diagram on the top of the disk that shows
jumper settings to configure the disk as master, slave, or only
disk.), and use the "dd" command. You'll have to mount the old
disk first, use fdisk to set the partitions to the desired size,
then mount each partition separately, if you mount your
partitions one at a time, you'll avoid having the whole old disk
contents try to settle on your new disk.

<hr><p><h4>
*Backups:</h4> If you have any serious need of any of
the information on your old disk, I can't stress the value of
periodic backups enough. Even if you just backup the
configuration files you worked so hard to tweak to your liking,
and maybe your checking account balance, anything that you don't
have to remember or reinvent is a Good Thing(tm).
<p>
If you adopt the strategy of selective backups, you can easily
fit them on a floppy or three, rather than using a whole tape or
zipdisk to backup what you have already on your installation
media. I think that especially if you installed from a CD, the
plain vanilla install like you did the first time, can put you
back on your feet when combined with a backup of only those files
you wrote or modified, and and any special software that wasn't
included in the distribution.
 To find out what files and libraries are required to run an app,
 you can use <pre>

    ldd filename
</pre> <p>
   
Another command that you can use to find out more about files is,
strangely enough, file. File can be used as <pre>

    file filename
     
</pre><p>    
    
which will give information about other files, as well as
executables.

Yet one more helpful command is which, used like <pre>

   which executable
   
</pre> <p>   
   
where executable is the command used to start the application
as in<pre>

   which makewhatis
   
 </pre><p>   
   
to find out where the executable is located, pretty handy if you
are modifying your path statement.
                  

<hr><p><h4>

*Oh did I mention backups?

</h4><p> 
I stress this because I know from experience that failing to backup your data
is an extremely stupid and easy thing to do, but since I apart from the cardiac
care unit and the nuclear reactor I don't have anything mission critical on my
box right now, I'm still too lazy to back it up. Please excercise
a little cautious computing if anyone's data needs to be secure  
<hr><p><h4>
*A little bit about FVWM configuration files(fvwm-1.x):</h4> with a
little text editting, you can configure your Xdesktop to your 
liking. FVWM-2.x uses m4 macros, which I haven't even tried to
acquaint myself with yet. FVWM is configurable in either
system.fvwmrc or a .fvwmrc in your home directory, so you can set
a consistent set of applications system-wide or change the
defaults to your idea of a convenient desktop. Most of the
possible modifications are explained in comments preceding the
line to be editted or uncommented, and if you have X applications
that aren't included in the default popups, all you have to do is
follow the examples of those already there, usually something like

<pre>
   Exec "PROGNAME"   exec progname -options &
   
</pre><p>   
   
the "&" causes the program to execute in the background, which
keeps it from monopolizing X. Note that some apps, such as
ImageMagick don't seem to want to share, and those will have to be
exec'ed without the "&". Also non-X apps can usually be run by
invoking an xterm or rxvt, in which case the titlebar can be
changed to reflect the program name, as in<pre>

 Exec  "Top" exec color_xterm -font 7x14 -T Top -n Top -e top &
   
</pre><p>

which starts a color_xterm running top. Top, in case you aren't
familiar, basically lists the amount of resources each process is
using. For more info type<pre>
  
    man top
    
</pre><p>
or better yet just type<pre>
    top
    
</pre>
<hr><p><h4>      

*Some stuff you may not hear anywhere else (so basic they forgot
to tell you):</h4> Redirecting output: you obviously can print a file
to your monitor screen, and with a little luck even to a piece of
paper via your printer, but did you know you can print a file to
another VT or serial terminal or even to another file? By using
the ">" or "<" symbols, you can do command line tricks that will
impress your friends, cure male pattern baldness and hangovers,
and make you irresistable to the opposite sex. Your mileage, as
they say, may vary, unfortunately.

<p>

Some examples:<pre>

        cat filenamehere>>anotherfile
	
</pre><p>	
 
 This one will add the contents of one file to another file, as
 in chapters 1 and 2 could be added together for reasons of
 continuity to make a fluid read that would otherwise be broken
 up by having to cat the successive chapters<pre>
 
        cat hellaracket.au >/dev/audio or /dev/dsp
	
</pre><p>	
 
 is another example of redirecting the output of a command or 
 file to somewhere other than standard output which is another
 way of saying your monitor.
 
 <p>
 
 Another feature is command line batching of commands. If you
 type several commands separated by semicolons, each command will
 execute when the previous one exits. A good example, is:<pre>
 
      make config; make dev; make clean; make zImage
      
</pre><p>      
      
 which will perform each of the steps necessary to compile a
 kernel. As soon as the first command exits or is closed, the
 next one starts  Any group of commands that you would like to run in
 succession can be done in this manner.
 
 <p>
 
 Another device you can use to your advantage with a little
 imagination is the pipe, signified by the "|" symbol. Pipe is a
 pretty good description of what it does, which is to "pipe" the
 output of one command into another command for further
 processing. One example that springs to mind is<pre>
    
    cat filename | pr -l56>/dev/lp0
    
</pre><p>    
    
 which come to think of it, is another example of redirection as
 well. The above command takes the results of the cat command
 pipes it to a filter "pr", and redirects the output to /dev/lp0
 to print a file in a reasonably attractive manner. For some of
 the options available to "pr", try<pre>
  
    man pr
    
</pre><p>     
    
 This filter is particularly useful if you find lpr to be beyond
 your present capability, as I have :(. You should be aware
 however, that this will only work as root, or with a lot of
 permission hacking, which is probably best left undone, as it can
 cause security problems if /dev/lp0 is made available to regular
 users. 
 <p>
 
 <p>
          
      
<p><hr><h4> 
 
*That terminal finally works!! What worked:</h4> If you have been
reading this column for a while, you might recall I mentioned a
vt 220 that I couldn't get working. I got impatient and got rid
of it. but sometime later I ran into a wyse 150 and decided to
try it again. This time I hit paydirt, thanks to a member of the
Kalamazoo Linux Users Group, Scott Yellig. The magic bullet was the
letter -L which was unreported in the serial HOWTO, but Scott is
pree sharp at that stuff.When used in the /etc/inittab (Slackware)
this line,<pre>
    
    s2:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
    
</pre><p>     
    
if modified to reflect the serial port used, in this case com
port 1 in DOS lingo. This line can also be used with a 8086 or
above to emulate a serial terminal, if used with the proper cable.
The proper cable, usually called a null modem, is often sold as
a serial printer cable. 
<p>

A serial terminal is a very good option when used with a Linux box
as it allows more than one user on the system at a reasonable cost
compared to buying another computer. The local university surplus
disposal has them for about $25US, and you may find them for free.
8086, 8088, and 286 boxes, which will also serve the purpose can
be gotten just as cheaply, depending on what hardware is attached.
The other thing you need is a comm program, Minicom and Kermit 
are two that spring to mind or perhaps Seyon if you're in X. I've
never used any of these programs to connect directly to another computer as a terminal
without a modem, so I don't know much about connecting with
minicom in this manner, but Kermit seems to be pretty simple in
this capacity
Another use is to kill frozen X applications. I had a Netscape bus
error problem before I got Andreas Theofilu's<b> nets </b>, 
and a terminal can be used to kill out of
control processes quite easily, by logging in and using kill or
similar(remember <b>die</b>?)command to wax it and you can regain
your X session. Nearly any non-graphical task you can do on the
console can be done on a serial terminal. One exception, virtual
terminals can be worked around to a degree by using<b>splitvt</b>
which cuts your screen into two parts and by using <pre>

   CTRL-W
   </pre>
you can switch between the upper and lower displays, and work
alternately between the two, with the added advantage of seeing
both screens at once. You can even be root on one while using a
different account on the other screen, easily cut and paste from
one editting session to another, check <b>top</b> or <b>ps</b>
or many administrative tasks that require monitoring. It ain't
<b>X </B>but it's pretty good for a text only environment.  
<center><a href="mailto:troll@net-link.net">troll@net-link.net</a><p>
  <b>See you next month!</b></center>
<!--===================================================================-->
<P> <hr> <P> 
<center><H4>Previous "Clueless at the Prompt" Columns</H4></center>
<p>
<A HREF="../issue14/clueless.html">Clueless at the Prompt #1 - February 1997</A><br>
<A HREF="../issue15/clueless.html">Clueless at the Prompt #2 - March 1997</A><br>
<A HREF="../issue16/clueless.html">Clueless at the Prompt #3 - April 1997</A><br>
<A HREF="../issue17/clueless.html">Clueless at the Prompt #4 - May 1997</A><br>
<A HREF="../issue18/clueless.html">Clueless at the Prompt #5 - June 1997</A><br>
<A HREF="../issue19/clue.html">Clueless at the Prompt #6 - July 1997</A><br>
<A HREF="../issue21/clue.html">Clueless at the Prompt #7 - September 1997</A><br>
<A HREF="../issue23/clue.html">Clueless at the Prompt #8 - December 1997</A>
<P><HR><P>
<center><H5>Copyright &copy; 1998, Mike List<BR> 
Published in Issue 25 of <I>Linux Gazette</I>, February 1998</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc25.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./dearman.html"><IMG SRC="../gx/back2.gif"
ALT=" Back"></A>
<A HREF="./pavlicek.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->