Take A Terminal Screenshot In Terminator

This article is going to apply to those who use the Terminator terminal emulator and want to take a terminal screenshot in Terminator. That means it applies to maybe three of you. You’re welcome.

There are a zillion and three terminal emulators.

Yes, they’re terminal emulators. They, in some form or another, mimic the look and behavior of terminals. Terminals were used on old consoles and were how you interacted with things like mainframes. 

Now, you still have terminals available. If you press CTRL + ALT F3 to F6 you should see something called TTY. That stands for Teletypewriter and is from ages past. However, some pedantic people might still call it a terminal emulator or call it a virtual terminal. The latter might be closer to correct.

By the way, if you press CTRL + ALT + F7 it should/might bring you back to your desktop from TTY. If that doesn’t work, hold the LEFT ALT and press the RIGHT ARROW until you cycle back to the desktop.

I don’t want you getting lost and unable to get back to the desktop, after all.

I’ve mentioned Terminator before:

It’s Time To Introduce You To The Terminator!

This is one of my favorite terminal emulators! I use it all the time. Because I have it with a weird theme, I don’t often use it for screenshots. I should because you can take screenshots with a built-in plugin! It’s remarkably simple.

Did I mention that Terminator supports plugins? If I didn’t, well, it does!

If you want, this is a far from complete list of Terminator Plugins.

If you search online, you will find more Terminator plugins that you can use to make your terminal-based computing even easier. What you pick is up to you but one of my favorites is one that you don’t even have to work for. It’s something that should be available by default in all Terminator installs. If it’s not available, your distro chose to package Terminator without plugins. 

Terminator:

The name is as awesome as it implies and it will likely be available in any distro you choose to run as your daily driver. If you check the man page, you’ll see this:

Terminator – Multiple GNOME terminals in one window

That’s just the start of it. Also, while it’s ‘for’ GNOME doesn’t mean that it doesn’t work just fine with other desktop environments. It suits them just fine and I’ve yet to find a desktop environment that doesn’t allow me to use Terminator.

It’s a multi-windowed (if you want, and I do not) terminal with a ton of options. More importantly, for the sake of this article, it also supports plugins. 

One of those plugins lets me take screenshots that look like this:

terminator screenshot
This was taken without any additional software. It’s just Terminator doing Terminator things.

So, how is this done? What is this witchcraft?

Take A Terminal Screenshot In Terminator:

Terminator is a terminal-based application. It is a terminal emulator, after all. So, it’s going to require a terminal. You can install Terminator with your GUI package manager or you can install it via the terminal. You know what we’ll be doing, so press CTRL + ALT + T, and let’s get started.

I’m going to assume that you’re not like me and that you don’t have Terminator already installed. So, pick the right command for your package manager so that you can install Terminator.

Keep in mind that these commands are from my notes. They might be old or outdated. Be sure to verify them and let me know if I made any mistakes!

Debian/Ubuntu/etc:

Fedora/etc:

RHEL/CentOS:

Arch/Manjaro/etc:

One of those commands should work for you. If you use a different package manager, you’ll likely find that Terminator is an option. It’s a pretty popular terminal. 

Now that you have Terminator installed, you can set it as the default (if you want) or you can open it from your application menu.

With Terminator now open, right-click within the terminal menu and click on the Preferences option to continue…

Now, click on Plugins and enable “TerminalShot”, which looks like this:

Enable plugins in Terminator via the prefefrences.
This should be fairly easy to explain and I have faith that my readers will understand it.

With that enabled, you just close the preferences window.

From there,  you have this as an option when you right-click on the window:

Take screenshots within Terminator.
That’s about it, now you can save the device as a .png or a .jpg file, picking your directory first.

You’ll then be faced with a screen that looks like this:

Save the screenshot from Terminator.
If this one needs me to describe it, you probably shouldn’t be following this article…

That’s pretty obvious. What might not be obvious is that it seems to work for both .png and .jpg file formats. I’ve had good luck with both and both seem to open appropriately. I seldom use these screenshots for this site, but I have and the reason I don’t is because the color just doesn’t look good with the site’s theme. Sometimes it stands out but other times it just looks murky.

Anyhow, that’s how to take a terminal screenshot in Terminator… Pretty sweet!

Closure:

You know… I don’t know how many people are going to want to take a terminal screenshot in Terminator. I forgot to take my sleepy meds and this is the middle of the night. I’ve also been sipping away at my glass of blueberry wine. It seemed like a perfectly good article.

I was watching YouTube videos and I thought about how I do this fairly often and decided that I’d turn it into an article. There were no dissenting opinions offered, so it was turned into an article. Fortunately, I use software that makes it look like I can type coherent words! (Nah, I can do that no matter what! Plus, I’m relatively sober, just tired.)

