Here in Czech Republic we have shooter license, and you have to pass an exam from related laws and also from safe handling (you even have to hit the target). It has to be refreshed every 10 years. You also need medical exam, but there is no mandatory psychological test. That might change, as we had mad legal owner mass shooting case recently.
Self defense is special category of the shooter license, but it requires no special requirement, and it should be issued, unless there is reason.
There are some fees and waiting involved on every step by they are not prohibitive.
You need license for every gun you buy. You can only buy ammo with both licenses.
Generally it's about as complicated as learning to drive and getting driver's license.
You also have to present the gun for inspection at any time, and it's quite easy to loose such license, especially for unsafe handling on public.
What I like about the system is that it allows anyone to own a gun, even for self defense, but since it's registered, it also makes you personally responsible for it.
It prevents middle man purchases. It allows confiscation of guns in the moment you break the conditions to own one. It makes owner care where they weapons are and how they are stored.
I know many US folks oppose idea of government knowing what weapons they have. Well I want the government to know who has what guns.
True, Norway has similar system, and it didn't prevent Breivik to get guns. But then he is "generally sane" person, with no prior record. The goal of such system is to get guns of people as soon as there is any problem, legal or psychological. And you must know they have them in the first place.
I think US should go this way, rather than banning irrelevant features on ARs. I would understand magazine size, but pistol grip ? Barrel threading ? That just shows incompetence ..