Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qubes-rpc/qubes.WaitForSession
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -eu

if test "$(qubesdb-read /qubes-gui-enabled)" = "True"; then
if test "$(qubesdb-read --default=True /qubes-gui-enabled)" = "True"; then
Copy link
Copy Markdown

@3nprob 3nprob Jun 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is /qubes-gui-enabled ever set to False by Qubes?

It seems like if the user hasn't manually set qubes-gui-enabled=False in qubesdb, assuming True will make it wait infinitely for a socket that never appears, effectively reverting #571

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a new qubesdb entry to tell VM when GUI is enabled/disabled. It can be set to False for example when user sets qvm-feature vmname gui "". Previously, VM did not received this information at all, so yes, it resulted in this code waiting indefinitely - basically, if you manually disabled GUI, you also needed to always use qvm-run --nogui. The introduction of this qubesdb entry fixes it, but if you run older dom0 that doesn't add it, this PR preserves the old behavior (instead of breaking all GUI applications by starting them before X server ...).

user="$(qubesdb-read /default-user || echo 'user')"
while ! [ -e "/var/run/qubes/qrexec-server.$user.sock" ]; do
sleep 0.1
Expand Down