Typically, yes, the longer axis is the "X". But many people call the axis along the gantry the X axis, so that what they see on the screen matches what they see at the machine.
You can't display the toolpath with X going from top to bottom (front to back). So you either stand at the side of the machine, or swap the axis, if you want what's on the screen to match what you're looking at at the machine.