Lebanon's parliament elected Gen. Joseph Aoun as president on Thursday, ending the country's two-year presidential vacuum.