gnu: vm-image.tmpl: Improve SPICE dynamic resizing.
* gnu/system/examples/vm-image.tmpl (auto-update-resolution-crutch): Delete variable. (operating-system) [packages]: Add x-resize. [services]: Remove auto-update-resolution-crutch mcron service. Fixes: https://issues.guix.gnu.org/57068 Reported-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I45cd3d79b94ece2511d324c7b180f8f37bd9ba49
This commit is contained in:
parent
24f3b2eb10
commit
1d4db94beb
1 changed files with 9 additions and 19 deletions
|
@ -8,7 +8,7 @@
|
||||||
(use-modules (gnu) (guix) (srfi srfi-1))
|
(use-modules (gnu) (guix) (srfi srfi-1))
|
||||||
(use-service-modules desktop mcron networking spice ssh xorg sddm)
|
(use-service-modules desktop mcron networking spice ssh xorg sddm)
|
||||||
(use-package-modules bootloaders certs fonts
|
(use-package-modules bootloaders certs fonts
|
||||||
package-management xorg)
|
package-management xdisorg xorg)
|
||||||
|
|
||||||
(define vm-image-motd (plain-file "motd" "
|
(define vm-image-motd (plain-file "motd" "
|
||||||
\x1b[1;37mThis is the GNU system. Welcome!\x1b[0m
|
\x1b[1;37mThis is the GNU system. Welcome!\x1b[0m
|
||||||
|
@ -25,18 +25,6 @@ Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation.
|
||||||
accounts.\x1b[0m
|
accounts.\x1b[0m
|
||||||
"))
|
"))
|
||||||
|
|
||||||
;;; XXX: Xfce does not implement what is needed for the SPICE dynamic
|
|
||||||
;;; resolution to work (see:
|
|
||||||
;;; https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/142). Workaround it
|
|
||||||
;;; by manually invoking xrandr every second.
|
|
||||||
(define auto-update-resolution-crutch
|
|
||||||
#~(job '(next-second)
|
|
||||||
(lambda ()
|
|
||||||
(setenv "DISPLAY" ":0.0")
|
|
||||||
(setenv "XAUTHORITY" "/home/guest/.Xauthority")
|
|
||||||
(execl (string-append #$xrandr "/bin/xrandr") "xrandr" "-s" "0"))
|
|
||||||
#:user "guest"))
|
|
||||||
|
|
||||||
(operating-system
|
(operating-system
|
||||||
(host-name "gnu")
|
(host-name "gnu")
|
||||||
(timezone "Etc/UTC")
|
(timezone "Etc/UTC")
|
||||||
|
@ -77,7 +65,12 @@ accounts.\x1b[0m
|
||||||
root ALL=(ALL) ALL
|
root ALL=(ALL) ALL
|
||||||
%wheel ALL=NOPASSWD: ALL\n"))
|
%wheel ALL=NOPASSWD: ALL\n"))
|
||||||
|
|
||||||
(packages (append (list font-bitstream-vera nss-certs)
|
(packages
|
||||||
|
(append (list font-bitstream-vera nss-certs
|
||||||
|
;; Auto-started script providing SPICE dynamic resizing for
|
||||||
|
;; Xfce (see:
|
||||||
|
;; https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/142).
|
||||||
|
x-resize)
|
||||||
%base-packages))
|
%base-packages))
|
||||||
|
|
||||||
(services
|
(services
|
||||||
|
@ -104,9 +97,6 @@ root ALL=(ALL) ALL
|
||||||
;; integration with the host, etc.
|
;; integration with the host, etc.
|
||||||
(service spice-vdagent-service-type)
|
(service spice-vdagent-service-type)
|
||||||
|
|
||||||
(simple-service 'cron-jobs mcron-service-type
|
|
||||||
(list auto-update-resolution-crutch))
|
|
||||||
|
|
||||||
;; Use the DHCP client service rather than NetworkManager.
|
;; Use the DHCP client service rather than NetworkManager.
|
||||||
(service dhcp-client-service-type))
|
(service dhcp-client-service-type))
|
||||||
|
|
||||||
|
|
Reference in a new issue