GIMP draw straight line
As GIMP is an image manipulation program, working on pixels, there is no straight option to draw a straight line.
However, this easy tutorial GIMP trick will allow you to draw straight and smooth lines using GIMP drawing tool :
Select your drawing tool,
Put your mouse cursor where the line should start (if you have already used it, it will start at the last point of your last action),
Hold the key SHIFT, and move your mouse to the end of the line,
Click to draw the line according to the displayed guide.
How to draw a straight line in GIMP
It's that easy ! And if you want to draw a line with a fixed angle (like horizontal or vertical), hold the key CTRL on top of shift, only few different degrees of inclination will be allowed.
For a GIMP arrow, simply repeat the operation thrice.
How to draw a line in GIMP
First way, by simply using the pencil tool, and using keyboard contraols.
Select your drawing tool, for example the pencil :
Put your mouse pointer where the line should begin :
Move your mouse pointer to where the line should end :
Final step, click and see the GIMP straight line drawn on any image, on the currently selected layer :
How to make a rectangle in GIMP
This trick can also be used to draw a rectangle - althought it is not the only way.
Start by putting your mouse cursor in the first corner of the future rectangle.
Hold SHIFT + CTRL keys, and move the cursor to the second corner.
Repeat the operation until a rectangle is drawn on the image, it is that simple !
Of course, this operation requires a little bit of experience, to aim properly.
GIMP draw rectangle
Drawing a perfect GIMP rectangle might be easier by using guides.
Simply click on the rulers, on top or left of the image, and drag until the line is at the requested place.
Then, once the 4 rulers are properly placed, simply put your mouse cursor on the first corner, and use the previous tip, building lines using SHIFT + CTRL trick.
And a perfect rectangle will be drawn in a few clicks !
GIMP draw dotted line
Drawing a dotted line works a bit in a different way, but the process can also be used to draw a straign line.
Selecting the path tool, and making sure it is both on design edit mode, and the polygonal option is selected, click twice on the image, at the start and at the end of the desired dotted line.
Then, click the stroke path option, also accessible from Edit menu, or by right clicking on the selected path.
Select this menu, and there, expand the line style option. Make sure at first that the pattern radio button is selected.
In the line style option, select whatever you want : dashed line, straight line, dotted line, or even mix of dash and dot, the options are multiple.
And that is it, if the previous options have been properly selected, the requested dotted line, or dashed line, should appear on the picture.
To see it properly, select any other tool and clear the selection, to remove the path tool from the visible area.