So, if you’ve ever used Terminator, look into the various plugins available. It extends the application even more and there are some useful things in there. Terminator is one of the best terminal emulators on the planet and I’d consider dying on this hill. It’s really that good.

If you don’t agree, leave a comment. I won’t change my mind, but I will publish it. You’re welcome.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Turn PDF Into Text

Today’s exercise is simple, though it will rely on the terminal because we’re just going to turn PDF into text. This isn’t something complicated and it’s fairly effective. It’s also an exercise anyone can follow along with. So, if you want to turn PDF into text, read this article!

I’m sure this works in multiple distros, but I only have instructions for a few in my notes. Most everyone should be able to follow along with this article and turn PDF into text. You’ll see…

While I’m sure everyone is familiar with PDF, I’ll explain…

PDF stands for Portable Document Format and is one of many standards for documents. Specifically, it’s ISO 32000 and is a file format brought to use by Adobe. Adobe is a proprietary product but the standard is open, meaning you have your choice of PDF readers, editors, and creators.

On the other hand, PDF may not be as easily parsed as other file formats. You may also just want to extract some text from a PDF or turn it into something more information-dense, sans pictures and fluffy formatting. There are any number of reasons why you might want to turn PDF to text and it’s a simple operation that’s going to give you ‘acceptable’ results most of the time.

The tool we’ll be using…

pdftotext:

We’ll use a tool known as ‘pdftotext’ which does as its name implies. It’s a tool that lets you turn PDF into text, so from .pdf to .txt is the goal. Like many Linux tools, this is a terminal-based operation.

You can check to see if pdftotext is already installed with this command:

If the output matches this, you can skip the installation step:

If you want, you can check the man page and see that it is indeed the correct tool for the job if your job is to turn PDF into text. That’s this command:

That command will show you that the description is indeed what we want to accomplish in today’s article. That description is basically:

pdftotext – Portable Document Format (PDF) to text converter

(It may also tell you the version in that section, which is odd but is what it is.)

So, you can see that pdftotext is the correct tool for the job when you want to…

Turn PDF Into Text:

As I mentioned in the intro, if you want to turn PDF into text one of the ways to do so will require using the terminal. There are all sorts of GUI tools you can use to do this very same job, but we’ll do this in the terminal. So, you can usually get away with pressing CTRL + ALT + T to open your default terminal emulator. Otherwise, check your application menu and you’ll find a terminal option in there.

With your terminal open, we first will install a meta package so that we can use pdftotext to turn PDF into text. That application is ‘poppler’. You can pick from the following to match your package manager to install this.

Debian/Ubuntu/etc:

Arch/Manjaro/etc:

RHEL/Fedora/etc:

The poppler package contains pdftotext which is the tool we’re after in our quest to turn PDF into text. It’s a noble quest!

Now, the syntax is quite simple:

That will create a <file_name>.txt file in the same directory.

Now, if you checked the man page above, you’d see that there’s not a whole lot to this application. You can largely ignore all the options (and we will), though there aren’t that many.

The two options we are most interested in would be about just converting single pages into text. For that, you want the -f (first page) and -l last page flags. They do exactly what you’d expect and the syntax is as follows:

I’ll give you an example…

Let’s say you want to print pages 1 through 3. The syntax would be:

Sometimes this whole pdftotext thing doesn’t do a great job. If the PDF file is formatted in a fancy manner, it may just not come out in text all that well. Fortunately, PDF is an open standard and you can help it along with the -layout flag. 

The -layout flag is described like this:

Maintain (as best as possible) the original physical layout of the text. The default is to ´undo’ physical layout (columns, hyphenation, etc.) and output the text in reading order.

So, that flag will do its best to turn the layout into what it was in the original PDF. This is a handy flag for when the output isn’t usable. It’s possible to retain columns, advanced formatting, and all of that stuff, meaning the text file output is more useful. You won’t always need this option, but it can come in handy. You can safely ignore the remainder of the man page for the vast majority of what folks are going to do with this command.

That’s pretty much all you need to know about the pdftotext application. It does what you think it’d do. It’s the tool you use to turn PDF into text, just like it says on the tin! Pretty handy!

Closure:

So, that’s an article… 

If you’ve ever wanted to turn PDF into text, you now know how. You can use this to make a PDF easier to parse, easier to read, etc. It’s up to you how you use pdftotext. You now have the knowledge! You now have the power! Indeed, you have life by the horns. (Which is a rather silly place to grab onto.)

Man, this is a lot of articles… At this point, it’s almost habitual. Technically, I have published something every other day – for a long time. A couple of those articles weren’t really articles. They were placeholders because Mother Nature is a fickle beast and I live in a very remote location. We had a few major (deadly even) storms that took out our infrastructure. I think I can be forgiven for that – and I did upload articles saying that there’d be no article. 

