Created
July 26, 2024 11:50
-
-
Save schtobia/a8e560da6c4abc219ce5e55516ad6606 to your computer and use it in GitHub Desktop.
systemd service for bind mounting the WSL X11 socket to /tmp/.X11-unix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: LGPL-2.1-or-later | |
# | |
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Mount WSL X11 socket | |
ConditionPathExists=/tmp/.X11-unix | |
ConditionPathExists=/mnt/wslg/.X11-unix | |
After=mnt-wslg.mount | |
Requires=mnt-wslg.mount | |
[Service] | |
Type=simple | |
ExecStart=mount --bind /mnt/wslg/.X11-unix /tmp/.X11-unix | |
ExecStop=umount /tmp/.X11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment