我经常发现完全从命令行工作很方便,并且喜欢同时打开几个 tty“控制台”。
如何使我的系统默认拥有超过传统的 6 个 tty 控制台 (CTRL-ALT-Fn)?
同样随着向 SystemD 和 Gnome 的过渡,tty 控制台数量是否真的下降了?有时我似乎很难打开一个,更不用说打开几个了,而且经常会出现几个(CTRL-ALT-Fn)组合都导致 GUI 而不是 tty 的行为。
如果重要的话,我正在多台机器上运行 Ubuntu 18.04 和 18.10 的组合。
我经常发现完全从命令行工作很方便,并且喜欢同时打开几个 tty“控制台”。
如何使我的系统默认拥有超过传统的 6 个 tty 控制台 (CTRL-ALT-Fn)?
同样随着向 SystemD 和 Gnome 的过渡,tty 控制台数量是否真的下降了?有时我似乎很难打开一个,更不用说打开几个了,而且经常会出现几个(CTRL-ALT-Fn)组合都导致 GUI 而不是 tty 的行为。
如果重要的话,我正在多台机器上运行 Ubuntu 18.04 和 18.10 的组合。
我在运行 Proxmox 4.4-24 (Debian 8.11) 的几个节点中的 LXC 容器中安装了几个 Ubuntu 18.04.2。
在其中任何一个上,当我尝试在控制台上以 root 身份登录时,我输入“root”,按回车,几秒钟后我得到“登录不正确”。
以非 root 用户身份登录可以正常工作。
在运行 Proxmox 5.3-11 (Debian 9.8) 的多个节点中的 LXC 容器内的其他 Ubuntu 18.04.2 安装中,以 root 身份登录可以正常工作。
我什至如何开始调试这个问题?
我正在使用带有 4.15.0.29 通用内核的 Ubuntu 18.04。启动过程需要很长时间,我注意到启动时字体样式发生了变化。我已经在谷歌上尝试了很多东西,但它们什么也没做,所以我恢复到安装后快照(这个),因为没有其他解决了我的问题。(我正在使用时移)
PS 我尝试自己进行一些调试和研究,但 3 小时后我一无所获。
PSS 这在内核 4.18 上仍然存在。(为此而尝试)
启动日志(/var/log/boot.log):
[FAILED] Failed to start Set console font and keymap.
See 'systemctl status console-setup.service' for details.
[ OK ] Started AppArmor initialization.
Starting Raise network interfaces...
[ OK ] Started Raise network interfaces.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Synchronized.
[ OK ] Reached target System Initialization.
[ OK ] Started Message of the Day.
Starting Socket activation for snappy daemon.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started CUPS Scheduler.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Trigger anacron every hour.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on UUID daemon activation socket.
[ OK ] Listening on CUPS Scheduler.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Started ACPI Events Check.
[ OK ] Reached target Paths.
[ OK ] Listening on Socket activation for snappy daemon.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started Set the CPU Frequency Scaling governor.
Starting Accounts Service...
[ OK ] Started Run anacron jobs.
Starting Dispatcher daemon for systemd-networkd...
[ OK ] Started Regular background program processing daemon.
Starting NVIDIA Persistence Daemon...
Starting Detect the available GPUs and deal with any system changes...
Starting Network Manager...
Starting LSB: Speech Dispatcher...
[ OK ] Reached target Login Prompts.
Starting Snappy daemon...
Starting Modem Manager...
Starting Thermal Daemon Service...
[ OK ] Started ACPI event daemon.
Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
[ OK ] Started irqbalance daemon.
[ OK ] Started CUPS Scheduler.
[ OK ] Reached target Printer.
Starting Login Service...
Starting LSB: automatic crash report generation...
Starting Avahi mDNS/DNS-SD Stack...
Starting Disk Manager...
Starting LSB: Record successful boot for GRUB...
Starting System Logging Service...
Starting WPA supplicant...
Starting Save/Restore Sound Card State...
[ OK ] Started NVIDIA Persistence Daemon.
[ OK ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[ OK ] Started LSB: Speech Dispatcher.
[ OK ] Started LSB: automatic crash report generation.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Started LSB: Record successful boot for GRUB.
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Started Make remote CUPS printers available locally.
[ OK ] Started WPA supplicant.
Starting Authorization Manager...
[ OK ] Started System Logging Service.
[ OK ] Started Detect the available GPUs and deal with any system changes.
[ OK ] Started Authorization Manager.
[ OK ] Started Accounts Service.
[ OK ] Started Thermal Daemon Service.
[ OK ] Started Modem Manager.
Starting Hostname Service...
[ OK ] Started Hostname Service.
[ OK ] Started Dispatcher daemon for systemd-networkd.
[ OK ] Started Disk Manager.
[ OK ] Started Network Manager.
Starting Network Manager Wait Online...
[ OK ] Reached target Network.
Starting Permit User Sessions...
Starting Network Manager Script Dispatcher Service...
[ OK ] Started Permit User Sessions.
Starting Hold until boot process finishes up...
Starting GNOME Display Manager...
[ OK ] Started Network Manager Script Dispatcher Service.
[ OK ] Started GNOME Display Manager.
[** ] (3 of 6) A start job is running for Network Time Synchronization (31s /[ OK ] Mounted Mount unit for gnome-calculator, revision 180.
[ OK ] Mounted Mount unit for gnome-3-26-1604, revision 70.
[ OK ] Mounted Mount unit for gnome-logs, revision 37.
[ OK ] Started Set console font and keymap.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Synchronized.
[ OK ] Reached target System Initialization.
[ OK ] Listening on ACPID Listen Socket.
Starting Socket activation for snappy daemon.
[ OK ] Started Trigger anacron every hour.
[ OK ] Started CUPS Scheduler.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on CUPS Scheduler.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Listening on UUID daemon activation socket.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Message of the Day.
[ OK ] Started ACPI Events Check.
[ OK ] Reached target Paths.
[ OK ] Reached target Timers.
[ OK ] Listening on Socket activation for snappy daemon.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
Starting Thermal Daemon Service...
Starting Disk Manager...
Starting Dispatcher daemon for systemd-networkd...
[ OK ] Started Run anacron jobs.
[ OK ] Started CUPS Scheduler.
[ OK ] Reached target Printer.
[ OK ] Started D-Bus System Message Bus.
Starting WPA supplicant...
Starting System Logging Service...
Starting LSB: Speech Dispatcher...
Starting Modem Manager...
Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
[ OK ] Started Set the CPU Frequency Scaling governor.
[ OK ] Started irqbalance daemon.
Starting Save/Restore Sound Card State...
Starting Detect the available GPUs and deal with any system changes...
Starting Avahi mDNS/DNS-SD Stack...
Starting Snappy daemon...
Starting LSB: automatic crash report generation...
[ OK ] Started Regular background program processing daemon.
Starting LSB: Record successful boot for GRUB...
[ OK ] Reached target Login Prompts.
[ OK ] Started ACPI event daemon.
Starting Accounts Service...
Starting Network Manager...
[ OK ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Started LSB: Speech Dispatcher.
[ OK ] Started Thermal Daemon Service.
[ OK ] Started WPA supplicant.
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Started Make remote CUPS printers available locally.
[ OK ] Started System Logging Service.
Starting Authorization Manager...
[ OK ] Started LSB: automatic crash report generation.
[ OK ] Started LSB: Record successful boot for GRUB.
[ OK ] Started Detect the available GPUs and deal with any system changes.
[ OK ] Started Authorization Manager.
[ OK ] Started Accounts Service.
[ OK ] Started Modem Manager.
[ OK ] Started Dispatcher daemon for systemd-networkd.
Starting Hostname Service...
[ OK ] Started Disk Manager.
[ OK ] Started Login Service.
[ OK ] Started Snappy daemon.
Starting Wait until snapd is fully seeded...
[ OK ] Started Wait until snapd is fully seeded.
[ OK ] Started Hostname Service.
[ OK ] Started Network Manager.
[ OK ] Reached target Network.
Starting Permit User Sessions...
[ OK ] Started Unattended Upgrades Shutdown.
Starting Network Manager Wait Online...
[ OK ] Started Permit User Sessions.
Starting GNOME Display Manager...
Starting Hold until boot process finishes up...
Starting Network Manager Script Dispatcher Service...
[ OK ] Started Network Manager Script Dispatcher Service.
[ OK ] Started GNOME Display Manager.
更新:
systemctl status console-setup.service 显示:
● console-setup.service - Set console font and keymap
Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; vendor pr
Active: active (exited) since Sat 2019-02-16 10:58:11 EET; 1min 22s ago
Process: 697 ExecStart=/lib/console-setup/console-setup.sh (code=exited, statu
Main PID: 697 (code=exited, status=0/SUCCESS)
feb 16 10:58:11 Motan systemd[1]: Starting Set console font and keymap...
feb 16 10:58:11 Motan systemd[1]: Started Set console font and keymap.
free -h 显示:
total used free shared buff/cache available
Mem: 15G 1,5G 11G 61M 2,0G 13G
Swap: 1,7G 0B 1,7G
交换显示:
NAME TYPE SIZE USED PRIO
/swapfile file 1,7G 0B -2
sudo blkid 显示:
/dev/sdb1: UUID="bbfdf8d9-be18-4d3d-b6fa-d0caec4db4ed" TYPE="ext4" PARTUUID="51599328-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/sda1: LABEL="Recovery" UUID="3A9496D094968DCF" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="693b5e90-b593-407e-a5f7-b03d3cdd5b81"
/dev/sda2: UUID="3A96-E631" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="5412b97f-6607-4c6d-8239-6343b5ca7be9"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="3f5148bb-b8d2-4578-bb7b-d90ef29c5851"
/dev/sda4: UUID="AC4AA1C54AA18D20" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c3405128-e084-4cd6-87f8-0337205d9568"
/dev/sdb5: UUID="bb8f025a-c48e-4ab0-a0e7-ae935adeade1" TYPE="ext4" PARTUUID="51599328-05"
/dev/sdb6: UUID="fdef4d1c-39e4-4a3c-ac71-ff0b6791cae1" TYPE="ext4" PARTUUID="51599328-06"
/dev/sdc1: LABEL="Data" UUID="6846CE9F46CE6D7E" TYPE="ntfs" PARTUUID="9726fa2c-01"
cat /etc/fstab 显示:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb1 during installation
UUID=bbfdf8d9-be18-4d3d-b6fa-d0caec4db4ed / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
UUID=3A96-E631 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sdb6 during installation
UUID=fdef4d1c-39e4-4a3c-ac71-ff0b6791cae1 /home ext4 defaults 0 2
# /var was on /dev/sdb5 during installation
UUID=bb8f025a-c48e-4ab0-a0e7-ae935adeade1 /var ext4 defaults 0 2
/swapfile none swap sw 0 0
非交互式更改控制台字体的正确方法是什么?
我有一个 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
?
那么你可能会像我一样被卡住,因为过去在 14.04 和 16.04 上工作的解决方案在 18.04 上不起作用。
要解决的问题(目标)
hwinfo --framebuffer
给出一个空输出 -> 找到另一个解决方案我想在我的tmux
会话中有一个自定义页脚conky
,我的 conky 配置按照 conky 官方推荐screen
:
conky.config = {
out_to_x = false,
out_to_console = true,
total_run_times = 1
};
conky.text = [[${time %H:%M}|free space:${fs_free /}|$loadavg|free mem:$memeasyfree]]
tmux
仅包含一行.tmux.conf
:
set-option -g status-left "#(conky -i 1 -c ~/.conkyintmux) |"
但是当我开始时tmux
,页脚行显示
13:48|free0:bash* "D830-2" 13:48 06-Sep-18
并且没有任何.tmux.conf
(不叫 conky),它会读
[0] 0:bash* "D830-2" 13:53 06-Sep-18
预期输出:
13:48|free space:8.0GB|0.1 0.1 0.1|free mem:548MB|[0] 0:bash* "D830-2" 13:53 06-Sep-18
开始看看是否一切都如预期的那样。
我怎样才能改变 的行为tmux
?
不幸的是,最近的系统升级似乎破坏了我的显卡驱动程序,所以我将重新安装最新的 Ubuntu 版本(18.04)。在此之前,我想导出我的 gpodder 播客订阅。由于上述问题,我只能通过控制台(Ctrl+Alt+F...)登录,“而不是 GUI 方式”。我所要求的可能在官方 gpodder 文档https://gpodder.github.io/中列出,但是因为我对这种计算机的知识并不了解,有人可以向我列出哪个序列我必须输入多少命令才能将它们存储在一个 OPML(或任何最好的格式)文件中,比如我的主目录?