Linux-Misc Digest #248, Volume #25 Thu, 27 Jul 00 07:13:02 EDT
Contents:
Re: Which IDE linux C programers use? ([EMAIL PROTECTED])
FTP and Telnet (vururu)
Re: Building a Linux Server from scratch: Experiences? (Kim Carter)
Re: problem with fileevent (Maria Jesus Martin Mohamed)
Re: UPS with serial port (Robert Heller)
Re: Linux & free ISPs (Robert Heller)
Re: UPS with serial port (Robert Heller)
typing tutor for linux (Bob Koss)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Which IDE linux C programers use?
Date: Thu, 27 Jul 2000 02:46:44 +0100
Johan Kullstam <[EMAIL PROTECTED]> did eloquently scribble:
>> Offtopic, has anyone ever managed to put a breakpoint in a program and make
>> the compiler acctually stop there (in KDevelop)?
> the compiler? #error can stop the c pre-processor. a major syntax
> error should halt the compiler itself.
>> I tried with KDevelop 1.1, if I'm not mistaken. I'm not the only one who
>> stumbled upon this...glitch?
> i am not sure what you are asking for.
I think he's confused...
You don't put breakpoints into source code to be compiled.
You put breakpoints in by means of the debugger such as gdb and then run
it AFTER it's been compiled...
--
______________________________________________________________________________
| [EMAIL PROTECTED] | "I'm alive!!! I can touch! I can taste! |
|Andrew Halliwell BSc(hons)| I can SMELL!!! KRYTEN!!! Unpack Rachel and |
| in | get out the puncture repair kit!" |
| Computer Science | Arnold Judas Rimmer- Red Dwarf |
==============================================================================
------------------------------
Subject: FTP and Telnet
From: vururu <[EMAIL PROTECTED]>
Date: Thu, 27 Jul 2000 03:08:12 -0700
Hello all,
I just installed linux mandrake 7.1 on my box, it seems
correctly connected to the network...
However, I don't have ftp and telnet services...
I am afraid that these services was not intalled ...
How could I be sure that these services were not installed?
What are the deamons to install for getting ftp and telnet
services?
I am real newbie.
Look for the easiest way to make these installations...
Thanks a lot for your help...
vuru
===========================================================
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
From: [EMAIL PROTECTED] (Kim Carter)
Crossposted-To: comp.os.linux.hardware
Subject: Re: Building a Linux Server from scratch: Experiences?
Date: Thu, 27 Jul 2000 11:14:24 +0100
In article <[EMAIL PROTECTED]>,
David Steuber <[EMAIL PROTECTED]> writes:
> When the FedEx guy gets here with my CPU, I will finally have all the
> hardware for a complete computer. This is my first go at building my
> own computer from scratch. It's mission: to serve HTTP connections
> with Apache and run a smallish database with PostgreSQL. The web
> pages will contain dynamic content using mod_perl and PostgreSQL. For
> remote configuration and programming, I will be using SSH.
>
> But this post is about the hardware side of things.
>
> I have been in the Intel world ever since the 386 came out. All my
> computers have been pre-built by some other manufacture. The two
> computers I have running now on a home LAN are both made by Gateway
> 2000. Since getting my first Gateway 2K, I have gone from a solid
> Windows user to a Linux zelot. It just happened. Now I am building a
> server that I am hoping will be able to handle traffic as high as 1000
> page views per hour. I don't think I will see that sort of traffic
> for a while though. When I do reach that level, perhaps I will be
> able to add more hardware.
>
> My first instinct was to look for a pre-built system. That is the
> easiest thing to do. VA Linux was attractive to me because they seem
> to have good prices and are pre-configured with Linux. There is no
> Windows tax with their systems, unlike with GW2K, Dell, and others.
>
> I speced out a system for $855 which was about as much as I wanted to
> pay for the box. Then a friend of mine convinced me that I could do
> much better if I built my own. I decided to give it a go. The
> possiblity of saving money was very attractive to me. All I had to do
> was make sure I bought Linux friendly hardware.
At least in the UK, if you want something pretty commonplace, you don't
generally save much if anything. If however, like me you prefer SCSI,
don't give a damn about sound cards and/or '3D Gaming cards' etc you do
make savings. (Basically because most vendors don't make them).
In short the further your spec is from a stock item sold by all, the better
your chances of making savings. With more commonplace specs, you are more
likely to not 'make savings' but get better quality hardware in the areas
that *matter to you*.
>
> Being new to the build your own PC game, I looked around the Internet
> for a few web sites that tell you how to do it. The ones with the
> most basic tutorials were well out of date. When some site talks
> about a hot new Pentium processor instead of the more affordable 486,
> you know time has passed since the author put the page together. A
> lot of time. After all, one human year is about 70 computer years.
This is true but most of the internals have not changed a vast amount.
Like Linux a lot of the docs are 'missing' or 'out of date' but once one
understands the principles, it's not difficult.
One source of info often missed is the motherboards news groups (in the
alt.comp.periphs.mainboard.xxxxx hiararchy) - get some idea of what users
think, obviously windows dominated but ...
Group tests (at least in UK magazines) usually list the parts used inc.
motherboards, Disk drives etc - It's not unusual to find there's a
correlation between performance and particular components.
re purchases/assembly, common problems include -
Hard disks and PSUs dead on arrival.
PSUs with to few power connectors and not long enough to reach 1/2 the
drive bays.
Cases made so cabling can only be routed where it obstructs airflow.
PSU fans that suck when the layout of the case requires a fan that blows
(or vice versa). - This can apply even when supplied with the case.
Memory sticks put in unfastened Anti stat containers and floating around
the packaging on arrival. Dead,Alive or Crippled, who knows? once its
been inserted 'obviously you didn't take anti-stat precautions'.
OEM versions being provided instead of retail, and thus no/feeble docs,
missing fastenings/connectors etc. (And in some cases lack of support/
poorer specs).
*Exact* part numbers make a difference - and sales staff often neither
know nor care.(Or for online ordering the part# is ambiguous)
DOS/Win only BIOS utils for Flash BIOS'
Missing Cables.
M/B documentation that is 'generic' and does not cover the particular M/B
you bought. It's also usually in 'international english ...'
Disk Drive 'Cages' that foul processor heatsinks etc.
Anti EMI (screening) contacts that spring out of position (and possibly
short something out) when finally fitting that last fastening.
I live on an island so delivery charges are always a ripoff.
Companies that say everything is in stock, you then get a partial delivery
because some parts weren't ... they then deliver the rest and try and charge
you 2 sets of delivery charges.
Mains Cables having US/European connectors.
Cards with connectors that won't fit though the apertures at the back of
the case or won't allow connectors to go fully home.
Cases that require stuff to be assembled in a (usually illogical) order
because fastenings are obscured.
Damaged connectors - eg wide SCSI connectors only need to be very slightly
misaligned to be busted permanently when connecting.
So why after many years of building my own PCs why do I still do it?
#1 - I'm crazy
#2 - I *know* there are no proprietry 'gotchas'.
#3 - If I want another disk drive, CD etc just plug it in (OK set the
address jumpers first).
#4 - Every part is a part I've chosen, the tradeoffs are mine, not what
'the average person' wants.
#5 - I have what documentation is available for all components.
#6 - Unless one goes for one of the big names, who are more likely to
use proprietry components, build standards of ready built PCs
can create just as many hassles (As can poor packaging/QA,
stock control/distribution - the only difference is the number
of opportunities for things to go wrong).
> Has anyone else had similar experiences to mine? Does life get easier
> in the build your own PC game? I feel a lot like I should have just
> gone with VA Linux and be done with it.
>
> Now I have an e-mail to send.
>
Over the last few years, things have improved somewhat but your experiences
are not by any means uncommon. I suspect you will find that you have not
saved much over a 'comparable' system (If at all). However, assuming
you did enough research you will have a box that does precisely what you
need better than a commercial box and one you can upgrade more easily when
it becomes necessary. Yes it does get easier over time but only because
you expect and accept the hassles (and get to know how to minimise them).
Check all components (especially connectors) for damage immediately they are
delivered and that all 'plugin components' are correctly inserted.
Note all settings of jumpers, switches etc - do not assume they are set to
what the manual claims the default is .
Do a complete trial build (or at least assume the first build may be one).
You may want to drill holes for cable clips etc or 'ease' some of the existing
slots/holes.
Make sure you have a supply of cable ties/ribbon cable clips and use them.
If cables are to short or marginal, deal with it now - many local computer
shops, here at least, will assemble ribbons at relatively low cost. Otherwise
fitting that fancy new add on later will be a real PITA and there's nothing
much more annoying than an intermittent connection.
Good Luck
Kim
------------------------------
From: Maria Jesus Martin Mohamed <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.tcl
Subject: Re: problem with fileevent
Date: Thu, 27 Jul 2000 13:59:34 +0200
Robert Heller wrote:
> Maria Jesus Martin Mohamed <[EMAIL PROTECTED]>,
> In a message on Tue, 25 Jul 2000 15:52:43 +0200, wrote :
>
> MJMM> I'm programming in tcltk and I have a problem with command fileevent .
> MJMM> I want to know what can I do to avoid a infinite loop.
> MJMM> I use fileevent command to read a line of a file but when I found the
> MJMM> final of a file I want to wait to read a new line when its is ready to
> MJMM> be read, but fileevent always is looking a new line.
>
> Regular files are *always* ready for reading -- fileevents only really
> make sense for things like pipes and sockets.
>
> You also need to check the input status when you perform the read (or
> gets) in the fileevent code -- you need to close the file on EOF (this
> cancels the fileevent).
>
> MJMM>
> MJMM> thanks.
> MJMM>
> MJMM>
>
>
> --
> \/
> Robert Heller ||InterNet: [EMAIL PROTECTED]
> http://vis-www.cs.umass.edu/~heller || [EMAIL PROTECTED]
> http://www.deepsoft.com /\FidoNet: 1:321/153
Thank you for your answer, but I don't know how to check the input status.
I'm a beginner.
In one hand , in one aplication I want to read lines of a file one by one ( I
open the file for reading ,gets one line and I catch when is eof of file , but
inside it I don't want to do anything) and in other aplication I write one line
in the same file ( in this aplication I open this file and close it for
writting).
I want , when is eof of file, the aplication stop to read, but when arrive a
new line (not a empty line) the first aplication read it (only this new line).
Can you send to me what I'm doing bad?
This is a piece of my code.
1�- I open the file
2�- fileevent $f readable {
update idletask
gets $f line
if { $line >= 0} {
set Y(++end) [lindex $line 0]
set X(++end) [lindex $line 2]
puts "yv =$Y(:)"
puts "xv =$X(:)"
Y notify always
X notify always
if { [eof $f] } {
}
}
I don't understand why fileevent is always readind.
thank you.
------------------------------
From: Robert Heller <[EMAIL PROTECTED]>
Subject: Re: UPS with serial port
Date: Thu, 27 Jul 2000 10:31:13 GMT
[EMAIL PROTECTED] (David C.),
In a message on 26 Jul 2000 20:22:21 -0400, wrote :
DC> David Steuber <[EMAIL PROTECTED]> writes:
DC> >
DC> > I don't understand this. I thought there were two types of RS-232
DC> > cable: a straight cable and a null-modem cable. What is APC doing
DC> > different?
DC>
DC> The APC interface, although it is 9-pins and connects to a PC serial
DC> port, is not really an RS-232 port.
DC>
DC> The basic signalling (which the BackUPS and BackUPS Pro models use) is
DC> done by setting and clearing the various out-of-band signal wires (like
DC> DTR, CTS, etc.)
DC>
DC> I think the advanced signalling (used by SmartUPS) actually uses the
DC> serial tx/rx lines to transfer real data, but I'm not certain of that.
Yep. The brainy UPSs send real messages over the serial data lines.
Dumb UPSs just toggle a single out-of-band bit (DTR, CTS, etc.).
DC>
DC> Regardless, the two devices require different cables.
DC>
DC> I still don't understand why different operating systems also require
DC> different cables.
It might have something to do with O/S driver logic -- maybe there are
some 'out-of-band signal' signals that Linux uses that MS-Windows does
not and vs. versa. I know there are signals both handle, but maybe an
earlier incarnation of the MS-Windows software used a signal that Linux
does not handle and rather than totally break all of the old MS-Windows,
they created a new cable with the Linux-friendly 'out-of-band signal wire'.
DC>
DC> -- David
DC>
--
\/
Robert Heller ||InterNet: [EMAIL PROTECTED]
http://vis-www.cs.umass.edu/~heller || [EMAIL PROTECTED]
http://www.deepsoft.com /\FidoNet: 1:321/153
------------------------------
From: Robert Heller <[EMAIL PROTECTED]>
Subject: Re: Linux & free ISPs
Date: Thu, 27 Jul 2000 10:31:14 GMT
"G Pollack" <[EMAIL PROTECTED]>,
In a message on Thu, 27 Jul 2000 00:44:27 GMT, wrote :
"P> In article <[EMAIL PROTECTED]>, Robert Heller
"P> <[EMAIL PROTECTED]> wrote:
"P>
"P> > Netzero just uses normal PPP. You need to run the silly MS-Windows
"P> > sign-up hack, but once you have 'signed up', you can use a normal Linux
"P> > PPP connection to hook up with Netzero. Yes, it bypasses their ads bar,
"P> > but I have not noticed that they know, care, or check to make sure your
"P> > are running their ads bar hack -- I use Netzero from time to time
"P> > (when my local ISP is busy, etc.) -- I friend set me up (I don't have
"P> > MS-Windows myself).
"P> >
"P> > m> m> m> MST m>
"P> >
"P> >
"P>
"P> I've set up a netzero account under windows (access via a lan), but when I
"P> try to log in under linux through a dial-up connection (using minicom) my
"P> password isn't accepted. Could you provide some specifics about how you
"P> connect?
Netzero does not provide shell access -- you need to set up a PPP
connection. Netzero sets you up with an special username and an
encrypted version of the password you provided. You need to set this up
in your Linux PPP config utility.
"P>
"P> Thanks
"P>
--
\/
Robert Heller ||InterNet: [EMAIL PROTECTED]
http://vis-www.cs.umass.edu/~heller || [EMAIL PROTECTED]
http://www.deepsoft.com /\FidoNet: 1:321/153
------------------------------
From: Robert Heller <[EMAIL PROTECTED]>
Subject: Re: UPS with serial port
Date: Thu, 27 Jul 2000 10:31:12 GMT
David Steuber <[EMAIL PROTECTED]>,
In a message on Thu, 27 Jul 2000 00:00:03 GMT, wrote :
DS> Robert Heller <[EMAIL PROTECTED]> writes:
DS>
DS> ' Locate the 'powerd' HOWTO (UPS HOWTO) for *complete* details. Get a
DS> ' copy of powerd (powerd spys on a serial port and will fork() a
DS> ' 'shutdown' if the serial port state suggests that wall power has
DS> ' failed).
DS>
DS> Thanks! That sounds like the place to go.
DS>
DS> ' Basically there are three flavors of UPSs:
DS> '
DS> ' mindless, dumb, and smart.
DS> '
DS> ' Mindless: has no serial port at all (you can still use one of these for
DS> ' a smart shutdown -- see below).
DS> '
DS> ' Dumb: has a serial port, but only diddles one signal line (DTR or
DS> ' something) -- powerd likes these.
DS> '
DS> ' Smart: has some *clever* protocol -- sends real live messages over the
DS> ' serial port. powerd does not like these. *Some* of the UPS vendors
DS> ' have Linux daemons for these. For others there are GPL daemons (reverse
DS> ' engineered) available. For all others, they can be treated as
DS> ' expensive UPSs of the 'mindless' type.
DS> '
DS> ' For mindless UPSs and for smart ones without available matching
DS> ' software, all it NOT lost. There is a 'trick': get a random old
DS> ' *external* modem (make use of the old USR HST modem or that ratty old
DS> ' USR Courier 2400 modem, etc.). Speed, etc. not important. Plug the modem's
DS> ' transformer plug into the *wall* outlet, plug the RS232 to COM<N>
DS> ' (/dev/ttyS<N-1>). Plug the UPS into the wall and the computer into the
DS> ' UPS. Tell powerd to watch the port with the modem's DTR line. The
DS> ' modem will assert DTR so long as it has power. When a power failure
DS> ' happens the modem loses power (wall power == 0VAC). Computer is still
DS> ' alive (UPS is on battery power and providing 120VAC for a short while).
DS> ' No DTR == no wall power. Time to 'shutdown -h +?' (? == max number of
DS> ' minutes we can live off the UPS, less the time it will take to
DS> ' shutdown).
DS>
DS> Ok, so a Dumb UPS with serial line is the thing to look for. About
DS> the modem solution, I know where I can get dirt cheap external modems
DS> for the serial line. The problem I have with the modem solution is
DS> that it sounds like if the power goes out for five seconds (which
DS> happens from time to time), the computer will stay off. How would I
DS> tell the computer to cancel the shutdown in the time available for
DS> power (let's say I assume ten minutes)? What if the power comes back
DS> after that time period? Will the computer magicly turn on again?
The powerd daemon can be configured to issue a 'shutdown -h +NNN',
where NNN is however long the batteries last less the time it actually
takes to shutdown. Powerd can be configured to ignore short outages
and to cancel longer failures (in case the power comes back before the
shutdown completes). Powerd also supports a master/slave operation,
alowing multiple systems on a shared UPS, with one machine with the
'magic' serial cable and the others on a LAN (plug the hub in the
UPS!). The modem solution is no different than the garden variety 'Dumb
UPS with serial line'. Powerd deals with it the same way. All the
'Dumb UPS with serial line' type UPSs do is wire one of the serial port
control lines (like DTR or DSR or CD) to a relay to a +/-12 supply and
control the relay from an opto-isolated senser on the wall power side
-- basic the same part of the external modem you would be using in that
method. The *dumb* UPSs don't bother with anything more clever. The
*smart* UPSs provide all sorts of configuration and information like
battery status, estimates of how long the batteries will last with the
current load, etc.
DS>
DS> My current experience thus far is using a mindless tripplight. It
DS> give me time to manually shut down my computer if the power goes out
DS> and I am there. I manually turn the computer back on when the power
DS> is restored. The computer does not use a `soft' power switch. It is
DS> on or off. The new computer I am building appears to have a soft
DS> switch. The power supply has a hard switch, and the front pannel has
DS> a switch that goes to the motherboard.
There is a BIOS config relating to power management -- if the power goes
off and then returns, the BIOS needs to be told to proceed to power up
and boot, just like as if you had a mechanical switch.
DS>
DS> If the powerd stuff handles all this and it is in the documentation
DS> you point out, I'll figure it out. Obviously, I will test the
DS> solution before I put the computer on line.
Read the UPS-HOWTO -- it is all there, including the modem hack (that
is where I found about it). I was looking into what was needed to
handle safe shutdowns in the event of a power failure. At first I was
going to use an old 'mindless' type UPS, but later discovered that the
'smart' UPSs we had on the AlphaServers (came with them) had Linux
software as well as DEC UNIX software and supported slave operation via
a Tcp/Ip server/client socket hack. (These are Powerware units.)
DS>
DS> --
DS> David Steuber | Hi! My name is David Steuber, and I am
DS> NRA Member | a hoploholic.
DS> http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=hoplite&submit=Look+it+up
DS>
DS> The problem with AI is that it has a mind of its own
DS> --- Devon Miller
DS>
--
\/
Robert Heller ||InterNet: [EMAIL PROTECTED]
http://vis-www.cs.umass.edu/~heller || [EMAIL PROTECTED]
http://www.deepsoft.com /\FidoNet: 1:321/153
------------------------------
Subject: typing tutor for linux
From: Bob Koss <[EMAIL PROTECTED]>
Date: Thu, 27 Jul 2000 11:09:06 GMT
Has anyone found a decent typing tutor for Linux?
Mavis Beacon is probably asking too much, but something along those
lines.
--
Robert Koss, Ph.D. | Training, Mentoring, Contract Development
Senior Consultant | Object Oriented Design, C++, Java
www.objectmentor.com | Extreme Programming
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.misc) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************