> How do I set the user agent string?
That depends on the browser.
> And how so I set it up like the Tor Browser Bundle?
In Firefox-based browsers, the option controlling the user agent is
"general.useragent.override". You can just copy the value of that setting
from Tor Browser and paste it into the other browser you want to use it in.
> I saw a discussion on whether a common setting like TBB or changing
settings like e.g. the Random Agent Spoofer extension is best. What is you
opinion, and may I ask why?
If you're using Tor, then that would easily be the Tor Browser's common user
agent string, simply because it's what every Tor user uses. Servers can tell
that you're using Tor, so if you identify yourself as a browser that Tor
Browser has never identified itself as, then you become incredibly unique.
Otherwise, I don't have an opinion one way or the other. I think the random
agent spoofer might be more effective against passive attacks (like routine
tracking) since automated systems will have a hard time distinguishing your
mixed up fingerprints, but a more determined adversary can probably figure
this out.
One thing I will point out is that the random agent spoofer can wreck the
functionality of certain websites if you set it to change your user agent
string too often. Some websites (especially old forums) depend on your
fingerprint to keep you logged in, rather than just using cookies like
they're supposed to. In effect, they will log you out any time your user
agent string changes.