The site has come a long way…

I haven’t done a meta article in a while…

Seriously, without you (my readers) I’d have never kept going this long. It’s obviously not a money-making operation, but it is an educational operation. That’s more important than money.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Show USB Devices In A GUI In Lubuntu

Today’s article will be easy to follow and is for those who’d like to show USB devices in a GUI in Lubuntu. Though truth be told, this is applicable for other distros. I’ve just tested it on Lubuntu and Linux Mint.

I want to assume that all my readers are familiar with USB. There are all sorts of things that can use USB, which stands for Universal Serial Bus. You can plug in USB storage, fans, power devices, and (with USB C) even connect external monitors or graphics cards. The standard has existed since 1998 and the most recent version is USB4. It has come a long way.

Linux is pretty good at enumerating USB devices and can use many of the various USB-powered tools. It’s possible to show the USB devices in the terminal, of course. I just figured I’d cover a way to do so graphically. You never know who wants to show USB devices in a GUI, so why not cover it in an article?

I’ve covered ways to show USB devices before. I’ve done so multiple times, so it seems. Click one of the links below to view another article.

Show Your USB Devices In The Linux Terminal
A Little About The ‘lsusb’ Command.
How To: List USB Devices

As this article is for Lubuntu, I’ll give directions as though you’re using Lubuntu. This is going to work on any Debian/Ubuntu-based operating system. The tool we’ll be using is also available for Arch and, I assume, other package managers.

So, what will we be using?

usbview:

We’ll be using a small application known as usbview. This is available in your default repositories and is easy to install. I’ll cover the installation methods below.

If one were to check the man page, you’d see it’s the right tool for the job.

usbview – display information on USB devices

Further, you can see this on the man page:

No command line options are accepted by usbview.

So, usbview a graphical (GUI) tool. There are no options for the terminal – but you’ll need to start it from a terminal. For reasons beyond my knowledge, there’s no application menu added when you install usbview. That’s something to keep in mind. It’s a GUI tool – but you start it from the terminal. Got it? Good!

Show USB Devices In A GUI In Lubuntu:

As mentioned above, you’re going to need an open terminal. As you’re using Lubuntu, you can just press CTRL + ALT + T and your default terminal should open.

With your terminal open, you first install usbview…

That’s nice and simple.

Now, you can run usbview with this command:

Yes, you need elevated permissions. It throws an error otherwise.

You’ll get a new window that looks something like this:

using usbview to show usb devices
This is pretty self-explanatory, though I don’t have much plugged in.

You can not only view USB devices, you can learn more about them. There’s not much to configure and you can ignore all the buttons except the Quit button. You’ll want that to quit the application.

But, there you go… That’s how you show USB devices in a GUI in Lubuntu!

Closure:

Anyhow, now you’ve learned how to show USB devices in a GUI in Lubuntu. This is a good thing and something you can trivially apply to other distros. I’m sure there’s a way to build usbview if you don’t already have usbview in your repositories. If graphically viewing USB devices is your goal, usbview is a possible solution.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Seeing as you’re here, why not visit our friends at Blunix?

Here’s why you might just want to visit Blunix:

“Blunix GmbH offers Debian and Ubuntu focussed Linux Emergency Support 24/7, Project-based Linux Consulting, FOSS-based Managed Hosting on your company IaaS provider account as well as custom Training and Workshops. We prioritize fair business partnerships and employee quality of life over profit. We focus on reasonable security by default and encourage your employees and developers to keep things secure enough to avoid 99% of security issues with automated attack vectors. We focus exclusively on this and do partner with other companies to refer customers that do not fit exactly what we do, or where we require additional help (for example we have a security-focused company that we partner with for higher risk factor hosting setups).”

Click to visit Blunix GmbH

Hide The Output From wget

This won’t be a very complicated article and will only apply to those who want to hide the output from wget. It’s just a matter of a simple flag so that it won’t be a very long article.

You can download from the terminal. You can transfer files from the terminal. One of the tools for this is wget. There’s also curl, but this article won’t be complicated and will only apply to those who want to hide the output from wget.

This could probably be called a short, but it’s something I wanted to cover.

wget:

You probably won’t need to install wget. It’s one of those tools that you’ll find installed by default. It’s a pretty handy tool. You can verify that wget is an available application with this command:

The output should match this:

If you want to see why I’d cover such a small piece of wget, check the man page with the following command:

First, you’ll see the description of wget, which is this:

Wget – The non-interactive network downloader.

Now scroll down…

Keep scrolling…

And keep going…

There’s a whole lot to the wget command. It’s a very complicated command. If you’re a new Linux user, you will be overwhelmed by this man page. 

