Skip to content

Commit

Permalink
Prevent "gio:" "operation not supported"
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensa committed Dec 12, 2019
1 parent c90110f commit cbaf957
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ USER root
# Set root home directory
ENV HOME=/root

# DBUS_SESSION_BUS_ADDRESS is lost with sudo (https://github.com/SeleniumHQ/docker-selenium/issues/358)
RUN printf "\nDefaults env_keep += \"DBUS_SESSION_BUS_ADDRESS\"\n" >> /etc/sudoers

# Add script to allow nvidia drivers installation
ADD install-nvidia-drivers.sh /usr/bin/install-nvidia-drivers.sh

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ prepare_docker_dbus_host_sharing() {
# System DBus
MOUNTS+=" --mount type=bind,source=/run/dbus/system_bus_socket,target=/run/dbus/system_bus_socket"
# User DBus unix socket
ENV_VARS+=" --env=DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
# Prevent "gio:" "operation not supported" when running "xdg-open https://rubensa.eu.org"
ENV_VARS+=" --env=DBUS_SESSION_BUS_ADDRESS=/dev/null"
}
prepare_docker_xdg_runtime_dir_host_sharing() {
Expand Down
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ prepare_docker_dbus_host_sharing() {
# System DBus
MOUNTS+=" --mount type=bind,source=/run/dbus/system_bus_socket,target=/run/dbus/system_bus_socket"
# User DBus unix socket
ENV_VARS+=" --env=DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
# Prevent "gio:" "operation not supported" when running "xdg-open https://rubensa.eu.org"
ENV_VARS+=" --env=DBUS_SESSION_BUS_ADDRESS=/dev/null"
}

prepare_docker_xdg_runtime_dir_host_sharing() {
Expand Down

0 comments on commit cbaf957

Please sign in to comment.