Город МОСКОВСКИЙ
00:07:40

How to Take a Screenshot In the Linux TTY Without an X Server

Аватар
Делай То, Что Воплощает Мечты
Просмотры:
26
Дата загрузки:
26.09.2023 04:47
Длительность:
00:07:40
Категория:
Технологии и интернет

Описание

Take a screenshot of the TTY without needing an X server.
The command is:
sudo cat "/dev/vcs`tty | sed 's:/dev/tty::'`" | sed "s:.\{`tput cols`\}:&\n:g" | convert -negate -font Courier label:@- screenshot.png

I'd recommend putting this in a shell script called "screenshot", marking it as executable, then moving it to /usr/local/bin/ so that you can simply type the word "screenshot" to take a screenshot. You can also change "screenshot.png" to "$1" if you want to be able to pass in an argument to specify the screenshot's name. You can also change "Courier" to "Courier-Bold" to get a slightly clearer font.

Рекомендуемые видео