Coder Social home page Coder Social logo

Comments (19)

Pololot64 avatar Pololot64 commented on June 18, 2024

(Got it and will respond but afk for a while)

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

First of all, I wrote the explanation in the website long before we knew what WSLg would be like. Now that is is almost out I am still deciding how to integrate them if it is still necessary

I do not know what is causing the conflict between both servers but I assume that there are multiple issues combined together. I cannot test for certain because I am unable to get the insider preview.

Is GWSL exporting the display for itself or did you remove the export code from .profile etc?

Also, it may make a difference if you try using the GWSL 1.3.8 beta. Sorry for my "all over the place" answer. I simply do not much information to work with and respond to :(

from gwsl-source.

UGatgithub avatar UGatgithub commented on June 18, 2024

I did not change any setup just installed and it worked fine with wsl2 but not with wsl2+wslg. I am awk now so I canβ€˜t check the version, but maybe it helps that I downloaded from Microsoft Store.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

It shouldn't matter whether it is the store version or not but feel free to post when available if you want to follow up with the issue. :)

Also, if you want you can sign up for the Store 1.3.8 beta which fixes many issues here: https://forms.office.com/r/CwwSkC9Arp

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

I would imagine that WSLg is likely setting its own display:

We preconfigure the user distro environment variables DISPLAY, WAYLAND_DISPLAY and PULSE_SERVER to refer these servers by default so WSLg lights up out of the box.

From https://github.com/microsoft/wslg#wslg-system-distro

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

You'd think the a .profile environment variable would override but idk.

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

You'd think the a .profile environment variable would override but idk.

I mean, I know using a .bashrc or any .[SHELL]rc file equivalent usually sets display for me, but I mean does .profile do that too?

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

If what I'm reading is correct though, the directory %userprofile%\.wslconfig (e.g. C:\Users\Pololot64\.wslconfig) is likely what is overriding any distro set environment variables.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

Hmm. The app launcher and shortcut creator set the variable per app so it should override there. Putting it in .profile should override as soon as you start a bash session

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

Hmm. The app launcher and shortcut creator set the variable per app so it should override there. Putting it in .profile should override as soon as you start a bash session

Well at least the source code is there, so maybe they are doing something funky as soon as a GUI application is detected and started.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

Hmm. Well I am closing this for now because it is not even out yet. Much can change

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

I also found constexpr auto c_wslgconfigFile = "/mnt/c/ProgramData/Microsoft/WSL/.wslgconfig";, on line 27 in https://github.com/microsoft/wslg/blob/main/WSLGd/main.cpp

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

πŸ€·β€β™€οΈ

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

I think I know where part of the culprit is though, towards the end of https://github.com/microsoft/wslg/blob/main/WSLGd/main.cpp there are some monitors with LaunchProcess, so I assume it's likely around there where the weirdness with DISPLAY being overridden is likely happening.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

I looked but I don't think it is related. It seems to handle the rdp connection on the windows side but tbh I do not read cpp very well. Also Idk if it is really a "bug" and if it even needs fixing. I was planning compatability with it but that was before anyone knew what it was

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

Or I might just be stupid, and it's just https://github.com/microsoft/wslg/blob/main/WSLGd/main.cpp#L187

where it initializes the following:

        {"HOME", passwordEntry->pw_dir},
        {"USER", passwordEntry->pw_name},
        {"LOGNAME", passwordEntry->pw_name},
        {"SHELL", passwordEntry->pw_shell},
        {"PATH", "/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"},
        {"XDG_RUNTIME_DIR", c_xdgRuntimeDir},
        {"WAYLAND_DISPLAY", "wayland-0"},
        {"DISPLAY", ":0"},
        {"XCURSOR_PATH", "/usr/share/icons"},
        {"XCURSOR_THEME", "whiteglass"},
        {"XCURSOR_SIZE", "16"},
        {"PULSE_AUDIO_RDP_SINK", SHARE_PATH "/PulseAudioRDPSink"},
        {"PULSE_AUDIO_RDP_SOURCE", SHARE_PATH "/PulseAudioRDPSource"},
        {"USE_VSOCK", socketFdString.c_str()},
        {"WSL2_DEFAULT_APP_ICON", "/usr/share/icons/wsl/linux.png"},
        {"WSL2_DEFAULT_APP_OVERLAY_ICON", "/usr/share/icons/wsl/linux.png"},
        {"WESTON_DISABLE_ABSTRACT_FD", "1"}

from gwsl-source.

Andrew-J-Larson avatar Andrew-J-Larson commented on June 18, 2024

I looked but I don't think it is related. It seems to handle the rdp connection on the windows side but tbh I do not read cpp very well. Also Idk if it is really a "bug" and if it even needs fixing. I was planning compatability with it but that was before anyone knew what it was

Yeah, well, at least for doing the switching, you know about the .wslconfig now. So that should help in doing the GUI switching.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

maybe

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

afk for now though

from gwsl-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.