In 2002, first experiments at the Advanced Light Source (ALS) at Berkeley, allowed us to test a first prototype of EUV Hartmann wave-front sensor. Wave-front measurements were performed over a wide wavelength range from 7 to 25 nm. Accuracy of the sensor was proved to be better than λEUV/120 rms (λEUV = 13.4 nm, about 0.1 nm accuracy) with sensitivity exceeding λEUV/600 rms, demonstrating the high metrological performances of this system. At the Swiss Light Source (SLS), we succeeded recently in the automatic alignment of a synchrotron beamline by Hartmann technique. Experiments were performed, in the hard X-ray range (E = 3 keV, λ = 0.414 nm), using a 4-actuators Kirkpatrick-Baez (KB) active optic. An imaging system of the KB focal spot and a hard X-ray Hartmann wave-front sensor were used alternatively to control the KB. The imaging system used a genetic algorithm to achieve the highest energy in the smallest spot size, while the wave-front sensor used the KB influence functions to achieve the smallest phase distortions in the incoming beam. The corrected beam achieved with help of the imaging system was used to calibrate the wave-front sensor. With both closed loops, we focused the beam into a 6.8x9 μm2 FWHM focal spot. These results are limited by the optical quality of the imaging system.