mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Reduce (superficial) xdg dir permissions errors on khoj computer start
This commit is contained in:
@@ -117,8 +117,14 @@ ENV DISPLAY=":$DISPLAY_NUM"
|
|||||||
# Expose VNC on port 5900
|
# Expose VNC on port 5900
|
||||||
# run Xvfb, x11vnc, Xfce (no login manager)
|
# run Xvfb, x11vnc, Xfce (no login manager)
|
||||||
EXPOSE 5900
|
EXPOSE 5900
|
||||||
CMD ["/bin/sh", "-c", " export XDG_RUNTIME_DIR=/run/user/$(id -u); \
|
CMD ["/bin/sh", "-c", " USER_ID=$(id -u); \
|
||||||
mkdir -p $XDG_RUNTIME_DIR && chown $USERNAME:$USERNAME $XDG_RUNTIME_DIR && chmod 0700 $XDG_RUNTIME_DIR; \
|
RUNTIME_DIR_PATH=/run/user/$USER_ID; \
|
||||||
|
sudo mkdir -p $RUNTIME_DIR_PATH; \
|
||||||
|
sudo chown $USERNAME:$USERNAME $RUNTIME_DIR_PATH; \
|
||||||
|
sudo chmod 0700 $RUNTIME_DIR_PATH; \
|
||||||
|
export XDG_RUNTIME_DIR=$RUNTIME_DIR_PATH; \
|
||||||
|
mkdir -p $XDG_RUNTIME_DIR/dconf; \
|
||||||
|
chmod 0700 $XDG_RUNTIME_DIR/dconf; \
|
||||||
Xvfb $DISPLAY -screen 0 ${WIDTH}x${HEIGHT}x24 -dpi 96 -auth /home/$USERNAME/.Xauthority >/dev/null 2>&1 & \
|
Xvfb $DISPLAY -screen 0 ${WIDTH}x${HEIGHT}x24 -dpi 96 -auth /home/$USERNAME/.Xauthority >/dev/null 2>&1 & \
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
xauth add $DISPLAY . $(mcookie); \
|
xauth add $DISPLAY . $(mcookie); \
|
||||||
|
|||||||
Reference in New Issue
Block a user