Skip to content

Commit 7b82428

Browse files
committed
Wait for GUI session on the server side
For VMs started before user logs in, notification server is not running at the VM session startup time yet. Instead of failing to start, wait for the session to become available.
1 parent fe3befc commit 7b82428

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/usr/bin/qubes-notification-proxy-server
22
/etc/qubes-rpc/qubes.Notifications
3+
/etc/qubes/rpc-config/qubes.Notifications

debian/rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ override_dh_auto_install:
2020
cp debian/qubes-notification-daemon.substvars \
2121
debian/qubes-notification-agent.substvars
2222
install -d -- "$(DESTDIR)/etc/qubes-rpc/" "$(DESTDIR)$(SYSTEMDUSERDIR)" "$(DESTDIR)$(SYSTEMDUSERDIR)-preset"
23+
install -d -- "$(DESTDIR)/etc/qubes/rpc-config"
2324
install -m0644 -- src/qubes-notification-agent.service "$(DESTDIR)$(SYSTEMDUSERDIR)"
2425
install -m0644 -- src/90-qubes-notification-agent.preset "$(DESTDIR)$(SYSTEMDUSERDIR)-preset"
2526
ln -s -- ../../usr/bin/qubes-notification-proxy-server "$(DESTDIR)/etc/qubes-rpc/qubes.Notifications"
27+
echo "wait-for-session=1" > "$(DESTDIR)/etc/qubes/rpc-config/qubes.Notifications"

rust-notification-emitter.spec.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ forwards notifications to the host's notification daemon.
7474
%files daemon
7575
%{_bindir}/qubes-notification-proxy-server
7676
/etc/qubes-rpc/qubes.Notifications
77+
/etc/qubes/rpc-config/qubes.Notifications
7778

7879
%package license
7980
Summary: License files for the notification proxy
@@ -99,11 +100,13 @@ License files for the notification proxy
99100

100101
%install
101102
install -d -- "$RPM_BUILD_ROOT/etc/qubes-rpc/" "$RPM_BUILD_ROOT/%_userunitdir" "$RPM_BUILD_ROOT/%_userpresetdir"
103+
install -d -- "$RPM_BUILD_ROOT/etc/qubes/rpc-config"
102104
install -m0644 -- src/qubes-notification-agent.service "$RPM_BUILD_ROOT/%_userunitdir"
103105
install -m0644 -- src/90-qubes-notification-agent.preset "$RPM_BUILD_ROOT/%_userpresetdir"
104106
install -D -- target/release/notification-proxy-client "$RPM_BUILD_ROOT/%_bindir/qubes-notification-proxy-client"
105107
install -D -- target/release/notification-proxy-server "$RPM_BUILD_ROOT/%_bindir/qubes-notification-proxy-server"
106108
ln -s -- ../../usr/bin/qubes-notification-proxy-server "$RPM_BUILD_ROOT/etc/qubes-rpc/qubes.Notifications"
109+
echo "wait-for-session=1" > "$RPM_BUILD_ROOT/etc/qubes/rpc-config/qubes.Notifications"
107110
install -m0644 -D -- LICENSE.dependencies "$RPM_BUILD_ROOT/usr/share/licenses/qubes-notification-proxy/LICENSE.dependencies"
108111

109112
%if %{with check}

0 commit comments

Comments
 (0)