Created
April 5, 2023 23:37
-
-
Save aodag/0154fc637ade893997923b5407fd12ed to your computer and use it in GitHub Desktop.
swayコンポジタをヘッドレスで立ち上げてwayvnc経由で接続可能にするやつ
This file contains 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
FROM debian:bookworm | |
ARG USERNAME=user | |
ARG GROUPNAME=user | |
ARG UID=1000 | |
ARG GID=1000 | |
RUN groupadd -g $GID $GROUPNAME && \ | |
useradd -m -s /bin/bash -u $UID -g $GID $USERNAME | |
COPY ./install.sh /usr/local/bin | |
RUN /bin/bash /usr/local/bin/install.sh | |
RUN mkdir -p /run/user/$UID | |
RUN chown ${USERNAME}:${GROUPNAME} /run/user/${UID} | |
EXPOSE 5900 | |
COPY ./run.sh /usr/local/bin | |
USER $USERNAME | |
WORKDIR /home/$USERNAME/ | |
ENTRYPOINT [ "/bin/bash", "run.sh" ] |
This file contains 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
apt update | |
apt install -y sway wayvnc xwayland |
This file contains 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
export WLR_BACKENDS=headless | |
export WLR_LIBINPUT_NO_DEVICES=1 | |
export WAYLAND_DISPLAY=wayland-1 | |
export XDG_RUNTIME_DIR=/run/user/$(id -u) | |
sway & | |
sleep 1 | |
export SWAYSOCK=$(ls $XDG_RUNTIME_DIR/sway-ipc.* | head -n 1) | |
swaymsg exec foot | |
exec wayvnc 0.0.0.0 |
Author
aodag
commented
Apr 5, 2023
- any1/wayvnc#165
- swaywm/sway#3769
- https://github.com/any1/wayvnc/blob/master/FAQ.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment