非交互式更改控制台字体的正确方法是什么?
我有一个 HiDPI 显示器,需要更大的控制台字体。我可以使用以下方式进行交互设置:
$ sudo dpkg-reconfigure console-setup
# Select UTF-8 -> Guess -> Terminus -> 16x32
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.5) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-43-generic
但是,如果我尝试以非交互方式设置它,如下所示:
$ sudo debconf-set-selections <<EOF
console-setup console-setup/charmap47 select UTF-8
console-setup console-setup/codeset47 select Guess optimal character set
console-setup console-setup/codesetcode string guess
console-setup console-setup/fontface47 select Terminus
console-setup console-setup/fontsize string 16x32
console-setup console-setup/fontsize-fb47 select 16x32 (framebuffer only)
console-setup console-setup/fontsize-text47 select 16x32 (framebuffer only)
EOF
这不起作用。跑步setupcon
没有效果。如果我检查/etc/default/console-setup
,我会看到字体信息在我运行时更新dpkg-reconfigure
,并且dpkg-reconfigure
还会触发update-initramfs
,所以似乎更多的是dpkg-reconfigure
我debconf-set-selections
没有触发。我如何找到这些动作并在我之后触发它们debconf-set-selections
?