Darko Fabijan wrote this on October 17, 2011

How to solve the losing X11 connection problem with VirtualBox on Mac OS Lion

We all know that today you cannot get a better desktop operating system than Mac OS. Together with great Apple hardware the bundle is an unbeatable desktop platform. But everybody in our team has been sailing with Linux for almost a decade and we still prefer it as a development platform. Paired with isolation that VirtualBox provides we just feel like at home in our Linux + VirtualBox development boxes.

Since we upgraded to Lion we got scared for a sec that we will have to leave VirtualBox + Linux behind because we just couldn’t solve an issue of losing X11 connection, which is of corse key for running Cucumber scenarios that require Firefox. After googling about the issue for 5th time we found a solution which is extremely simple and works well for us. You just need to add -Y when you are ssh-ing into your development box e.g. ssh -Y devbox.

Solution is documented in a message on Apple discussion forum - https://discussions.apple.com/message/16025066#16025066. Although some people reported that they still have some issues we haven’t experienced any of them.

comments powered by Disqus

About Darko Fabijan

Rendered Text co-founder. Enjoys breaking new ground and exploring tools and ideas that make lives of developers interesting and productive. Nowadays has less time to write code but has great pleasure in discussing it with the team. He spends his free time cooking, hiking and indoor gardening.

Suggested Reads

Rails Testing Handbook

A new ebook on building test-driven Rails apps with RSpec and Cucumber.

At Rendered Text, we have a long history with Ruby on Rails. Checking the blog archive reminds me that we published first posts about working with Rails way back in 2009.


Rendered Text is a software company. For questions regarding Semaphore, please visit semaphoreci.com. Otherwise, feel free to get in touch any time by sending us an email.