I'd like to open a PNG image in GIMP, change its DPI, and save it (overwrite the original file). I only want to change the DPI and nothing else. I mean size, colors, transparency, compression etc. must not change. What should I do exactly?
You can use Image > Print Size, to change the PPI without resampling the image, i.e. while maintaining the same size in pixels.
In the Print Size dialog, you can either set the PPI you want and GIMP will work out the print size, or change the physical print size, and GIMP will calculate the PPI.