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

Commit

Permalink
Run systemd-socket-proxyd 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 c1a051e
Show file tree
Hide file tree
Showing 6 changed files with 23 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 [email protected] && \
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
10 changes: 10 additions & 0 deletions common/etc/systemd/user/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=D-Bus TCP proxy on port %i
Requires=dbus.socket
After=dbus.socket
Requires=dbus-proxy@%I.socket
After=dbus-proxy@%I.socket

[Service]
Type=notify
ExecStart=/usr/lib/systemd/systemd-socket-proxyd %t/bus
8 changes: 8 additions & 0 deletions common/etc/systemd/user/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=D-Bus TCP proxy on port %i

[Socket]
ListenStream=%i

[Install]
WantedBy=sockets.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 [email protected]

# 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 [email protected]

# dbus port
EXPOSE 1234
Expand Down

0 comments on commit c1a051e

Please sign in to comment.