In a large skillet, lightly brown bacon. Add chopped onion, and sauté until onions are tender. Add liquid from green beans along with sugar, salt and vinegar. Stir, add green beans and stir again lightly making sure all the green beans are coated. Bring to a simmer, reduce heat, and continue simmering and stirring occasionally until most of the liquid is gone.