This is the sort of command that you can learn to use bit by bit. You don’t need to learn everything. You almost certainly don’t need everything. That doesn’t mean you can’t use it for useful tasks.

I often use the wget command. I use it not only with my Lubuntu testing but also with my regular activities. I’ll often find the URL for a file and then use wget to download the file. When I do that, it’s because I want to monitor the output.

Other times, I don’t want to monitor the output. So, for that, I use wget in quiet mode. That’s what this article is about.

Hide The Output From wget:

The wget application is an application used in the terminal. I believe there are download managers that are GUIs that use wget in the background. We’ll ignore those and use the terminal. So, press CTRL + ALT + T and let’s learn how to hide the output from wget.

The command you’re after is just the wget command with the -q flag. It would look something like this:

The thing is, this now means that you no longer see the progress. You can tell wget to keep trying until it performs as expected. That’s the ‘complete’ flag ( -c) and looks like this:

You can try this on your own with this command:

That’s a pretty small file, so it won’t take a lot of time. 

You won’t see any messages in your terminal, it will just download the file.

You can test this by running ls in your terminal after the fact. You’ll happily see that you’ve downloaded a file called ‘sort.txt’ and that it kept trying until it was completed.

So, now you know how to hide the output from wget…

Closure:

So, yeah, this probably could have been labeled a ‘short’ article, but I didn’t do so. I try to use that title for things that aren’t as involved, just a simple command in other words. This is pretty simple, but it’s also something you might use regularly.

The wget command is this hulking command with a bunch of options. Not even I fully understand all of the options and I’ve been using the application for years. There’s just a lot to it and that’s far more than we’ll ever cover and far more than most of you will ever use. Still, it can be a pretty handy command and you’ll see more of it in the future.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Save A Web Page As Text

If you’re at all like me, you document all sorts of things and you too might find it handy to know how to save a web page as text. It’s not a complicated task; you can do it in the terminal easily enough. So, if you want to save a web page as text, read on! 

This intro should be rather short. Imagine that!

I don’t have to explain what a web page is. It’s a page (just a page) on a website.

I don’t have to explain what text means. We’ll just be using .txt files.

While this isn’t something I’ve bothered with in a long time, you might find it interesting and helpful. If you’re into keeping notes of things you want to learn more about and remember, you may find saving a web page as text worthwhile.

You can organize the text files however you want and one of the best benefits is that you can perform searches on your local documents easily enough. This might be something that interests you, especially if you’re new and browsing around the web looking for things to learn.

We’ll only be using a couple of tools. We will be using the terminal.

curl:

The first application you’ll need to save a web page as a text file will be the curl application. The curl application is used to transfer a URL. A curl command downloads a file and shows it in your standard output.

If you check the man page, you’ll see:

curl – transfer a URL

See? Exactly as I had said. It’s the correct tool for the job. 

You can also see this article about curl:

Let’s Have a Limited Look at Linux’s cURL Application

html2text:

This should be obvious by the title. It should be made further obvious by the title of this article. This is an application that turns HTML (Hypertext Markup Language – what is used on web pages more often than not) into plain text.

If you check the man page, you’ll see:

html2text – an advanced HTML-to-text converter

Once again, a fine application for the task at hand. You’ll see!

Save A Web Page As Text:

As mentioned above, this is a terminal-based operation. We’re going to save a web page as text, but we’re going to do it in the Linux terminal. More often than not, a terminal can be opened by pressing CTRL + ALT + T on your keyboard.

I’ll give installation instructions for the apt-using distros out there. These packages will be available in your package manager if you’re using any of the major distros. Just adjust these commands to match your needs.

curl:
html2text:

We’re interested only in the -o (output) flag for this application of html2text.

The Process:

The syntax to save a web page as text is simple. It looks like this:

Simply, we’re using the curl application to grab the data, we then send that data through the pipe command where it’s processed by the html2text application.

An example would look like this:

You can, of course, save individual pages as text. Here’s an example:

The terminal output is interesting:

Then, you can use a plain text editor to read (and edit) the text file. You can view it in the terminal with just the cat command. That’d look like this:

Though, it’s probably easier to read the saved file with a decent plain text editor that has a GUI. There’s an abundance of text editors available for Linux, so pick your favorite and use that to read the saved output.

Closure:

Well, if you have ever wanted to save a web page as text, you now know how to do that. This was an article that came not from my notes but from my memory. I used to do this with some regularity but I’ve stopped doing so as of late. I haven’t kept so many new notes lately, though I’m not sure why not.

Anyhow, this is a nice and simple exercise that anyone should be able to follow. If you’re using a different package manager it may take a bit more effort, but it’s not complicated. The packages should be available in all the major distros, or something similar. The curl application will certainly be available and might even be installed by default.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.