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 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318
|
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.m">
<TITLE>More 2 Cent Tips & Tricks LG #76</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P> <hr>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_mail.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue76/lg_tips.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lg_answer.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
<!-- QUICK TIPS SECTION ================================ -->
<!-- endcut ======================================================= -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.jpg">
More 2¢ Tips!</A></H1> <BR>
<!-- BEGIN tips -->
Send Linux Tips and Tricks to <A HREF="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</A></center>
</center>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips/1"
><strong>ques</strong></a>
<li><A HREF="#tips/2"
><strong>File cache...</strong></a>
<li><A HREF="#tips/3"
><strong>Answer for "getting volume label from CD".</strong></a>
<li><A HREF="#tips/4"
><strong>Compiling from source</strong></a>
<li><A HREF="#tips/5"
><strong>Automate dialing?</strong></a>
<li><A HREF="#tips/6"
><strong>Redhat 7.2 Linux firewall-Howto</strong></a>
<li><A HREF="#tips/7"
><strong>File System problem</strong></a>
<li><A HREF="#tips/8"
><strong>Quick C function lookup</strong></a>
<li><A HREF="#tips/9"
><strong>GNU</strong></a>
<li><A HREF="#tips/10"
><strong>Is there a way to check if a dial up ppp connection is REALLY up?</strong></a>
<li><A HREF="#tips/11"
><strong>large file support detection</strong></a>
<li><A HREF="#tips/12"
><strong>Linux with win2000</strong></a>
<li><A HREF="#tips/13"
><strong>Basic Newbie Question</strong></a>
<li><A HREF="#tips/14"
><strong>O'Reilly posters</strong></a>
<li><A HREF="#tips/15"
><strong>printing</strong></a>
<li><A HREF="#tips/16"
><strong>Linux rocks!</strong></a>
<li><A HREF="#tips/17"
><strong>Setting up telnet in a Linux server.</strong></a>
<li><i>Linux Journal</i>'s Weekly News Notes <a href="#tips/lj">Tech Tips</a>
<ul>
<li><A HREF="#lj/1"
><strong>ssh -n</strong></a>
<li><A HREF="#lj/2"
><strong>The simplest way to process a web form</strong></a>
<li><A HREF="#lj/3"
><strong>How to switch between several network profiles on your laptop</strong></a>
<li><A HREF="#lj/4"
><strong>Speeding up commands like "route" and "netstat"</strong></a>
<li><A HREF="#lj/5"
><strong>Very important topic: keeping your "fortune" file indexed</strong></a>
<li><A HREF="#lj/6"
><strong>Limiting the files "locate" shows</strong></a>
<li>
<A HREF="http://noframes.linuxjournal.com/subscribe/lja-sub.html"
>subscribe to <I>Linux Journal's</I> Weekly News Notes</A>
</ul>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">ques</FONT></H3>
<p>Fri, 1 Feb 2002 11:32:44 -0800
<BR>Dan Wilder (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%231%20big%20disks">The Answer Gang</a>)
<BR>asked by piyush moghe
</p>
<P><STRONG>
respected sir
<br>i have a problem with linux instalation on 20Gb or
more capacity disks,i had installed on p3,20gb hd,64
mb ram.i make 2 1Gb partition as linux native & one
200 mb as swap the instalation goes on smoothly but at
the end it gives error that first partition not lies
in 1024 cylinders what i can do to solve this problem
</STRONG></P>
<P>
Actually we're several guys, and one or more gals. If you
respect us, that's nice, but not essential.
</P>
<P>
Upgrade to current LILO. Most new distributions should
contain a LILO able to overcome the 1024 cylinder limit,
and so a newer distribution might be the easiest way
to do it.
</P>
<P>
Or, re-partition the disk so that its first partition, about 16Mb,
is mounted at <TT>/boot</TT>, second partition is swap, and the third partition
containing the remainder of the disk is mounted as <TT>/</TT>, the root
partition. The installation scripts on the distribution will
probably give you an opportunity to specify how you want
the hard drive partitioned, and that's where you do this.
</P>
<P>
Make sure your kernel boot image (usuall vmlinuz) is located
in <TT>/boot</TT>, and is referenced from <TT>/etc/lilo.conf</TT> as such.
You may have to move things around and rerun lilo after
the installation stuff completes.
</P>
<P>
Let us know how you are doing.
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">File cache...</FONT></H3>
<p>Thu, 14 Feb 2002 22:25:24 -0800
<BR>Dan Wilder (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%232%202.4%20file%20cache">dan from ssc.com</a>)
<BR>asked by Matthew Koundakjian
</P>
<P><STRONG>
Is there a way to control in a 2.4.x kernel how large the file cache can grow?
</STRONG></P>
<P><STRONG>
File cache always seems to take as much as it can and we <EM>really</EM> would
prefer to keep it low.
</STRONG></P>
<P><STRONG>
The main user is routinely running tasks upwards of 1.5GB at time and there
are times when the system thrashes and thrashes.
</STRONG></P>
<Pre><STRONG>
3:55pm up 2 days, 23:36, 19 users, load average: 0.60, 0.72, 0.75
162 processes: 160 sleeping, 2 running, 0 zombie, 0 stopped
CPU0 states: 76.0% user, 0.0% system, 0.0% nice, 23.0% idle
CPU1 states: 31.0% user, 13.0% system, 0.0% nice, 55.0% idle
Mem: 2059412K av, 2053732K used, 5680K free, 0K shrd, 41576K buff
Swap: 3072112K av, 703596K used, 2368516K free 1236900K cached
</STRONG></Pre>
<blockquote>
<P>
Big file cache is not necessarily A Bad Thing. As long as it
unloads fast when demand grows.
</P>
<P>
I'd look to other problems first.
</P>
<ol>
<li> Are you running 2.4.17 or something older and buggier? If not
2.4.17, upgrade now.
<li>
Are you running an AMD Duron or Athlon + AGP video? If so,
you'll need a kernel boot parameter to cut cache page size,
there's an interference between the way the kernel handles
DMA and the way AMD handles AGP, leading to sporadic random
cache corruption.
<li>
You're 700M into swap. That's never a Good Idea. Unless what's
swapped out is more or less permanently swapped out. If so
why are you running it? If possible, get another gig of
memory. The slowest memory is much faster than the fastest
hard drive.
</ol>
</blockquote>
<P><STRONG>
Hello Dan...
</STRONG></P>
<P><STRONG>
Thanks so much. Yes, we're running an older kernel ... mostly, 2.4.6 ...
I'll fix that.
</STRONG></P>
<P><STRONG>
As far as the swap, originally, we had no swap, but because the file cache
is so "hungry", I threw in swap as a brute force means because processes
were dying from lack of memory...
</STRONG></P>
<P><STRONG>
As it is, we run a computational fluid dynamics code that periodically dies
with no more than "broken pipe" as the error diagnostic, which, if I had to
make a W.A.G., I would assume a process died. Before, it was a LOT
worse... It was ugly when something like portmap would croak. So, lacking
any coherent solution and having unhappy users, I threw some swap in and it
seemed to help with stability tremendously.
</STRONG></P>
<P><STRONG>
But most recently, with one user process running, allocating about 1.7G,
the system was apparently thrashing horribly... very unresponsive and with
a system load on the order of 10.
</STRONG></P>
<P><STRONG>
As far as the swap versus file cache, it would seem to be silly to have a
file cache that's so large that swap starts coming into play.
</STRONG></P>
<P><STRONG>
Bye,
<br>Matt
</STRONG></P>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Answer for "getting volume label from CD".</FONT></H3>
<p>Thu, 24 Jan 2002 16:09:19 -0700
<BR>Sean Reifschneider (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%233%20cd%20label">jafo from tummy.com</a>)
<P>
The URL:
</P>
<P><BLOCKQuote>
<A HREF="../issue72/tag/2.html"
>http://www.linuxgazette.com/issue72/tag/2.html</A>
</BLOCKQuote></P>
<P>
asks the question "How do I get the volume label from a data CD", and then
the three guys go on to not provide a very good answer...
</P>
<P>
If you would like to add the following, it may be useful to other readers.
</P>
<P>
There are two problems in identifying CDs -- one is identifying a data CD,
the other is identifying an audio CD. Mr. Bray is asking specifically
about data, but it's also possible to determine a fairly unique ID for
audio CDs as well.
</P>
<P>
Data CDs are easy -- a 32-byte string is written in the ISO at offset
32808. Some systems have a program called "volname" (part of the eject
package), which can pull this data out. Otherwise, "dd" can be used:
</P>
<P><CODE>
dd if=/dev/cdrom bs=1 skip=32808 count=32
</CODE></P>
<P>
This is the volume label specified via the "-V" argument to "mkisofs" when
creating the CD image.
</P>
<P>
For audio CDs, it's (unfortunately) not as easy. The CD Digital Audio
standard does not include a location for storing CD or track identification
information. The answer for this that I've heard is that they felt it was
too hard a problem to solve initially.
</P>
<P>
While it may seem easy to add a few strings on the CD, it becomes harder
when you have to deal with an international market -- how do you make it so
that Japanese tracks can be identified, for example. Remember, this was
back in the <gasp> '80s, when Unicode wasn't common.
</P>
<P>
So, the way people go about identifying audio CDs is by generating a
signature. This signature consists of information about the length of
tracks, number of tracks, and various other information. You can then
condense this information down into a single value.
</P>
<P>
This value can then be used to submit and request more specific data about
a disc or track.
</P>
<P>
Thanks to the LinuxDoc CDROM-HOWTO for the dd command to pull this data off
the CD.
</P>
<P>
Sean
</P>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Compiling from source</FONT></H3>
<p>Fri, 1 Feb 2002 09:03:21 -0800
<BR>John Davies (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%234%20install%20from%20source">johnny5_tc from yahoo.co.uk</a>)
</p>
<P><STRONG>
Hi,
I've just read your informative article on installing
from source in this months Linux Gazette.
</STRONG></P>
<P><STRONG>
You mention that it would be good if make files has
and uninstall target and that most don't. Well, if you
have a look at Checkinstall
(<A HREF="http://asic-linux.com.mx/~izto/checkinstall-en.html"
>http://asic-linux.com.mx/~izto/checkinstall-en.html</A>)
it allows you to uninstall programs built from source.
</STRONG></P>
<P><STRONG>
What it does is to replace the "make install" command
with checkinstall. It makes a note of which files were
installed and allows you to uninstall the program
using the package management tools on your machine (in
my case dpkg). It also creates a .deb (or .rpm) so you
can install it on another machine.
</STRONG></P>
<P><STRONG>
I've played with it for a few days now and it is
extremely useful.
</STRONG></P>
<P><STRONG>
Regards
John
</STRONG></P>
<P>
John,
</P>
<P>
Thanks for that tip. I'm a moderately long-time member of
The Answer Gang, and had not heard of checkinstall before.
I often build from source, and had until now resorted to
clumsy and time-consuming expedients to manage uninstalls.
</P>
<P>
"checkinstall" is just what we need here at SSC, host of
The Answer Gang's mailing list server and The Linux Gazette's
web site.
</P>
<blockquote><font color="#1F1F1F">This is pretty much the reason that I forwarded this to TAG. I've had seven
or eight e-mails telling me me about "buildpkg", "rpm", etc.; under Debian,
I'm familiar with "alien" - but none of these deal with the real issue of
"remembering" what the "make" did. They just convert the tarball (which
often cannot be done due to layout, etc.) into RPMs or DEBs, etc. This tool
- although I have not yet had the time to check it out - sounds like a very
nice possibility, and I'm going to be looking into it.
-- Ben</font></blockquote>
<P>
Well thanks, Ben, for forwarding it.
</P>
<P>
It sounds like this tool does something like what I've been doing by hand.
After building a package, I often
</P>
<blockquote><pre> su root
script
make install
^D
</pre></blockquote>
<P>
(that's "CTRL-D", an EOT character, to log out of script)
then edit the resulting "typescript" file to build a roster of what
was installed, which I then save in an "ssc" subdirectory of the build
directory, against a day when I wish to know what was installed.
</P>
<P>
You're absolutely right about alien et al. They work from a tarball,
.deb, .rpm, etc.
</P>
<P>
However, most stock GNU packages don't even build an install tarball.
They just install directly, leaving a cryptic trail of what they
installed in the output from the "make install". Without analyzing
that output you don't even get a tarball to "alien".
</P>
<P>
There are exceptions. <A HREF="http://www.debian.org/">Debian</A>-modified source trees build the
.deb packages directly, which can then be installed. <A HREF="http://www.slackware.org/">Slackware</A>-modified
source trees build a tarball directly. No doubt <A HREF="http://www.redhat.com/">Red Hat</A> et al has
something similar ... brainfade prevents me from saying at the moment ...
</P>
<P>
All too often I find I must go directly to the original release of
some package, rather than using the distribution's source, either
because the package is not available under the appropriate distribution,
or because the distribution's package doesn't do it for us. Wrong
or broken version, etc etc etc.
</P>
<P>
If this checkinstall does what it looks like it might do, it solves
that problem of "what do you do if you've only the original source code".
-- Dan
</P>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Automate dialing?</FONT></H3>
<p>Wed, 20 Feb 2002 18:26:42 -0500
<BR>Ben Okopnik (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%235%20autodial%20ISP">The Answer Gang</a>)
<BR>asked by gagandgupta
<P><STRONG>
I want to write a program that on getting some sort of
trigger will automatically connect to the internet by
dialling the ISP's telephone number. After it has
established connection it should store the IP address
assigned to it by the ISP in a file.
</STRONG></P>
<P>
Two major hints that, together, should give you the solution:
</P>
<ol>
<li> Search the Net for "linux" and "dial-on-demand". The standard answer to
this used to be "Diald", but nowadays it's built into pppd, so reading the
man page may be an even better solution.
<li> Read "<TT>/etc/ppp/ip-up</TT>", paying special attention to "PPP_REMOTE".
</ol>
<P>
That's it. There's no deep science to it.
</P>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Redhat 7.2 Linux firewall-Howto</FONT></H3>
<p>Tue, 5 Feb 2002 22:01:56 -0800
<BR>Dan Wilder (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%236%20firewall">The Answer Gang</a>)
<br>asked by Franco Fernandes
</p>
<P><STRONG>
Hi!
</STRONG></P>
<P><STRONG>
Can anyone tell me from where can i get the Redhat 7.2 Linux firewall-Howto
download
</STRONG></P>
<P><STRONG>
Thanks & Regards
<br>Franco.F
</STRONG></P>
<P>
I don't know about a Redhat 7.2 firewall howto ... if there is
such, I'd expect to find it by searching www.redhat.com.
</P>
<P>
A generic Linux howto, now ...
</P>
<P>
<A HREF="http://www.linuxdoc.org/HOWTO/Firewall-HOWTO.html"
>http://www.linuxdoc.org/HOWTO/Firewall-HOWTO.html</A>
</P>
<P>
There's a lot of other great stuff in that same directory.
-- Dan
</P>
<BLOCKQUOTE>
Not the question you were asking - but if you want to get a basic
iptables firewall in place you could want to look at firestarter or
something similar
-- Mike E
</BLOCKQUOTE>
<!-- end 6 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">File System problem</FONT></H3>
Fri, 8 Feb 2002 11:53:32 +0000 (GMT)
<BR>Thomas Adam (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%237">The <i>LG</i> Weekend Mechanic</a>)
<BR>asked by Ben Wood
</p>
</P>
<P><STRONG><BLOCKQuote>
i require help fixing my linux hard drive, it is a
ext2 file system and
during startup it fails to pass the file system
check, it says
"Directory inode 38381, block 0, offset 0: directorty corrupted"
how do i fix it, can it be fixed?
</BLOCKQuote></STRONG></P>
<P>
You can do the following.....
</P>
<ul>
<li> Assuming that you are using Lilo as your linux
loader, then at the prompt type:
<blockquote><pre>linux init=/bin/bash root=/dev/hdxx ro
</pre></blockquote>
where "<TT>/dev/hdaxx</TT>" is the device file which points to
the root of your Linux partition (i.e. mounted "<TT>/</TT>")
(or change "linux" to the name of the stanza within
"<TT>/etc/lilo.conf</TT>" that will load Linux).
<br>
This will then put you into a single user mode, with
all the partitions mounted as read-only.
<br>
Then at the prompt, type:
<blockquote><pre>fsck -f /
</pre></blockquote>
and this should fix any errors on the drive.
<br>
Usually, any inode data is stored within the
"<TT>/Lost+Found</TT>" directory.
</ul>
<p>
If you need any help, let me (us) know.
<br>Kind Regards,
<br>Thomas Adam
</P>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Quick C function lookup</FONT></H3>
<p>Thu, 24 Jan 2002 22:24:21 -0500
<BR>Ben Okopnik (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%238">The Answer Gang</a>)
</p>
<P>
In your ".bashrc" file, add the following line:
</P>
<blockquote><pre>alias chlp="info --file libc.info.gz --node \"Function Index\" --index-search $1"
</pre></blockquote>
<P>
The next time you log in (or even open another xterm or console), you'll
have this as an alias. Call it this way:
</P>
<blockquote><pre>chlp setuid
</pre></blockquote>
<P>
to have it drill down to where the "setuid" function is defined in the
documentation. For those of you that use "vi", you can also redefine your
"man page lookup" key:
</P>
<blockquote><pre>set kp=chlp
</pre></blockquote>
<P>
Put your cursor on a function name and press 'K'; Magic Will Happen.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<!-- end 8 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">GNU</FONT></H3>
<p>Thu, 21 Feb 2002 18:25:10 -0500
<BR>Jay R. Ashworth, Chris Gianakopoulos (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%239%20GNU">The Answer Gang</a>)
<br>asked by
Rafel Burrial
</P>
<P><STRONG>
What in the hell does GNU mean?
</STRONG></P>
<P>
It's this uncommon African animal, also called a white bearded
wildebeest.
-- Jay
</P>
<BLOCKQUOTE>
In hell, it's the ...
-- Ben
</BLOCKQUOTE>
<BLOCKQUOTE><em>
I </EM>really<EM> think Ben needs to stop talking about dark things like that...
Poor Chris, who specializes in our cross-MSwin questions, got bit by a
nasty mailerdevil for that one. Just in case, I didn't print it
<img src="../gx/dennis/smily.gif" height="24" width="20" alt=":D">
-- Heather
</em></BLOCKQUOTE>
<BLOCKQUOTE>
I think if you go to (D'oh!) <A HREF="http://www.gnu.org">www.gnu.org</A>, and look at the <EM>first</EM> page
-- and I might point out that this is the <EM>first</EM> hit on Google for
'gnu' <EM>and the answer is in the frigging page title</EM> -- you'll probably
find the answer to your question.
-- Jay
</BLOCKQUOTE>
<BLOCKQUOTE>
GNU's not Unix like Unix is not Multics!!!!! !!
Ho! Ho! Ho! <laugh from down there in h*ll>
</BLOCKQUOTE>
<BLOCKQUOTE>
A day late, because I've had no mail for the last 24 hours!!
-- Chris
</BLOCKQUOTE>
<!-- end 9 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/10"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Is there a way to check if a dial up ppp connection is REALLY up?</FONT></H3>
<p>Tue, 29 Jan 2002 08:54:08 -0500
<BR>Chuck & Crystal Shepherd (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2310%20ISP%20up">cc_shep from yahoo.com</a>)
<BR>with points from Ben and John K. of The Answer Gang
</p>
<P><STRONG>
I have a linux box (RH 7.1) set up to serve as mail and internet server for
my two other home computers.
</STRONG></P>
<P><STRONG>
It is set up to dial on demand. Therefore ifconfig shows ppp0 up and
running all the time (when it is working properly)
</STRONG></P>
<P><STRONG>
I would like to be able to check the status of the modem without lifting
the telephone from it's cradle.
</STRONG></P>
<P><STRONG>
I have checked into using the lock file which can be written by pppd but
this is not very reliable when if pppd goes down unexpectantly it does not
always clean up after itself.
</STRONG></P>
<P>
I haven't done anything with "diald" in a couple of years, but doesn't it
use SLIP to do its dirty work (i.e., the PPP link you request is actually
to a local VT; "diald" feeds your PPP daemon lots of baloney and sweet talk
while it actually makes the connection behind its back)? If so, then you
could always check if the 'sl0' interface is up without tripping off the
dial-up.
-- Ben
</P>
<BLOCKQUOTE>
The querent doesn't specifically mention 'diald', which does use the slip
interface as part of its mechanism. The newer versions of pppd also
support dial on demand, and uses a different type of mechanism.
Unfortunately, I can't be too specific, as I've never set it up. I would
guess that you could simply check to see if ppp0 (assuming only one
dial-up connection active at a time) is up, much the same way as was
suggested for diald. Actually IIRC, in the case of diald, (which AFAIK,
is no longer actively supported) the slip interface goes away when the ppp
link gets established; so simply checking for a ppp interface would work
for diald as well.
-- John Karns
</BLOCKQUOTE>
<P><STRONG>
I am a big LG fan. Thanks for all the tips and advise.
</STRONG></P>
<P>
<smile> We do what we can. Good luck - let us know how it goes!
-- Ben
</P>
<P><STRONG>
Thanks for your response.
</STRONG></P>
<P><STRONG>
I think I have got my solution by using lsof <TT>/dev/ttyS1</TT>
</STRONG></P>
<P><STRONG>
(ttyS1 is my serial port)
</STRONG></P>
<P><STRONG>
It does not seem to initiate a connection and does not seem to interrupt an existing connection.
</STRONG></P>
<P><STRONG>
Thanks for your help!
</STRONG></P>
<P><STRONG>
Chuck
</STRONG></P>
<!-- end 10 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/11"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">large file support detection</FONT></H3>
<p>Mon, 21 Jan 2002 22:37:22 -0500
<BR>Robos (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2311%20large%20files">robos from geekmail.de</a>)
<BR>and Ben from The Answer Gang
</p>
<!-- sig -->
<!-- sig -->
<P>
On Tue, Jan 22, 2002 at 01:35:56AM +0100, Robos wrote:
</P>
<P><STRONG>
Hi Gang!
Maybe I already told you about my little program to copy dvd's to
harddisk, called vobcopy (look on freshmeat). In the next release I
want to incorporate large file support (lfs - no, not linux from
scratch
<IMG SRC="../gx/dennis/smily.gif" ALT=";-)"
height="24" width="20" align="middle">. I found Jim Dennis' answer in the 67 issue and read
around various places (info libc, the suse-page, the large file summit
papers) but I am still unable to <EM>detect</EM> if the usersystem has support
for large files. We (another person joined me and did most of the lfs
stuff) found out about the -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE (the last one being redundant if not even close
to being wrong in my opinion) and off_t. But we are not sure if this
works correctly on both systems (supporting/not supporting). I would
think its better to know if the users system has support or not and compile
accordingly.
My approach would be somthing along the lines of look whats defined in
<linux/*file.h> and what the file system is the file gets written
to. But kinda ugly and probably wrong. Does one of you happen to know
how to figure it out?
</STRONG></P>
<P>
Check for the presence of "ftello64" (declared in <stdio.h>
<IMG SRC="../gx/dennis/smily.gif" ALT=";)"
height="24" width="20" align="middle">. From "info
libc -> I/O on streams -> File Positioning":
</P>
<TABLE WIDTH="95%" BORDER="1" BGCOLOR="#FFFFCC"><TR><TD>
<p align="center">...............</p>
<P>
- Function: off64_t ftello64 (FILE *STREAM)
</P>
<P>
This function is similar to `ftello' with the only difference that
the return value is of type `off64_t'. This also requires that the
stream STREAM was opened using either `fopen64', `freopen64', or
`tmpfile64' since otherwise the underlying file operations to
position the file pointer beyond the 2^31 bytes limit might fail.
</P>
<P>
If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32
bits machine this function is available under the name `ftello'
and so transparently replaces the old interface.
</P><p align="center">...............</p>
</TD></TR></TABLE>
<P>
"ftello" is the 'fixed' version of "ftell", but can be found on systems
with or without LFS. From the above, it looks like "ftello64" would only
exist on systems with LFS, where "ftello" would be an alias for it. I've
got to hand it to the GNU folks: cute trick.
</P>
<!-- end 11 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/12"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Re: [LG 75] 2c Tips #5 Linux with win2000</FONT></H3>
<p>Fri, 22 Feb 2002 15:26:13 +0530
<BR>sanjay sharma (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2312%20w2k%20after%20linux">sanjayjisuno from hotmail.com</a>)
</p>
<P>
this related with redhat linux
</P>
<ol>
<li> if you have free space in your harddisk for windows 2000 partition
then
<ul>
<li>first install win2000 on your system after installation
<li>
boot your pc with redhat linux7.2 cdrom and type on prompt "linux rescue"
enter
<li>
check on which partition no. windows 2000 install you can check this by
typing
<blockquote><pre>fdisk /dev/hda
</pre></blockquote>
press enter
<br>
then type "p " press enter
<br>
now you know your windows partition no.
<li>
mount the partition by typing
<blockquote><pre>mount -t vfat /dev/hda(windows partition no.) /hdd
</pre></blockquote>
press enter
<br>
it will mount your windows partition at <TT>/hdd</TT> directory
<li>
as you installed linux first so your linux partition must be hda1 or
check your linux partition
<br>
run command
<blockquote><pre>dd if=/dev/hda(linux partition no.) of=/hdd/bootlin bs=512 count=1
</pre></blockquote>
press enter
<br>this command show you the message
<blockquote><pre>1 record in
1 record out
</pre></blockquote>
<li>
now type "exit" press enter
<li>
now edit the boot.ini in windows partition
<br>
add one line under the heading Oprating system
</P>
<blockquote><pre>c:\bootlin=3D"Redhat Linux "
</pre></blockquote>
save it and you are done
<li>
reboot the system
</ul>
<li>
if there is no free space
<br>
use partition magic to make some free space for windows 2000 and use the
same steps
</ol>
<!-- end 12 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/13"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Basic Newbie Question</FONT></H3>
<p>Thu, 21 Feb 2002 22:11:03 -0500
<BR>Faber Fedor (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2313%20user%20not%20all%20powerful">The Answer Gang</a>)
<br>asked by Steven Bruce
</p>
<P><STRONG>
I've just installed RH 7.2 on a sony vaio, and was quite surprised by the
ease with which it went on (Far cry from RH5.5). Anyway, I created the
suggested user so that I wouldn't be logging in as Root all the time,
however, the user I created can not create, delete, copy, etc, files in
ROOT, or USR, or even HOME.
</STRONG></P>
<P>
Of course you can't! This isn't That Other Operating System.
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</P>
<P><STRONG>
I am assuming I have to login as ROOT and join
the user to the administrators group, or some such group which will allow
the user the appropriate permissions, but I am not sure. Is thre something I
am missing or something I should be doing different?
</STRONG></P>
<P>
You're missing something.
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle"> In Linux (and unix in general) users
<em>don't</em> have the right to willy-nilly create files and run any old
program. Would you like it if user jane had the rights to delete files
in you home directory? Of course not!
</P>
<P>
Linux has rather strict rules about what you, a normal user can do. The
root user, OTOH, can do <EM>anything</EM>. This is a very dangerous thing if
you're not careful. Let's say you wanted to delete all the files in
your home directory (you're allowed to do that, they're <EM>your</EM> files).
That would be done with the command
</P>
<P><CODE>
rm -rf /home/steve
</CODE></P>
<P>
If you accidentally typed it as
</P>
<P><CODE>
rm -rf / home/steve
</CODE></P>
<P>
You would get some error about not having permissions, etc. And
depending where you were in the directory, ypou might or might not wipe
out your home directory.
</P>
<P>
However, if you were logged in as root and type the accidental line, you
would, literally, wipe out every file on the hard drive.
</P>
<P>
You might want to add the normal user to various groups, but you should
proabbly read up on Linux and permissions and all that. Start by reading
the Dos/Windows User to Linux User HOWTO
( <A HREF="http://www.linuxdoc.org/HOWTO/DOS-Win-to-Linux-HOWTO-4.html"
>http://www.linuxdoc.org/HOWTO/DOS-Win-to-Linux-HOWTO-4.html</A> ) to get
an idea on what's going on.
</P>
<P>
Reading the HOWTOs in general is a good idea (maybe not all at once,
mind you). You can find all of them and more at www.linuxdoc.org
</P>
<P><STRONG>
Any help would be greatly appreciated!
</STRONG></P>
<P>
A little appreciation is just fine, thank you.
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</P>
<HR width="10%" align="center"><P>
Regards,
<br>Faber
</P>
<!-- end 13 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/14"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Re: [LG 75] 2c Tips #15 posters</FONT></H3>
<p>Thu, 31 Jan 2002 15:22:52 -0500
<BR>Boyer, Charles (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2314%20posters">Charles.Boyer from tycoelectronics.com</a>)
</p>
<P>
Probably old news...but just in case:
</P>
<P><BLOCKQuote>
<A HREF="http://linux.oreilly.com/news/linuxanatomy_0101.html"
>http://linux.oreilly.com/news/linuxanatomy_0101.html</A>
</BLOCKQuote></P>
<P>
backPosters are available free with a $50 purchase at the following O'Reilly
conferences and tradeshows:
</P>
<P>
O'Reilly Conferences:
</p>
<ul>
<li> <A HREF="http://conferences.oreilly.com/p2p/"
>http://conferences.oreilly.com/p2p/</A> The O'Reilly P2P Conference,
San Francisco
<li> <A HREF="http://conferences.oreilly.com/oscon2001/"
>http://conferences.oreilly.com/oscon2001/</A> O'Reilly Open Source
Software Convention, San Diego
</ul>
<P>
Tradeshows:
</P>
<ul>
<li><A HREF="http://events.oreilly.com/#lwny"
>http://events.oreilly.com/#lwny</A> LinuxWorld, New York
</P>
<P>
<li><A HREF="http://events.oreilly.com/#usenix"
>http://events.oreilly.com/#usenix</A> Usenix, Boston
<li>
<A HREF="http://events.oreilly.com/#lwsf"
>http://events.oreilly.com/#lwsf</A> LinuxWorld, San Francisco
<li><A HREF="http://events.oreilly.com/#alxt"
>http://events.oreilly.com/#alx</A> Annual Linux Showcase, Oakland
</ul>
<P>
Cheers.
</P>
<!-- end 14 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/15"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">printing</FONT></H3>
<p>Thu, 31 Jan 2002 22:11:58 -0600
<BR>Jack Berger (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2315%20printing">jhb from mapp.org</a>)
</p>
<P>
You mention that you are having problems w/your epson printer.
</P>
<P>
I'm not too familiar w/printer defs in things like ghostscript or gimp, but my
printing w/an hp 970 improved by orders of magnitude for all applications when I
installed turbo print. Colors come out good, speed is improved. Just works nice.
</P>
<P>
-jhb-
</P>
<!-- end 15 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/16"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Linux rocks!</FONT></H3>
Thu, 21 Feb 2002 23:21:00 -0500
<BR>Ben Okopnik (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2316%20USB%20sync">The Answer Gang</a>)
<P>
Today, the curiosity bug bit me again, so I poked my nose into the Linux
Visor USB mailing list, and - lo and behold - there it was. Seems that the
new version of "coldsync", at least the beta, now handles the m125! I
downloaded it, configured it, compiled it, made a config file - and...
ta-daa! Palm USB synchronization, under Linux.
</P>
<P>
Life is good.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<!-- end 16 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/17"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Setting up telnet in a Linux server.</FONT></H3>
<p>Thu, 24 Jan 2002 18:43:04 -0800
<BR>Dan Wilder (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2076%5D%202c%20Tips%20%2317%20telnet%20no%20use%20ssh">The Answer Gang</a>)
<br>asked by Subroto Sengupta
</P>
<P><STRONG>
Hello Sir,
</STRONG></P>
<P><STRONG>
I would like to know how to set up a Linux 7.1 server and configure it
properly to be able to telnet into it from a Windows client machine.
</STRONG></P>
<P><STRONG>
A reply would be greatly appreciated.
</STRONG></P>
<P><STRONG>
Sincerely,
<br>Subroto.
</STRONG></P>
<P>
Well, that's a whole lot of questions.
</P>
<P>
There's no "Linux 7.1". The Linux kernel's current versions
are 2.5.2 (pretty wild), 2.4.17 (conditionally stable), and
2.2.20 (quite stable). (labels mine).
</P>
<P>
Linux is distributed by several vendors, who label their own
distribution with a version number. You may be thinking about
<A HREF="http://www.redhat.com/">Red Hat</A> Linux 7.1. Don't. Get Red Hat Linux 7.2 or 6.2.
Other vendors (<A HREF="http://www.debian.org/">Debian</A>, Mandrake, <A HREF="http://www.slackware.org/">Slackware</A>, <A HREF="http://www.suse.com/">SuSE</A>, <A HREF="http://www.caldera.com/">Caldera</A>,
to name just a few) each use their own numbering schemes,
which have not much to do with those of the others.
</P>
<P>
How to set up a server? Best advice I can give is "follow
the vendor's directions, and ask questions here when you
get lost".
</P>
<P>
Telnet? Only on a protected network, I hope! Telnet exchanges
a password in the clear, OK if just your immediate family is
watching the 'net, not so good if the password traverses six ISPs
and a few chunks of the backbone.
</P>
<P>
That said, during install, select the telnet package. Sometimes
that's part of some other package, sometimes not. Consult the
vendor documentation and help.
</P>
<P>
On exposed networks, use the ssh (secure shell) package on Linux,
and get "putty" secure shell client for Windows. It's much
better than windows telnet, and it'll even telnet, if you must.
</P>
<P>
<A HREF="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"
>http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</A>
</P>
<P>
or search google.com for "putty.exe".
</P>
<P>
--
Dan Wilder
</P>
<!-- sig -->
<!-- end 17 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/lj"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy"><i>Linux Journal</i>'s Weekly News Notes Tech Tips</FONT></H3>
</P>
<!-- begin ljwnn -->
<P> <A NAME="lj/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">ssh -n</FONT></H3>
<P>
Use ssh -n to run an X program from one computer on another.
For example,
</P>
<blockquote><pre>ssh -n frodo gimp &
</pre></blockquote>
<P>
will run the GIMP on the host frodo, but display locally.
</P>
<P>
Using ssh for this is much easier and more secure than setting it up
in X manually.
</P>
<P>
The -n option means prevent reading of stdin. Many times you don't need
this, but if your application hangs waiting for input or does something
else strange, try it.
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="lj/2"><HR WIDTH="40%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">The simplest way to process a web form</FONT></H3>
<P>
You can put a simple form on your web site even if you don't have CGI
privileges. Just use <form method=GET action="result.html"> where
result.html is a "thank you for filling out the form" page.
</P>
<P>
You can then get the values people filled in from the web server
access log.
</P>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="lj/3"><HR WIDTH="40%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">How to switch between several network profiles on your laptop</FONT></H3>
<P>
Use the scheme option to cardctl to manage multiple network schemes on
one laptop. The scheme is passed in as the first part of the device
address in the PCMCIA wireless.opts script. Make two entries in
wireless.opts:
</P>
<blockquote><pre>ssc,*,*,*)
INFO="SSC WiFi Net"
ESSID="wifi.ssc.com"
;;
dana,*,*,*)
INFO="live.com network at Dana St. Roasting Co."
ESSID="LIVE.COM"
;;
</pre></blockquote>
<P>
To switch between them, do
</P>
<blockquote><pre>sudo cardctl scheme ssc
</pre></blockquote>
<P>
or
</P>
<blockquote><pre>sudo cardctl scheme dana
</pre></blockquote>
<P>
For more info, see the PCMCIA HOWTO. You can change all the settings,
including WEP key, mode and other options. For more information on
free wireless access and coffee in Mountain View, California, see Dana
Street:
<A HREF="http://www.live.com/danastreet"
>http://www.live.com/danastreet</A>, a <TT>LIVE.COM</TT> Neighborhood Network.
</P>
<P>
Rob Flickenger explains how to set up shell scripts to switch schemes
with less typing in his new book, Building Wireless Community Networks
(O'Reilly, 2002).
</P>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="lj/4"><HR WIDTH="40%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Speeding up commands like "route" and "netstat"</FONT></H3>
<P>
If "route" takes a long time to run because you have no route to your
nameserver, do "route -n" to skip the DNS lookup and use IP addresses
only.
</P>
<P>
This works with "netstat", "ping" and "traceroute" too.
</P>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="lj/5"><HR WIDTH="40%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Very important topic: keeping your "fortune" file indexed</FONT></H3>
<P>
You can keep your fortune file indexed and up-to-date on multiple
servers with make. Here's an example Makefile to handle common
fortune-related tasks:
</P>
<blockquote><pre># List all the fortune files you maintain here. (I just have them
# all in one big file)
FORTUNES = dmarti
# For every fortune file, the datfile is the same name but with .dat
# on the end
DATFILES = $(FORTUNES:=.dat)
# Make a copy of the fortunes file to the zork.net collection
# (http://zork.net/fortunes/) Since it's the first target, this
# target and its dependencies will run if you just type "make"
tozork : $(DATFILES)
scp $(FORTUNES) $(DATFILES) zork.net:/usr/local/etc/fortunes
touch tozork
# This target makes each .dat file from the appropriate fortune
# file, if it has changed.
%.dat : %
strfile $<
# Get rid of all the .dat files (not really needed, but it's traditional
# to have "make clean" do _something_)
clean :
rm -f $(DATFILES)
# There is no file named "clean", but always build this target.
.PHONY : clean
</pre></blockquote>
<P>
For more information, see "man strfile" and "info make". Now that you know
how to manage fortunes by editing only one file and typing make, why
not put your favorite sayings on your web site as a fortune file
others can also use? (The old fortunes that come with most
distributions have come up way too often for us.)
</P>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="lj/6"><HR WIDTH="40%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Limiting the files "locate" shows</FONT></H3>
<P>
"locate" is a wonderful command for quickly finding files on your system.
Unfortunately, sometimes it produces so many hits that it takes too long
to find the forest among the trees.
Distributions and programs often have lots of files, making locate
seem useless. To refine your search, type:
</P>
<blockquote><pre>loc () {
locate "$1" | egrep -v 'bmp|html|whatever'
}
</pre></blockquote>
<P>
or put it in your .bashrc, and you won't receive any entries that contain
</P>
<!-- end 6 -->
<!-- end ljwnn -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright ©</a> 2002
<BR>Published in issue 76 of <I>Linux Gazette</I> March 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_mail.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue76/lg_tips.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lg_answer.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
</BODY></HTML>
<!--endcut ========================================================= -->
|