Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've set up a Vagrant VM with X forwarding. I'm connecting to it with the following command (to improve X performance):

ssh -c arcfour,blowfish-cbc -XC vagrant@VM-NAME

This works fine; I log into the VM and whenever I launch an X Windows application it is rendered in my local X client.

However, after around 15 - 30 minutes use, I start getting the following error when launching X Windows applications:

vagrant@VM-NAME:~/$ firefox
Error: cannot open display: localhost:10.0

This persists until I disconnect my SSH connection and reconnect. Oddly, any X Windows applications I've already launched keep running normally.

The error happens regardless of whether I'm using tmux or not. My system details are as follows:

Host

Mac OS X 10.7.5
VirtualBox 4.2.6 r82870

Client

Ubuntu 12.04 (precise)
Kernel 3.2.0-35-generic (#55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012)
Xorg 1.11.3 (29 August 2012  12:12:33AM)

I've installed the full ubuntu-desktop package on the VM.

Any ideas on how to fix this? I've found plenty of documentation and issue reports surrounding X forwarding not working at all, but nothing relating to eventual failure.

N.B: I have upgraded my SSH client and XQuartz to the very latest versions but the problem persists. It does not happen, however, if I use the regular vagrant ssh command to connect to the VM.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I have answered the related question over on stack exchange:

Intermittent Error: cannot open display: localhost:10.0 with Vagrant

In short, use -Y in the ssh config and you'll be ok.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.