If I ssh -X from my ubuntu machine into my work linux computer and then try to run emacs I get:
X11 connection rejected because of wrong authentication.
Is there any way to fix that without being root on the work machine?
I found many years ago that ssh -X no longer worked, and that I had to use ssh -Y instead. I don't remember the technical explanation, the "SSH for Dummies" explanation was "-X only gives you half the connection you need, -Y gives you the whole thing".
The other requirement that I usually miss when setting up a new target machine is having the xauth package installed on the target machine; if this isn't installed on your work machine, you will need to be root to install it, or you'll have to have someone who does have root install it for you.