San Francisco's tradition as a great theater town dates back to Gold Rush days, when the city was home to some of the most eclectic programming in the history of the stage.

Starved for entertainment of any kind, yearning in equal parts for high culture and female flesh, early San Francisco's mostly male audiences devoured a rich and motley diet of Shakespeare, minstrel shows, burlesque, sentimental dramas, pageants, "leg shows," panoramas, satires of other plays, musical entertainments, impersonations, animal shows and more.

It all started with San Francisco's first theatrical performance, which took place June 22, 1849 - a one-man show put on at the courthouse in Portsmouth Square by an itinerant Brit named Stephen C. Massett.

Almost 200 people shelled out the considerable sum of $3 each to watch the artist play various dramatic roles, declaim poetry and sing his own songs - which he accompanied on one of the handful of pianos in California.

Massett's grand conclusion, in which he imitated seven New England characters at a town meeting, brought down the largely Yankee house.

The multitalented drifter published dispatches from San Francisco under the pen name Jeems Pipes of Pipesville. Pipesville was the name he gave to his tiny house in a desolate, sandy ravine between Seventh Street and Market and McAllister streets, on the edge of the Mission Street marsh. The house stood on 9-foot stilts and could be entered only by ladder. After entering, Massett would pull up the ladder to ensure he could work in peace, undisturbed except by the croaking of bullfrogs.

The first real play in San Francisco, an offering titled "The Wife," was staged Jan. 16, 1850, at a modest theater called Washington Hall, which was on the second floor of a building that was later to become the city's swankiest brothel.

The show failed to impress the public and closed after a week, the husband-and-wife principals decamping for Hawaii. As Edmond Gagey notes in "The San Francisco Stage: A History," "the abrupt disbanding of the company was precipitated by the treasurer's casual announcement that he had lost the week's receipts at monte."

Rat-killing shows

Virtually every theater in Gold Rush San Francisco featured a saloon, to which audience members could repair before, after and during the show. Many "theaters" were little more than dives and featured such nonintellectual offerings as "Grand Rat-Killing Matches," in which owners would enter their dogs.

But legitimate theater also flourished from the earliest days of the Gold Rush, spurred by a pair of rival entrepreneurs - a former New York cabdriver named Thomas Maguire and a drugstore owner, Dr. D.G. "Yankee" Robinson.

Sinking feeling

Robinson opened a small theater called the Dramatic Museum on California Street and had a hit with a show called "Seeing the Elephant," a satire about the Gold Rush. Next he built the American Theater, a 2,000-seat house near the waterline on Sansome Street. The American was a rousing success, despite the unnerving fact that its walls subsided 2 inches during opening night.

But Robinson was outdone by Maguire, who built the most magnificent theater in the city, the Jenny Lind on Portsmouth Square - a building so handsome that within a year the city paid him the unheard-of sum of $200,000 and turned it into City Hall.

There was no shortage of highbrow fare for these theaters: San Francisco hosted no fewer than 22 plays by Shakespeare in its first decade. But wise producers hedged their bets. "Othello," the first of the Bard's plays to be performed, was accompanied by a comic piece and a circus performance.

The critics and authorities were not always charitable toward the racier theatrical offerings. Of an 1862 burlesque titled "The Female Forty Thieves," one critic wrote, "It seems principally intended to introduce about two scores of female legs, nearly as good as naked, of all shapes, thicknesses and lengths, which parade for half an hour, or so, backward and forward on the stage."

In 1878 an all-female, all-blond British troupe was hauled into court, where one Officer Miller testified that their version of the cancan was "the most indecent he had ever witnessed." Officer Miller, who was apparently an early practitioner of yoga, then proceeded to demonstrate just how indecent it was.

Method acting

The best-known actor in San Francisco's early days was a tragedian named James Stark. Stark seems to have favored a literal approach: One paper noted that his performance in "Othello" stood out because he inflicted a "severe wound" upon himself in the play's death scene.

Another peculiar mishap took place when Stark and his wife were appearing at a Robinson-run theater. Robinson's small son, Charles, had been given one line in the play. But the little boy was sleepy and in a foul mood, and when he was thrust onstage he "roundly cursed" Mrs. Stark, who was playing the female lead. The aggrieved actress blamed Robinson for the incident and went back to work for Maguire.

Then as now, treading the histrionic boards was not a career conducive to early retirement. No less a figure than Edwin Booth, son of the tragedian Junius Booth and brother of Abraham Lincoln assassin John Wilkes Booth, and an older actor friend were reduced to a "Withnail and I"-like existence in a small house located near Massett's Pipesville.

Living on kidney

"During their impecunious periods - which seem to have been many - they lived mainly on kidneys, then the cheapest meat available," writes Gagey. "It is amusing to note that in the city directory each man described himself as 'comedian and ranchero.' "

One of their pals and fellow comedians, William Barry, came to a tragic end. Barry was so proud of his role as First Gravedigger in "Hamlet" that after he was demoted to Second Gravedigger, he died of drink and a broken heart. At least so claimed The Chronicle - which, it should be noted, began its life in 1865 as a theater sheet, the Daily Dramatic Chronicle.

Itself an intensely theatrical place, the instant city embraced theater and theater people, and none more enthusiastically than the legendary triumvirate of Lola Montez, Adah Menken and Lotta Crabtree. Future Portals will cover these illustrious divas, starting next week with Montez.

Trivia time

Last week's trivia question: What incessant sound after the 1906 earthquake almost drove some survivors mad?

Answer: The sound of trunks being dragged over the streets.

This week's trivia question: Near what body of water was the Trocadero Inn?

Editor's note

Every corner in San Francisco has an astonishing story to tell. Every Saturday, Gary Kamiya's Portals of the Past will tell one of those lost stories, using a specific location to illuminate San Francisco's extraordinary history - from the days when giant mammoths wandered through what is now North Beach, to the Gold Rush delirium, the dot-com madness and beyond.

Gary Kamiya is the author of the best-selling book "Cool Gray City of Love: 49 Views of San Francisco," which was just awarded the 2013 Northern California Book Award in creative nonfiction. All the material in Portals of the Past is original for The San Francisco Chronicle. E-mail: metro@sfchronicle.com