How to: Open PDF files in a Linux Console using fbgs, a framebuffer PDF viewer
Another day, another command line/Console based application. Just to refresh your memory, last time we told you about a Linux framebuffer Image viewer, Fbi, that lets you view images without a X server. This time I will introduce you to fbgs, a console based PDF/Postscript viewer which makes use of fbi to view PDFs.
Fbi actually is just a wrapper script which renders the pdf pages using ghostscript and calls fbi to display them.
Install fbgs on Ubuntu or Fedora based systems
In both Ubuntu and Fedora based systems, the package comes integrated with fbi. So, for Debian/Ubuntu based systems, either click this link or run the following command to install it.
[shredder12]$ sudo apt-get install fbi
For Fedora, the package is under the name fbida. Use the following command to install it.
[shredder12]$ su -c 'yum install fbida'
The usage is simple. You will need root permission though.
[shredder12]$ sudo fbgs random.pdf
At since fbgs makes use of fbi, if you haven't already used it, you might get this error
can handle only packed pixel frame buffers
The solution to fix this issue is already explained in the fbi image viewer post. Please take a look at it to resolve this problem.
Fbgs options
Fbgs accepts all the paramters for fbi, but you probably won't need it, default works fine. However, it also has its own parameters that might be useful.
- If the PDF file is password protected, use the -p option to open it.
[shredder12]$ sudo fbgs -p this_is_password file.pdf
- Another option is to set the dpi of the page rendered. The available options are -l, -xl, -xxl to set 100, 120 or 150 dpi respectively. DPI stands for dots per inch, so the larger you select, it presents a more compact page. The default is 75 dpi.
- If you want fbgs to render the pages in colour, use the -c flag.





". Even though the guy is really nice but as you can see these accidental shutdowns or reboots can cause a lot of trouble :P. Well 





















2 Comments
Post new comment