Note: This tutorial is intended for people who use Debian-based Linux distributions (i.e. distributions that use "apt-get install" to install software packages), but you can likely do this on other distributions if you can find the right packages on your system
What's a TTY?
If you don't know what the TTY terminal is, it's a command line interface that you can access by typing "ctrl+alt+F2". To get your screen to go back to normal, type "ctrl+alt+F1". You can use F2, F3, F4, etc to get to the other TTY screens as well. There is no graphical user interface (GUI) in the TTY, so you'll need to understand how to use the command line in order to interact with it
Software You Need
You'll need to install fbcat and netpbm to get this to work:
sudo apt install fbcat
sudo apt install netpbm
Method #1
The easiest way to take a screenshot is to use the command "fbgrab" followed by what you want to name the image:
fbgrab fileName.png
This image will be saved to your current directory, but you can also specify the directory you want to save in:
fbgrab /path/to/directory/fileName.png
Images created by fbgrab are by default saved as a PNG file, so you'll have to use an image converter to convert it to another format, if that's what you want
Method #2
This method is a more drawn out version of method #1, but it gives you a few more options like saving the image as a jpeg
First you want to use the command "fbcat" followed by a redirection character ">" followed by the name you want the image:
fbcat > fileName.ppm
By default fbcat saves images in PPM format, so if you want to convert it into a png/jpeg, you'll have to use one of the following commands:
Convert to PNG
pnmtopng fileName.ppm > fileName.png
Convert to JPEG
pnmtojpeg fileName.ppm > fileName.jpg
Image Viewers
Congratulations, you now have a picture of your terminal! If you want to view your image while in the TTY, you can install a framebuffer image viewer such as "fbi" or "fim"
sudo apt install fbi
or
sudo apt install fim
Once you have that installed you can open your image:
fbi fileName.png
or
fim fileName.png
I hope this tutorial has been helpful! Feel free to leave any comments or ask any questions! You can DM me on twitter, or you can email me at speedschootre@gmail.com
No comments:
Post a Comment