The Old Gringo movie was made from a novel of the same title by Carlos Fuentes, the multi-prize winning author from Mexico (who grew up in Washington, DC, as his dad was the Mexican ambassador). El Gringo Viejo was Fuentes’s imagination of what happened to Ambrose Bierce, who was last seen traveling to Mexico in 1913-14 during the Revolution and was never heard from again. Bierce himself had written in a letter on the way there: “If you hear of my being stood up against a Mexican stone wall and shot to rags please know that I think it a pretty good way to depart this life. It beats old age, disease or falling down the cellar stairs. To be a Gringo in Mexico - ah, that is euthanasia!” In Fuentes’s story (IIRC from having seen the movie years ago),
Bierce, ever the cynic, confronted a Villista revolutionary commander who had seized a treasure chest of property deeds and thought he was now rich. Or something like that. Bierce said it was all worthless now and threw it away, and said the whole revolution was pointless anyway. This pissed off the Villista who lost his temper and plugged him.
As to the etymological theory that the word gringo comes from Yanks singing “Green Grow the Rushes O”, it’s a weak theory and off the mark. The theory that it comes from griego, ‘Greek’, hence unintelligible talk, hence foreigner, is more likely to be true. Not especially complimentary, but then, not all that vile as derogatory terms go.
The derogatory term gook for Asian indeed comes from a misunderstanding, or misuse, of the Korean word guk meaning ‘country’ (which is a loanword from the Chinese word guo). This was even explained in Lucy Herndon Crockett’s juvenile novel about the Korean War, Pong Choolie, You Rascal! — this Korean kid calls the Americans “Mei Guk Saram” — from Chinese Mei Guo ‘America’ and Korean saram, ‘person’. The Americans GIs don’t want to bother with learning to pronounce so many syllables, so they just say “Gook” — and laugh.
Chinese calls America Mei Guo, literally ‘Beautiful Country’, but before Yanks get a swelled head about that, the reason is that mei is just used to represent the sound of the stressed syllable in America. Any foreign word represented (more or less) phonetically in Chinese syllables will involve the use of existing Chinese words. Sometimes this can be funny. According to Charles Berlitz, the name of President Nixon transcribed into Chinese characters reads “Mud Overcoming Forest.”