Hosni Mubarak lies on a stretcher as he listens to the opening proceedings in a holding cell in court. Photograph: AFP/Getty Images

It was a sight that most Egyptians scarcely imagined they would ever see: ex-president Hosni Mubarak in a courtroom cage on Wednesday morning at the start of his trial.

The man who exercised supreme power over the country for almost 30 years is now in the dock along with his sons and other former officials, charged with corruption and other crimes.

It was in similar cages, though usually in less salubrious courtrooms, that countless other defendants were herded during the Mubarak years – ranging across the spectrum of political opponents and Islamist militants to the 52 men accused of homosexuality in the notorious Queen Boat trial.

For many, not only in Egypt, this will be seen as poetic justice: the public disgracing in front of the TV cameras of a once-omnipotent dictator who cared little about fair trials and was content to let his law enforcement officials torture people with impunity.

Unlike Saddam Hussein (overthrown and arrested by the Americans but tried and executed by Iraqis), the toppling of Mubarak was a home-grown affair and for that reason is likely to have more impact among ordinary Arabs.

But let us hope that this will not simply be a show trial. The important thing (as I argued in a previous article) is not so much humiliation or punishment as accountability – bringing the corruption and misdeeds of the old regime into the daylight. The crimes need to be exposed in meticulous detail so that new boundaries can be set for acceptable behaviour in government. The usual kind of rhetorical speeches favoured by Egyptian lawyers will not help much in that.

It's also important that the court should behave with utter fairness, regardless of popular sentiment, in order to differentiate the case from trials under the old regime.

As Sarah Leah Whitson of Human Rights Watch noted in a press statement: "If these proceedings scrupulously reflect international fair trial standards, it will embody a clean break with the record of impunity that characterised Hosni Mubarak's rule, contribute to a new and hopeful chapter in Egypt's history, and set an important regional precedent."

There is also a risk that the trial – if mishandled – could generate some undeserved sympathy for Mubarak. He is 83 years old and clearly unwell, though how unwell is a matter of debate – some say he is exaggerating his illness for propaganda purposes. On Wednesday he was lying on his back on a stretcher as the case began.

The other potential hazard is that it could distract Egyptians from efforts to consolidate their revolution. The Supreme Council of the Armed Forces, which is now in charge of the country while elections are prepared, may be hoping that the trial will divert public attention from its own increasingly authoritarian behaviour.

It is a ploy that the Mubarak regime itself resorted to quite often, contriving to dominate the headlines with sensational court cases in times of political and economic difficulty.