Fourth wall
The fourth wall is the metaphorical barrier between the characters of the story and the audience. Generally, characters are unaware that they are being watched, and therefore never address the audience directly and faithfully act according to the rules of the world created for them. However, a few episodes in Star Trek break these rules, thus breaking the fourth wall.

The Original Series

"The Changeling"
In the episode , Uhura – attempting to read the word "blue" on her viewscreen – turns directly to the camera and the viewers as she mispronounces the word as "blu-ee." However, she is facing Dr. McCoy and Nurse Chapel, with no direct acknowledgment of the audience in the episode itself.

"Journey to Babel"

The conclusion of  involves one of the rare times the fourth wall is broken in Star Trek. (Star Trek: The Original Series 365, p. 219) However, it is a less direct violation of the fourth wall than in "The Changeling". McCoy is looking slightly to the right of the screen and appears to be speaking to Amanda Grayson and Nurse Chapel when he expresses delight at finally having the last word.

"Spectre of the Gun"
In the closing moments of , Captain Kirk delivers a speech which concerns how Humanity managed to survive its violent urges and which includes a subtle breaking of the fourth wall. Kirk diverts his eyes from Spock to briefly look at the camera while uttering, "We overcame our instinct for violence," then he turns to McCoy, who nods silently. However, there is no direct acknowledgment of the audience in the episode itself, as Kirk is replying to a question from Spock.

"Tomorrow is Yesterday"
In Act Three of . Kirk is being interrogated by the guards who caught him. Kirk jokingly references that he got in to the base by popping in out of thin air. Lieutenant Colonel Fellini picks up Kirk's phaser, mistaking it for a radio transmitter. Then he wonders about Kirk's uniform and he starts to list Kirk's offenses, threatening to "lock him up for 200 years". Kirk ruefully looks directly at the camera and comments "that ought to be just about right" (to return him to his own era).

The Animated Series

"The Infinite Vulcan"
In , James T. Kirk asked Hikaru Sulu if he could teach him a body throw that he was skilled at, and he told him it was more than physical, and that he had to be inscrutable. Kirk then told Sulu that he's the most scrutable man he knows. Sulu then looks to the audience and winks his eye.

The Next Generation

"Symbiosis"

Denise Crosby broke the fourth wall when she waved "goodbye" at the end scene of her final regular appearance in .

Deep Space Nine

"The Way of the Warrior"
During the fourth season premiere, after the viewscreen communication with Gowron and Martok at the end of the episode terminates, Kira Nerys turns toward the camera and remarks "Who'd have thought I'd help save the Cardassian government?". This is more of a slight lean on the fourth wall, or a nod to the audience.

"Rules of Engagement"

For the fourth season installment , it was Ira Steven Behr who came up with the concept of having the characters speak to-camera, effectively breaking the fourth wall. He was determined not to do "just another trial show" (like  or ), and while trying to decide what to do to make "Rules of Engagement" stand out, he saw the   movie . During that film, in a flashback, Detective Rocco Klein (played by ) speaks directly to-camera. Behr thought this was an excellent idea and suggested it to Ronald D. Moore, who concurred, and who wrote it into the  teleplay. Moore describes this device as "sort of breaking the fourth wall, but sort of not, because the actors aren't talking to the audience, they're actually talking to someone in the courtroom." ()

"In the Pale Moonlight"

In the sixth season episode , this stylistic technique is taken even further, with Captain Sisko dictating an entire log directly to the camera and audience. However, there is no direct acknowledgment of the audience in the episode itself; instead, the viewer merely takes the perspective of the computer to which Sisko dictates his log.

Non-episode specific

Captain's log
"Captain's log," spoken by William Shatner, were the first two words viewers heard on the first Star Trek broadcast, , on . Obviously, the "real" purpose of the log is to inform the audience about key plot points.

By the same token, the first lines of , the premiere of , were also a captain's log entry, with the same first words: captain's log. This log entry, in addition to providing key plot points of the episode itself, also provides key plot points about the new series, namely the new starship  and certain crew members like first officer William T. Riker. Incidentally, in the first shot of Captain Jean-Luc Picard, he is looking directly at the camera through the Observation lounge window, although his voice is heard through voice-over.

In some of the first episodes of , Kirk's log sometimes broke the fourth wall and described information that neither he nor the crew could be aware of. For example, in , Kirk describes "... but unknown to us...." There clearly wasn't time to make some other log entries; for instance, in , Kirk made a log entry about his crew's skullduggery against the episode's villain while he, Kirk, is sitting next to that same villain. Presumably, these log entries were created after the events had transpired, when the captain had time to update his log, and it was either Starfleet procedure or just Kirk's personal habit to record such logs in the present tense.

Okudagrams 
Okudagrams would often break the fourth wall by displaying numerous puns, in-jokes, names of production staff, or general off-topic commentary based on the belief that they would often be hard to read on screen, either on account of visual brevity or text size. This self-evident in an example displayed in a file pertaining to Annika Hansen's past that was shown in the  episode . In addition to text described in the episode's dialog, the file further read:

"" crew consisted only of
father and mother Hansen, whose names
will never be visible on television, and
their young daughter pictured here.
Other data should be here, but I don't
have time to be creative. I'll just
fill in the gaps with amusing babel and
pointless drivel to make this paragraph
longer than the other one.
Then one sentence for visual interest.

Similarly, in an okudagram appearing in the  episode , text regarding the Treaty of Armens included such commentary as: "You might think that this is incredibly clever stuff. Boy are you wrong." A more significant chunk of text read the following:

Rick is initially getting a  and  reference into the text. You know, the two cute girls with the big guns. We might also mention Akira, Ranma Nibunnoichi, Urusei Yatsura, Rhea Gall Force and a few other animated films. The Federation at this point seems more tangled up in paperwork than the Iran-Contra Scandal business. We can do search-and-replace. Come to think about it, that's what the Shellac [sic] want do with the colony on the planet. This section deals with the right of each party to confer with the other in the event that something screwy happens with the treaty.

External link
 
Plot devices