I dream of "Genie" (etymology)

I’m curious about the etymology of the word “genie”. According to some online dictionaries, it comes from the Latin root of genius (meaning “spirit”), via the French genie. Others say it comes from the Arabic djinn or jinni (meaning “genie” or “spirit”, but with slightly different overtones), which has the Semitic root gnn, once a verb meaning to conceal or cover and eventually applied to spirits.

How can they both be right? Both sound very plausible to me. A little help?

The spelling indicates that the Latin genius is at the root of our present word. The word was used to translate the Middle Eastern word now rendered as “jinn” or “djinn”, and I suspect it was because of the similarity in spelling and sound, not to mention meaning. (Although the Arabic djinns are beings of fire, and the Roman Genmius was a household spirit.) However, I certainly wouldn’t be surprised if that similarity of both spelling and meaning didn’t go back to a single root word common to all the languages involved.
It’s not like the case of “typhoon”, which some sources claim comes from the Greek mythological figure “Typhon”, while others claim comes from Chinese “Tai Fung”(?), supposed to mean “Great Wind”. No way that those are cognate.

Of course, then, there’s this:
http://boards.straightdope.com/sdmb/showthread.php?t=264288http://boards.straightdope.com/sdmb/showthread.php?t=264288

BTW, in the “Our Gang” classic A Lad an’ His Lamp, which gave us th immortal line “I wish Cotton wuz a monkey,” the genie is referred to as a “genius.”