I was planning to jsut have the other end of the unit going out of the window like you mentioned, however I guess this would also allow hot air to get in? Nibble what do you do for this?
Well, as suggested a specific hole in the glass is the best option. The same as the ones used in bathrooms to let steam out.
Personally, since the window sits behind the board, I bought three meters of flexible aluminium duct, I modified the unit's vent mouth to fit the duct and I run it outside the door in the middle of the living room, leaving opposite windows open.
It works.
Of course, nothing will work as well as a proper wall mounted unit the expels hot air ouside via specific ducts.