its really easy as long as you have access to a press.
I actually got my 79 xs650 cheap as the po couldn't work out how to remove it. The blank end that you see in the case is actually the end of the bearing housing NOT part of the engine case.
The needle bearing housing is extremely thin and easily deformed. It it needs to be carefully pressed out from the inside of the case. Don't try press or drift the bearing out from the outside of the case
First make note of where the bearing sits in the case to ensure it is pressed into excactly the same original position. Use a micrometer if you have one. Mine sat with the lip of the bearing slightly proud of the surrounding case by approx 2mm
Place the selector drum loose ,in its normal position with the spigot inserted in the bearing . Line up the press on the screw at the other end of the selector drum. Then very slowly press the bearing out making sure you keep everything in line.
It doesn't require huge force simply accurate alignment so a hand press will probably do fine although I got mine pressed by a cnc mill at the local engineering shop for free .
Use the gear selector drum again to press the new bearing into place from the inside of the case. Make sure you don't press it in too far in.
Apologies for poor video quality