Yes, it works! You can produce X-rays with a simple HV rectifier valve. This is a picture of a potted TV cascade I made at home (a lot more impressive with a real picture viewer):
NOTE: Bob Templeman describes similar experiments in his article in "the bell jar". Though I did this independently, you might want to have a look at his method and equipment too, he also lists some (US) types of valves that are suitable.
WARNING: X-rays are dangerous. If you're not familiar with the precautions to take, READ THE SPECIAL SAFETY HINTS. You will need some means of measuring X-rays. A simple geiger counter (e.g. available as kits for roughly 100DM) will do. This should give 20 pulses or so per minute with normal background radiation and visibly more with X-rays. The radiation is by far not as high as from medical units, but still made my geiger counter "hum" at 2m distance and even through the room door. A more precise measurement carried out with a commercial dosemeter showed over 100uSv/h at 0.5m distance.
X-rays are produced when fast electrons hit matter. Fast electrons
are produced in a high vacuum tube by setting them free from the
cathode, accelerating them through a high voltage, and having them hit
the metal anode. There, they turn 0.1-1 % of their energy into X-rays
(the rest goes into heat).
So to make your own X-rays, you need a high vacuum tube first of all, and one that withstands high voltages of over 30kV. Certain tubes from old TV's are good for this, for details see the more technical section. The above photo shows two different rectifier tubes as an example. These tubes basically consist of a filament inside an anode cylinder. Normally, the filament is heated, thus setting free lots of electrons, which are then driven to the anode when it is positive (=> current flows), but not when it is negative. The more disk-like shield prevents the electrons from the filament being driven out of the anode cylinder into the glass then. This way, the tube rectifies an alternating voltage.
For our purposes, we don't need the filament. If a high enough voltage is applied, electrons are released from the negative electrode without heating it. This is due to a not really perfect vacuum (still some air in there). The voltage at which this happens (the "onset voltage") depends on how perfect the vacuum is and on the geometry of the electrode which is negative. Less perfect vacuum and sharper edges lower the voltage. Typical values are 10kV when the usual cathode (filament) is negative and 40kV when the usual anode (cylinder) is negative. We want high penetrating power, so we apply 40kV to the rectifier "in reverse", i.e. cylinder negative, filament positive. It will then produce X-rays of sufficient penetrating power to get through the glass and be measured somehow.
So far the basics. Of course, to make it work, there are some more details to be thought of. See the technical details section for this.