In front of the trigger and grip, there appears to be a cutout to mount it on a board, or bar of some sort.
It would help if someone could identify the rank insignia on his uniform.
I’d guess that it was a flare gun for either illumination or signalling.
We’re thinking on the same lines. But you were first!
My second guess would be an artillery apparatus. Perhaps something to fire a co-axial sensing round for sighting in the main gun?
We got any Redlegs around here?
Supposedly the Irish Royal Ulster Rifles regiment, WWI.