Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Run socat as a D-Bus proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Aug 16, 2023
1 parent ca48779 commit 5797ffd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions archlinux.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN systemctl enable xvfb@:99.service && \
useradd -m -U -G users,adm gnomeshell && \
mkdir -p /var/lib/systemd/linger && \
touch /var/lib/systemd/linger/gnomeshell && \
systemctl --global enable dbus-socat@1234 && \
systemd-machine-id-setup

# dbus port
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<listen>tcp:host=0.0.0.0,port=1234</listen>
<listen>systemd:</listen>
<apparmor mode="disabled"/>
<auth>ANONYMOUS</auth>
Expand Down
9 changes: 9 additions & 0 deletions common/etc/systemd/user/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Exposes D-Bus on TCP port %I
After=dbus.socket

[Service]
ExecStart=/usr/bin/socat TCP-LISTEN:%i,fork UNIX-CONNECT:%t/bus

[Install]
WantedBy=default.target
3 changes: 2 additions & 1 deletion debian.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ RUN systemctl enable xvfb@:99.service && \
systemctl mask systemd-oomd low-memory-monitor rtkit-daemon udisks2 && \
useradd -m -U -G users,adm gnomeshell && \
mkdir -p /var/lib/systemd/linger && \
touch /var/lib/systemd/linger/gnomeshell
touch /var/lib/systemd/linger/gnomeshell && \
systemctl --global enable dbus-socat@1234

# dbus port
EXPOSE 1234
Expand Down
3 changes: 2 additions & 1 deletion fedora.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN systemctl enable xvfb@:99.service && \
systemctl --global mask org.gnome.SettingsDaemon.Subscription && \
adduser -m -U -G users,adm gnomeshell && \
mkdir -p /var/lib/systemd/linger && \
touch /var/lib/systemd/linger/gnomeshell
touch /var/lib/systemd/linger/gnomeshell && \
systemctl --global enable dbus-socat@1234

# dbus port
EXPOSE 1234
Expand Down

0 comments on commit 5797ffd

Please sign in to comment.