Interestingly the explanation I've always known before is the shutter was opened and then the flash was set off. Originally this would have been the action of removing the lens cap but by the time a shutter system was being used the flash was no longer a magnesium flash pan is was a flash bulb.From your interest in photography, you will; be aware of the 'Bulb' setting of a camera shutter. More recently, one would use a cable shutter release (or, even more recently, an electronic equivalent) in order to keep the shutter open for as long as one wanted, but originally it was done pneumatically by squeezing a rubber 'bulb' (the shape of a bulb which grows in the ground) attached to the camera mechanism by tubing
Kind Regards, John
As to the shutter release mechanism, my gut feeling is the cable would have come first, such as this example:
Further I imagine pneumatic solutions in the 19th century would potentially be rather bulky. The images of cameras I've found in my quick google search with such systems appear to be more recent.
However this is my gut feeling and I have not attempted to look for a definitive answer.