From 31cc69cfa0110cb9ca006570dfac0211faf509da Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Fri, 21 Jan 2011 10:14:31 +0100 Subject: [PATCH] Fixed untrusted X11 forwarding when logging in. Best explained here: http://www.mail-archive.com/cygwin-xfree@cygwin.com/msg17927.html --- lib/vagrant/ssh.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index c300d6b6a..86ca5bde9 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -44,7 +44,12 @@ module Vagrant "-o StrictHostKeyChecking=no", "-o IdentitiesOnly=yes", "-i #{options[:private_key_path]}"] command_options << "-o ForwardAgent=yes" if env.config.ssh.forward_agent - command_options << "-o ForwardX11=yes" if env.config.ssh.forward_x11 + + if env.config.ssh.forward_x11 + # Both are required so that no warnings are shown regarding X11 + command_options << "-o ForwardX11=yes" + command_options << "-o ForwardX11Trusted=yes" + end # Some hackery going on here. On Mac OS X Leopard (10.5), exec fails # (GH-51). As a workaround, we fork and wait. On all other platforms,