The present invention relates to a process for the production of hydraulic energy by direct osmosis from two saline solutions having different concentrations made to pass through one or more modules of semipermeable membranes having a double inlet and outlet port, originally designed to execute the process of inverse osmosis, without a requirement to realise any technical modification to said modules of membranes. In this manner, an osmotic potential is produced in the membranes creating a current of solution having a pressure sufficient to produce hydraulic energy. A further object of the present invention is the installation designed to produce hydraulic energy according to the stated procedure and the use thereof, together with a desalination plant and a tertiary waste water treatment plant comprising the installation to produce hydraulic energy.