1Caramelize onion, if doing so.
Slice off the root & top ends of the onion slices, peel the onions. Cut the onion in 1/2. Lay them cut side down & slice the onions lengthwise to desired thickness. If you want, you can cut a little wedge in the tough rootball end of the onions & discard that part. As this part of the onion softens and cooks with the rest over the long cooking time.
Use a wide, thick-bottomed sauté pan for maximum pan contact with the onions. Coat the bottom of the pan with olive oil, or a mixture of olive oil & butter (about 1 teaspoon per onion). Heat the pan on medium high heat until the oil is shimmering. Add the onion slices & stir to coat the onions with the oil. Spread the onions out evenly over the pan & let cook, stirring occasionally. Depending on how strong your stovetop burner is you may need to reduce the heat to medium or medium low to prevent the onions from burning or drying out. After 10 minutes, sprinkle some salt over the onions, & if you want, you can add some sugar to help with the caramelization process. (I add only about a teaspoon of sugar for 5 onions, you can add more.) One trick, by the way, to keeping the onions from drying out as they cook is to add a little water to the pan.
Let cook for 30 minutes to an hour more, stirring every few minutes. As soon as the onions start sticking to the pan, let them stick a little & brown, but then stir them before they burn. The trick is to let them alone enough to brown (if you stir them too often, they won't brown), but not so long so that they burn. After the first 20 to 30 minutes you may want to lower the stove temperature a little, & add a little more oil, if you find the onions are verging on burning. A metal spatula will help you scrape up the browned bits from the bottom of the pan as the caramelization proceeds. As the onions cook down, you may find you need to scrape the pan every minute, instead of every few minutes. Continue to cook and scrape, cook and scrape, until the onions are a rich, browned color. At the end of the cooking process you might want to add a little balsamic vinegar or wine to help deglaze the pan & bring some additional flavor to the onions.