This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 462
462
"init" : true ,
463
463
"buildArg" : " _VSC_INSTALL_DESKTOP_LITE" ,
464
464
"entrypoint" : " /usr/local/share/desktop-init.sh" ,
465
+ "containerEnv" : {
466
+ "DISPLAY" : " :1"
467
+ },
465
468
"include" : [
466
469
" cpp" ,
467
470
" kubernetes-helm" ,
Original file line number Diff line number Diff line change @@ -206,11 +206,17 @@ EOF
206
206
# Container ENTRYPOINT script
207
207
tee /usr/local/share/desktop-init.sh > /dev/null \
208
208
<< EOF
209
- #!/bin/bash
209
+ #!/bin/bash
210
210
211
211
USERNAME=${USERNAME}
212
212
LOG=/tmp/container-init.log
213
213
214
+ export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:- " autolaunch:" } "
215
+ export DISPLAY="${DISPLAY:-: 1} "
216
+ export VNC_RESOLUTION="${VNC_RESOLUTION:- 1440x768x16} "
217
+ export LANG="${LANG:- " en_US.UTF-8" } "
218
+ export LANGUAGE="${LANGUAGE:- " en_US.UTF-8" } "
219
+
214
220
# Execute the command it not already running
215
221
startInBackgroundIfNotRunning()
216
222
{
@@ -280,7 +286,7 @@ sudoIf chown root:\${USERNAME} /tmp/.X11-unix
280
286
if [ "\$ (echo "\$ {VNC_RESOLUTION}" | tr -cd 'x' | wc -c)" = "1" ]; then VNC_RESOLUTION=\$ {VNC_RESOLUTION}x16; fi
281
287
screen_geometry="\$ {VNC_RESOLUTION%*x*}"
282
288
screen_depth="\$ {VNC_RESOLUTION##*x}"
283
- startInBackgroundIfNotRunning "Xtigervnc" sudoUserIf "tigervncserver \$ {DISPLAY:-:1 } -geometry \$ {screen_geometry} -depth \$ {screen_depth} -rfbport \$ {VNC_PORT:-5901} -dpi \$ {VNC_DPI:-96} -localhost -desktop fluxbox -fg -passwd /usr/local/etc/vscode-dev-containers/vnc-passwd"
289
+ startInBackgroundIfNotRunning "Xtigervnc" sudoUserIf "tigervncserver \$ {DISPLAY} -geometry \$ {screen_geometry} -depth \$ {screen_depth} -rfbport \$ {VNC_PORT:-5901} -dpi \$ {VNC_DPI:-96} -localhost -desktop fluxbox -fg -passwd /usr/local/etc/vscode-dev-containers/vnc-passwd"
284
290
285
291
# Spin up noVNC if installed and not runnning.
286
292
if [ -d "/usr/local/novnc" ] && [ "\$ (ps -ef | grep /usr/local/novnc/noVNC*/utils/launch.sh | grep -v grep)" = "" ]; then
You can’t perform that action at this time.
0 commit comments