Fast, easy and accurate measurement of geometry of numerically controlled machines has always been challenging. With the use of a laser interferometer, it can be precise but it is complex. On the other side, the use of granite reference blocks is fairly easy yet quite limited for many machine types and sizes. Nowadays the improvements in technology open a new waythe instruments based on the detection of laser beam spot position. Those instruments are accurate and easy to use yet, comparing to the laser interferometers and granite blocks, they are sensitive to parameters of a laser source and to changing environmental conditions. In the paper, we analyse experimentally the influence of the type and parameters of laser source on the accuracy of straightness measurements. The most commonly met in practical applications a free space and fibre based laser sources are studied and compared. The influence of environmental conditions on measurement accuracy is also shown. Finally, the conclusions about optimal methods of improving the accuracy of beam position detection methods are drawn.