-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? Since we run this file as root already.
Note: replacing the unix-daemon socket /tmp/.x11-unix with a symlink to the unix-daemon socket of the wayland xserver running on the host is not a one-fits-all solution. Since the symlink points to the unix-daemon socket of the already running xerver from the wsl host vm, it will prevent the start of an xserver in the distrubtion. A solution is required before merging this PR into the main branch, as it will break behavior for systems running their own xserver in their distribution (e.g. with xrdp). Maybee there is a way to leverage the /dev/xdg device to provide hardware acceleration in a xserver running the distribution? |
It is just an "esotheric solution" that makes no sense on a second though. Though, I feel this snippet might suffer from race conditions - which is what made me |
I have no idea other than making an extra variable whether to enable WSLg or not. |
It's not needed since in such race conditions, the other parts of the file won't work neither. |
I can see how this might work if we introducde a new argument to install.sh (smth. like --wlsg) that writes and additional variable to /etc/bash.bashrc and add env_keep for it in /etc/sudoers.d/systemd-namespace. This way the variable would be available during Let my try the idea. Probably something like wdyt? |
You are right, it was useless in the first place. |
The generall idea works. Though, I added it as "--no-wslg". The default behavior will set the symlink, while not setting it requires the argument. The only thing left is to figure out how to identify the added line in /etc/bash.bashrc to update it when parameters change and when uinstalling. |
The current commit adds the parameter |
I found the another issue: the loop I introduced to check if packages are already installed breaks if the packages are not already installed. |
That one is fixed now as well. Good that I have tried to build a new image with my packer project and found the issues right away. |
Works out of the box on my xrdp packer project... BUT: it is terribly slow compared to the software render in full screen. |
I will merge this pr first. Lemme think of that thing too later. |
* add WSLg support * fix .X11-unix symlink * fix .X11-unix symlink permission * add additional WSLg variables to env_keep * add install.sh parameter --no-wsl * add install.sh parameter --no-wslg * only preserve wslg variables if --no-wslg is not used during installation. * fix package installation * ensure package install condition does not break Signed-off-by: Sung Mingi <[email protected]> Co-authored-by: meyayl <[email protected]>
Adds additional environment variables required for WLSg and replaces an existing /tmp/.X11-unix directory with a symlink to the .X11-unix socket provided by WSLg, in case it is not already a symlink.