Easily paste into dom0 - but securely revisions

Go back to topic: Easily paste into dom0 - but securely

  1. v2 anchor; v2 full version

Revision #2

Edited on
2025-11-26
Edited by user
ApexFlex
MAX_CLIPBOARD_SIZE=$((10 * 1024**2)) # 10 MiB MAX_CLIPBOARD_SIZE=$((10*1024*1024)) # 10 MiB
notify-send -t $NOTIFY_TIMEOUT "Dom0 clipboard" "ERROR: Clipboard from '$source_qube' is too large: ($orig_bytes bytes) bytes" notify-send -t $NOTIFY_TIMEOUT "Dom0 clipboard" "ERROR: Clipboard from '$source_qube' is too large ($orig_bytes bytes)"
removed_bytes=$(($orig_bytes - $sanitized_bytes)) removed_bytes=$((orig_bytes - sanitized_bytes))
notify-send -t $(($NOTIFY_TIMEOUT*2)) "Dom0 clipboard" "WARNING: $removed_bytes unsafe bytes from '$source_qube' removed. Copied content is incomplete, check before use" notify-send -t $((NOTIFY_TIMEOUT*2)) "Dom0 clipboard" "WARNING: $removed_bytes unsafe bytes from '$source_qube' removed. Copied content is incomplete, check before use"
exit 0 exit 0