Kieran Ridley, 32,  poured petrol onto a nearby bin and lit it, the High Court in Edinburgh was told.
He then left the property at Mallaig, Lochaber, having locked the front and back doors and some windows.
Mr Ridley denies the charges. His lawyers argue he was not criminally responsible due to mental disorder.
The court was told that 11 people were inside the property including four children between the ages of two and 16.
In a statement agreed by the Crown and Mr Ridley's defence team, the court heard that Mr Ridley turned on the gas valves on the kitchen cooker  late on 27 October last year.
At some point between 23:00 and 23:30 he poured petrol onto a nearby waste bin and set fire to it, causing cladding and a skirting board to catch light.
He then left the house, having locked both front and rear doors and some of the windows.
The trial heard that Mr Ridley, whose address was given as HMP Inverness, was detained by police later that night at Cameron Avenue, Mallaig
The people in the house - called Mallaig Mhor- included his mother, brother, children aged two, eight, 15 and 16 and five other adults.
The trial, before judge Craig Scott QC continues on Monday.
A man accused of attempting to murder 11 people at a remote Highland holiday home started a fire after opening gas valves on a cooker, a court has heard.