I don't think that the solution is all that difficult, once we strip away the idiotic bias and propaganda that's been spread by the extremes of both sides of the issue.
One side claims that the more guns we have out in public, the safer the public will be. This is complete nonsense. And has long been proven to be complete nonsense. The U.S. already has more guns per citizen than any country on Earth and we are still one of the most criminally violent nations on Earth. In fact, our ridiculous proclivity to violence is a direct result of our easy access to guns.
On the other hand, if we were somehow magically able to remove all those weapons from among us, I suspect we would remain a very violent society. Though we might be somewhat less efficient at killing each other.
The problem isn't the guns. The problem is the people using them. More specifically, the problem is fools, idiots, and criminals misusing them. And so the solution is not to keep guns away from the public, it's to keep guns away from fools, idiots, and criminals.
It will be difficult to keep guns away from criminals, because criminals will ignore whatever laws you pass. That's the nature of a criminal. But we certainly could make guns more difficult for them to get hold of. And we could make the punishments for gun crimes far tougher. That would help.
But the truth is that most of the people who are killed with guns, are not killed by hardened criminals committing armed rapes, robberies, and murders. Most people who are killed with guns either kill themselves, or are killed by a friend, neighbor, or family member, in a drunken or drug-induced rage. The real focus of our gun laws should be on keeping guns away from drunks, dope users, and emotionally unstable people. Let the responsible people have guns. They will use, or rather NOT use them responsibly. But those with any hint of social irresponsibility in their past, such as DUIs, domestic violence charges, or mental health problems, should net be allowed to own, carry, or otherwise be associated with guns. And to effect that kind of control, I think would require a gun licensing procedure that includes testing, something similar to our current driver's licensing procedure.