I connect my MacBook Pro at work to various different external monitors, and my daughter uses a Samsung external monitor sometimes with her MacBook Air. With our laptops, the default has been that the external monitor shows up "mirrored," which is what you want, since that means the external monitor shows the same thing that is on the built in monitor. Not so good would be to come up in the extended desktop mode since that might not give you access to various menus, the dock etc. on the external display (those things would be on the built in monitor, which isn't working for you.
I can't promise you which it will be for you, but my experience has been that mirrored is the default (which is what you need), and to get extended desktop you need to go into the Displays Preference Pane and explicitly set that up.
If you really are going to try an external monitor, I'd get one at Best Buy or Amazon or somewhere like that who offers a no questions asked return policy in the first 14 or 30 days. So if you are stuck with your Mac in a mode that doesn't allow you to use the external monitor, you can return your purchase.
I also have a G5 iMac, and frankly, if the monitor went out, I'd simply replace the computer. The other parts inside are probably wearing out also. The February 2013 issue of Macworld discusses the latest Mac Mini's, which cost only $599 or $799 and are extremely fast and capable machines. These are Apple's "low end," and they are really superb machines. And if you get an external monitor, you can use it also with the Mini. By the way, if you buy an external monitor, I recommend staying away from the cheap loss leader units that are often advertised and instead spend a little more to get a quality Samsung or other good brand name monitor, possibly an LED one. The quality of the screen and images and resolution do make a big difference in the use experience. I got my daughter a low-cost ACER monitor first, and she is a photographer and demands high quality images on her screen, eventually we traded it back in at Best Buy (Best Buy has a nice trade in policy where you get a credit) and replaced it with a high quality (costlier) Samsung LED monitor.
The G5 iMac is so limited, both in its hardware and software, that I'd say if you can afford it, look at the latest Mac Mini or iMacs. Even the low-end ones are probably x10-x20 times faster and more capable than the iMac G5 and you can do all the latest things with them.