If you want to draw a straight line in GIMP, you would select the tool that you want to use for the line. You can select the Pen, Pencil, Paintbrush hold Shift and clock a start point then click an endpoint, you can then release Shift. You can draw the line without holding a shift, however, it will be harder to draw a straight line without holding the Shift key.