Peter Gallagher and Olivia Thirlby will co-star opposite Ben Aldridge in Fox’s single-camera comedy pilot Detour, from 20th Century Fox TV.

Inspired by the real-life story of Weezer lead singer Rivers Cuomo, Detour centers on Michael Sturges (Aldridge), a charming rock star who made the unexpected choice at age 30 to quit his band and go back to college. Gallagher plays the notorious Professor Zaring, while Thirlby plays Gabrielle, his confident teaching assistant. The pilot was written by Psych creator Steve Franks and will be directed by The Wedding Ringer’s Jeremy Garelick. Franks, Cuomo, Dan Field, Chris Henze and Willie Mercer executive produce.

Gallagher, who just became available after five seasons on USA’s Covert Affairs, is repped by Gersh and John Carrabino; Thirlby is repped by CAA, 3 Arts and attorney Stewart Brookman.