Skip to content

Commit 1613397

Browse files
author
Reto Gmür
committed
Setting DISPLAY variable for xpra in a way to also allow connecting with ssh -X (instead of xpra)
1 parent 6b80d3f commit 1613397

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ VOLUME /home/user
2323

2424
ENV DISPLAY=:100
2525

26-
RUN echo DISPLAY=$DISPLAY >> /etc/environment
26+
ADD xpra-display /tmp/xpra-display
27+
RUN echo "$(cat /tmp/xpra-display)\n$(cat /etc/bash.bashrc)" > /etc/bash.bashrc
2728

2829
# Start SSH anx Xpra
2930
CMD mkdir -p /home/user/.ssh/ && chown -R user:user /home/user \

xpra-display

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if [ -z "$DISPLAY" ]; then
2+
export DISPLAY=:100
3+
fi

0 commit comments

Comments
 (0)