Here is another way to generate a spanning tree in a non-uniform way. I added it as a answer, because the exercise  that is non-uniform is interesting enough.

Start with the set of $n$-vertices 1,..,n. Pick a random vertex and remove it. Pick a second vertex and leave it in the set. Connect the two vertices. Then repeat until there is only one vertex left in that set.