0

I am running ubuntu server in a virtualbox. The ubuntu server has a LXD container inside which i wish to install a software(specifically, Oracle DB).

I connect to my virtual ubuntu server using SSH -X username@ip from my local machine and whenever i open any GUI application it port forwards my request to the local machine and displays it as expected.

Now i need the same kind of port forwarding when i run my Oracle installer inside the LXD but I instead get

Could not execute auto check for display colors using command /usr/bin/xdpyinfo. 
Check if the DISPLAY variable is set.

Currently my steps are:

1) From my local machine,i do SSH -X username@ip after starting my virtual machine in virtualbox.

2) I then do

sudo lxc exec container -- sudo --login --user ubuntu

3) Here, i have a copy of my installer. I tried running it and got the error

Could not execute auto check for display colors using command /usr/bin/xdpyinfo. 
Check if the DISPLAY variable is set.

So, Port forwarding works fine from inside just the virtualbox but not from inside the LXD container of the virtualbox. Kindly help.

I checked my /etc/ssh/sshd_config file and yes, the x11forwarding is set to yes. I also changed my DISPLAY variable inside lxd to localhost:10.0 and :0 but had no luck.

0

There should be no need to set DISPLAY manually:

  1. On the client check for ForwardX11 yes in ~/.ssh/config or use ssh -x.
  2. On the server X11Forwarding yes must specified in /etc/ssh/sshd_config
  3. The xauth program must be installed on the server side.

References: How to forward X over SSH to run graphics applications remotely?

4
  • Yes, i verified all the above parameters and it still shows cannot open display – Vishal .R Oct 1 '18 at 10:51
  • Have you configured the netowork inside the container? – Marcelo Roberto Jimenez Oct 1 '18 at 12:39
  • Yes, i have. Infact i have postgresql installed in my LXD and i am able to communicate with it from outside without any issues. – Vishal .R Oct 3 '18 at 4:46
  • 1
    Thank you so much for your efforts. I found out the mistake from the network part you suggested. My port 22 was not open to traffic. I did that with iptables -I INPUT -p tcp --dport 22 -j ACCEPT – Vishal .R Oct 3 '18 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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