Skip to content

Add qvm-set-wallpaper#453

Draft
hippalectryon-0 wants to merge 1 commit intoQubesOS:mainfrom
hippalectryon-0:qvm-set-wallpaper-from
Draft

Add qvm-set-wallpaper#453
hippalectryon-0 wants to merge 1 commit intoQubesOS:mainfrom
hippalectryon-0:qvm-set-wallpaper-from

Conversation

@hippalectryon-0
Copy link

Closes QubesOS/qubes-issues#215

This adds qvm-set-wallpaper, which safely converts an image from another VM using qubes.GetImageRGBA and sets it as the current VM's wallpaper.

Note: parts of this PR, e.g. utests, are GenAI generated and human-reviewed

TODO before marking as ready:

  • test on actual VM, if possible with different DE

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 96.47059% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.38%. Comparing base (277a03a) to head (e27dc3f).

Files with missing lines Patch % Lines
qubesadmin/tools/qvm_set_wallpaper.py 96.47% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
+ Coverage   76.20%   76.38%   +0.18%     
==========================================
  Files          53       54       +1     
  Lines        9359     9444      +85     
==========================================
+ Hits         7132     7214      +82     
- Misses       2227     2230       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


try:
stdout, _stderr = vm.run_service_for_stdio(
"qubes.GetImageRGBA", input=filepath.encode()
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming I understood this correctly, it is doing the conversion in the same qube the image is in. This has the problem of trusting the image. Because you downloaded the image to that qube, doesn't mean you trust to open it in that qube. That is why conversions happen in disposable qubes.

In short:

Copy link
Member

Choose a reason for hiding this comment

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

TBH, I'm not sure if this is really a valid concern. If somebody doesn't trust the image, they can always call qvm-convert-img before doing anything else with the file. Which would be a good idea in that case anyway, to avoid for example file manager loading it for preview.

@ben-grande
Copy link
Contributor

I think this PR should be in https://github.com/QubesOS/qubes-app-linux-img-converter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Dom0 wallpaper service

3 participants