Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISPLAY defaulting to host IP #698

Open
akwebb1 opened this issue May 28, 2021 · 9 comments
Open

DISPLAY defaulting to host IP #698

akwebb1 opened this issue May 28, 2021 · 9 comments
Assignees
Labels
Implemented Been there. Done that.

Comments

@akwebb1
Copy link

akwebb1 commented May 28, 2021

I have been using Pengwin with X410 and a firewall rule so that I don't have to set X410 network access to public for quite a while very happily. This has been fine until a recent update. Now Pengwin is using my 192.168.1.x address for the DISPLAY variable instead of the subnet range 172.16.0.0/12 which it used to as well as my other WSL distros breaking my X11 app connectivity. I don't want to add 192.168.1.x to my firewall rules since I might be on someone else's network when mobile. I modified 00-penguin.sh to eliminate this functionality for now but if it is ever updated I will have to keep track of that. Maybe somehow make it optional on which network to set the DISPLAY variable since keeping it on 192.168.1.x is not secure on an unknown network.

@crramirez
Copy link
Collaborator

Hello @akwebb1,

Did you change recently the language of your Windows from / to English?

Regards

@akwebb1
Copy link
Author

akwebb1 commented May 28, 2021

No, I have not changed anything like that. I did reinstall the Pengwin distro at some point recently but that is about it. I have done that many times without this happening.

@crramirez
Copy link
Collaborator

What you are describing is the default behavior of Pengwin. It looks for the IP where you have the internet gateway. Because using this IP, you don't have to open the firewall port for xserver. In general, you don't need to care about it.

I asked about the language because the Windows commands are localized. ipconfig returns different words depending on the localization, so Pengwin, when it doesn't understand the result, goes for the internal IP.

This behavior has not changed in many months. The only recent change there is that now Pengwin checks if the DISPLAY variable is already set to avoid breaking WSLg

We will perform some test to ensure that anything has changed in recently.

Thanks for reporting

@akwebb1
Copy link
Author

akwebb1 commented May 28, 2021

Sorry about the false alarm with the IP change. I went to some backups and It looks like I have a script executing that has changed behavior recently. Prior to the change it was resetting the DISPLAY variable without me realizing it and now it doesn't which is what started the problem for me.

I still have the issue with the firewall since all of my other distros use the 172 network. I will either have to keep the Pengwin modification I made to use the 172 range or the other distros to use my host IP. I also have full HYPER-V machines using the firewalled 172 range as well. I have a lot of X11 going on. In the end it is not that big of a deal since Pengwin is my Primary distro and I am not sure how it would be made optional which is what my original post was about. As always, thank you for your time and support.

@crramirez
Copy link
Collaborator

It might be a good idea to check for a hidden file that changes the behavior. Probably you are not the only one with this problem.

I will add it to the roadmap.

@crramirez
Copy link
Collaborator

And you are very welcome

@crramirez crramirez added the To Implement This is something we should implement. label May 30, 2021
@crramirez crramirez self-assigned this May 30, 2021
@crramirez crramirez added Implemented Been there. Done that. and removed To Implement This is something we should implement. labels Oct 16, 2022
@crramirez
Copy link
Collaborator

Hello @akwebb1,

We released today an update to the pengwin-base package that checks if the file ${HOME}/.config/pengwin/display_ip_from_dns exists. If it does, it will use the IP from /etc/resolv.conf instead of the host one.

We will soon include an option in pengwin-setup for this feature.

Hope it helps.

@crramirez
Copy link
Collaborator

We added an option in pengwin-setup to choose between getting the IP from Host or resolv.conf

@Wielding
Copy link

Thank you. I have not been using WSL lately since I have been mostly using my new System76 Linux box. I will check it out when I return to doing some development under Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implemented Been there. Done that.
Projects
None yet
Development

No branches or pull requests

3 participants