Mass shooter profile in the US.
Based on this: single, white, unemployed, heterosexual males with a history of mental illness, poor GPA, and no military service should not be allowed to have a firearm.
The military would be a good way to filter out those people that are nuts or stupid. Also, should not be allowed to get a firearm until after being honorably discharged providing that they had passed basic gun training and pass an eye exam.