# X  forward, can start virtualbox, but not console? On/off

## madchaz

Hello all, 

having a bit of a weird problem. Feel free to move this post if it's the wrong place, because I honestly don't know where else to put it. 

My server is a headless gentoo box running, among other things, a lot of virtual machines. Due to USB problems in qemu-kvm, I had to switch to virtualbox. 

This morning, I ran into a very weird problem I can't figure out for the life of me. I normally login to the machine from my windows desktop, using mobaxterm as a X server. This as and still does work well, but this morning, I can't use this setup to start virtual machines with a visible/usable console. 

Edit: I tested it from my linux netbook as well and I get the exact same results with ssh -Y

```
shenron ~ # VirtualBox
```

This works fine. VirtualBox gui starts and I can play with the virtual machines, create them, delete, etc. However, if I try to start one, I get this in the console I started VirtualBox from. 

```
X11 connection rejected because of wrong authentication.
```

Starting it from the console, I get this. 

```
shenron ~ # VBoxManage startvm dragonball1

Waiting for VM "dragonball1" to power on...

X11 connection rejected because of wrong authentication.

VBoxManage: error: The virtual machine 'dragonball1' has terminated unexpectedly during startup with exit code 0

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine, callee

```

But this works fine. 

```
shenron ~ # VBoxManage startvm dragonball1 --type headless

Waiting for VM "dragonball1" to power on...

VM "dragonball1" has been successfully started.

```

I could use a console for at least booting the livecd ...

----------

## madchaz

I'm not completly confused. I haven't changed anything and the problem went away?

Yea, confused.

----------

## madchaz

Using VBoxSDL to start virtual machines with a console appears to bypass the issue. When it came back, I still had the issue with VBoxManage and Virtualbox GUI, but VBoxSDL was able to do it. 

Still no clue as to why, but it doesn't appear to have anything to do with SSH, as even using a "local" terminal over vnc, still had the issue.

----------

