The thing about not shooting trespassers until they enter your house isn't a consistent thing state by state. Like I suggested originally, you should really know your rights depending on your locality. I've researched this subject before; I'll give a detailed breakdown for everyone.
In most countries with a basis in the British legal system (which includes the US, Canada, Britain, and Australia which I believe covers 99% of this forum), you have what is known as a "duty to retreat". That is, if confronted with some situation in which a dangerous criminal is about, you are expected to retreat from the situation if possible and call the police. If you're chased down and have to defend yourself, you are fine, but if you confront the criminal and things get violent, you are likely to get into legal trouble.
However, most US states have assorted laws that fall under the "castle doctrine". The idea is that you have a right to defend your home, and if someone breaks into your home, you are free to confront them. If they attack at that point and you do what is necessary, you are not going to be in legal trouble (though if you kill someone, expect to be arrested; you will just win in court). Actually, the only US states that don't have some law that make that safe, at least according to wikipedia (which is probably correct) are Iowa, Nebraska, New Hampshire, New Mexico, and Virginia (also the District of Colombia). In those states, if a criminal breaks into your home, you should just run and call the police; if you try to stop him, you will be held legally responsible. In any other state, feel free to confront him with a deadly weapon, and feel free to use it if you are threatened.
A few states go further, and in those states, you have no duty to retreat anywhere. That means in those states you can confront criminals anywhere, and if they threaten you, you are allowed to do what is necessary. It should surprise no one that Texas is on that list, but also included are Alabama, Arizona, Florida, Georgia, Indiana, Kentucky, Louisiana, Oklahoma, South Carolina, Tennessee, Utah, and Washington.
I should be clear that you should only use deadly force if threatened by a criminal. You are allowed to confront them in these states, but just shooting a trespasser whose only crime is trespassing is not going to be an easy legal defense to say the least (I might go so far as to call it a hopeless defense anywhere except Texas...). The worst case is if you shoot them in the back when they turn and run upon seeing you with a weapon; that is pretty much a surefire way to get convicted of manslaughter. If you do use deadly force though, be sure to shoot to kill. I don't think there's generally much legal distinction between shooting someone in the leg or in the head, it's the way to keep yourself as safe as possible, and honestly it will make your legal defense easier since they won't be testifying against you. Speaking of legal defense, if things really do come down to this, when the police come, exercise your right to silence; the first person you should give any recounting of the events to is your lawyer. Advise all family members to do the same; tell the police your names and that you live there, but say absolutely nothing else unless you have legal counsel suggesting you do so. You aren't breaking the law if you are defending yourself in your home (in most states), but you gain absolutely nothing from talking to the police except maybe accidentally producing false evidence that can be used against you. Using this kind of defense likely puts the burden of proof on you; don't do anything stupid to make your legal situation worse than it has to be.
However, again, you should really, really check your particular state's laws on this matter. For instance, in my home state of Missouri, I have a right to defend myself not only in my own home but any covered place people sleep, including a hotel room, RV, or even a tent. In other states, you may have a duty to retreat in a tent even if you do not in your home; you should know this stuff as it could save your life or keep you out of prison. If you believe your home is in danger of being attacked, you especially really, really need to find this stuff out.
Of course, this sort of stuff, to my knowledge, is unique to the US. In the UK, not only do you have none of these rights, but you don't even have the right to silence when questioned by the police meaning it's nearly impossible to avoid accidentally incriminating yourself even if you did nothing wrong. I don't want to be waving the flag too much; if you live somewhere like that, you should familiarize yourself with local law and otherwise ignore everything in this post.