Lindsay Lohan won't have to go to jail -- for now -- if she follows the conditions of her bail as set forth by a Los Angeles judge Monday morning.
PHOTOS: Lindsay's wild week in Cannes
Judge Marsha Revel ruled the actress, 23 (who showed up to courtroom about 10 minutes late, which her lawyer, Shawn Chapman Holley, blamed on a "security issue" with her SUV downstairs), must put a SCRAM alcohol-monitoring bracelet on within 24 hours, avoid drinking alcohol, submit to random drug testing once a week and attend the remainder of her alcohol education classes at a rate of one per week.
PHOTOS: How Lindsay's face has changed
Her lawyer argued that it will be difficult for Lohan -- who showed up in oversized sunglasses, her hair pulled back into a pony tail and a black blazer and white-collared shirt -- to wear the bracelet.
"I'd like to make the court aware of a couple of things and an alternate suggestion. Miss Lohan has a number of upcoming photo shoots and well as [she'll be] continuing to film a movie in Texas," Holley said. "The SCRAM device would interfere with all of that. Miss Lohan is not, however, getting out of being monitored. For that reason, our alternative suggestion is that she be randomly tested for drugs and alcohol."
PHOTOS: Child stars gone bad
Replied Judge Revel, "She needs to submit to random drug testing here, not in Texas. [I want] no excuse for her to say it's random [when it's not]... I'm afraid she's going to have to delay [filming] for now."
Holley argued that Lohan shouldn't have to wear the SCRAM bracelet in Los Angeles, and could instead undergo local alcohol and drug testing to "obviate the need for a bulky bracelet that would interfere with her work," which the judge turned down.
Said Judge Revel: "Will Lohan accept the conditions of her bail?" Lohan could have faced 180 days in prison if she violated the terms of her probation after she was convicted of her second DUI in 2007.
Holley whispered to Lohan for about a minute, and then turned to the judge and said, "We'll accept the court's conditions."
PHOTOS: Lindsay: Where did it all go wrong?
Judge Revel then set a formal hearing for July 6 at 8:30 a.m. to determine if Lohan had violated her probation. "Just to remind you, you're not allowed to drink any alcohol or beverage, you need your SCRAM bracelet on within 24 hours, and you'll submit to random drug testing."
Revel said that Lohan is responsible for contacting the drug-testing agency. "Failure to show up for random drug testing is the same as having a dirty test to the court. The court wishes to be notified immediately if there's a a missed test or a positive test."
She's only allowed to miss an alcohol education class if it interferes with her random drug testing.
When asked by the judge if she understands and accepts the terms and conditions, Lohan said, "Yes, your honor."
Holley then asked again if Lohan could take her remaining alcohol classes back-to-back, but the judge said she must take them once a week unless "she wants to do extra ones."
The prosecutor requested proof that Lohan had booked a ticket to return from Cannes in time for her May 20 hearing and that she'd set up an appointment with the embassy to get a duplicate passport. (Holley said she had a flight on May 19, and had copies.)
Holley also pointed out that Lohan's uncle died earlier this month as a reason that she had missed alcohol education classes. The judge asked if she went to the funeral, and Holley admitted she did not.