Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active May 31, 2017 07:14
Show Gist options
  • Save iguoli/c9e422b32582bbd65255b00b7fb9fd59 to your computer and use it in GitHub Desktop.
Save iguoli/c9e422b32582bbd65255b00b7fb9fd59 to your computer and use it in GitHub Desktop.
Using fbterm at runlevel 3

1. 系统进入runlevel3

一篇关于systemd系统进入runlevel3的帖子

Edit /etc/default/grub

sudo vi /etc/default/grub

Find GRUB_CMDLINE_LINUX_DEFAULT=

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="text"

Update GRUB:

sudo update-grub

For systems that use systemd, you need to tell systemd to not load the graphical login manager:

sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target

2. 使用fbterm在runlevel 3正常显示中文

fbterm中文说明

使普通用户可用

sudo gpasswd -a YOUR_USERNAME video
sudo setcap 'cap_sys_tty_config+ep' /usr/bin/fbterm

在~/.bashrc添加启动命令

# use fbterm at runlevel3
if [ `runlevel | cut -d' ' -f2` -eq 3 ]; then
    /usr/bin/fbterm
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment