getting x11 forwarding to work with ssh

4,325 views
Skip to first unread message

Marvin Thielk

unread,
Sep 23, 2013, 2:35:41 PM9/23/13
to vagra...@googlegroups.com
Hi,

I've set config.ssh.forward_x11 = true in my vagrant file but $DISPLAY doesn't seem to be set on my VM and any X11 app doesn't work.

What should I do to get x11 forwarding working.

Thanks,
~Marvin





vagrant@precise64:~$ xclock &
[1] 1151
vagrant@precise64:~$ Error: Can't open display:
vagrant@precise64:~$ echo $DISPLAY

[1]+  Exit 1                  xclock

Walid

unread,
Sep 23, 2013, 2:44:56 PM9/23/13
to vagra...@googlegroups.com
One extra thing you need to check is your .ssh/config file if you have any and enable X Forwarding

Host *
   ForwardAgent yes
   ForwardX11 yes

kind regards

Walid


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Marvin Thielk

unread,
Sep 23, 2013, 3:38:40 PM9/23/13
to vagra...@googlegroups.com
I don't have any .ssh/config file

shane knapp ☠

unread,
Sep 23, 2013, 3:39:34 PM9/23/13
to vagra...@googlegroups.com
On Mon, Sep 23, 2013 at 12:38 PM, Marvin Thielk <marvin...@gmail.com> wrote:
I don't have any .ssh/config file

...and there's the cause of the problem.  :)

Marvin Thielk

unread,
Sep 23, 2013, 3:47:18 PM9/23/13
to vagra...@googlegroups.com
I'm running in windows (7) so I made a.ssh/config file and added 

Host *
   ForwardAgent yes
   ForwardX11 yes

but it didn't make a difference

Walid

unread,
Sep 23, 2013, 4:34:02 PM9/23/13
to vagra...@googlegroups.com
what do you use to ssh to your boxes? if it is putty then you need to configure it accordingly to the tool you use probably


--

Marvin Thielk

unread,
Sep 23, 2013, 5:04:42 PM9/23/13
to vagra...@googlegroups.com
vagrant ssh

Marvin Thielk

unread,
Sep 24, 2013, 1:34:18 PM9/24/13
to vagra...@googlegroups.com
what I completely forgot about was having an x-window system like cygwin installed on my host. -_-

Will Froning

unread,
Sep 23, 2013, 3:03:17 PM9/23/13
to vagra...@googlegroups.com
Not ideal, but "vagrant ssh -- -Y" also works.

Thanks,
Will

On 9/23/13 10:44 PM, Walid wrote:
> One extra thing you need to check is your .ssh/config file if you have
> any and enable X Forwarding
>
> Host *
> ForwardAgent yes
> ForwardX11 yes
>
> kind regards
>
> Walid
>
>
> On 23 September 2013 21:35, Marvin Thielk <marvin...@gmail.com
> <mailto:marvin...@gmail.com>> wrote:
>
> Hi,
>
> I've set config.ssh.forward_x11 = true in my vagrant file but
> $DISPLAY doesn't seem to be set on my VM and any X11 app doesn't work.
>
> What should I do to get x11 forwarding working.
>
> Thanks,
> ~Marvin
>
>
>
>
>
> vagrant@precise64:~$ xclock &
> [1] 1151
> vagrant@precise64:~$ Error: Can't open display:
> vagrant@precise64:~$ echo $DISPLAY
>
> [1]+ Exit 1 xclock
>
> --
> You received this message because you are subscribed to the Google
> Groups "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to vagrant-up+...@googlegroups.com
> <mailto:vagrant-up%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


--
Will Froning
Unix SysAdmin
Will.F...@GMail.com

John Jelinek

unread,
Nov 4, 2013, 3:55:53 PM11/4/13
to vagra...@googlegroups.com
I had a problem with this on Mac OSX 10.9. I didn't realize that X11 needed to be installed on my local machine. For anyone who's searching, install this http://xquartz.macosforge.org/landing/ and try again with vagrant ssh.

Pushkar Raste

unread,
Jul 3, 2014, 10:40:14 PM7/3/14
to vagra...@googlegroups.com
Hi
I tried this but I am still having problem with Mac OS X 10.9 

John Jelinek

unread,
Jul 7, 2014, 9:34:31 AM7/7/14
to vagra...@googlegroups.com
What's the problem?

Sent from Mailbox


You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/3moV7D7IAc4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages