Check Your Frames Per Second (FPS) From The Terminal

Today’s article will be a nice and quick article, where I show you how to check your frames per second (FPS) from the terminal. I promise, it’ll be really simple. Do, please, read on! It’ll be a quick and easy affair!

Amusingly, this was just mentioned at a forum I frequent. At the same time, it was in my notes as an article to cover sometime soon – on a day when I wanted a quick article. Today is a good day for a quick article because I’ve been having some connectivity issues all day.

So… Well, let’s discuss frames per second…

The frames per second is how fast you can show individual frames (individual images) on your screen. This is a function of hardware. Your frame rate is going to be dependent on things like your graphics card (or onboard graphics) and your monitor.

Some frame rates are really fast, others are consistently ‘good enough’ – at least for my needs. I am a simple man that doesn’t game or do anything that’s all that ‘graphics intensive’. For me, a simple on-board GPU and a bog standard LCD monitor is good enough. As of now, I don’t need things like 4k or 8k. Heck, I just use two smaller (30″) monitors and call it good.

But, gamers are obsessed with things like frame rate. They want the most frames per second they can eek out of their machines, and they want it to perform at that rate while the rest of the computer is under heavy load. Don’t complain, those gamers help drive the tech to continued improvement!

Well, this is just a quick way to find your FPS with the terminal. It’s not fancy and it’s not testing the graphics under load.

Check Your Frames Per Second:

As the title suggests, you’re gonna need the terminal open. So many of these articles require an open terminal, so many of you will already know how to do this. For the rest, just press CTRL + ALT + T and your default terminal should open.

With your terminal open, we’ll be using glxgears which should be installed by default in any major distro. If it’s not installed, just use your package manager to find and install it. In it’s basic form, you just call the command with:

If you want to specify which monitor you are using to test your frames per second, should you be using multiple monitors, you can run this command:

If you want to run glxgears and see the render information:

Finally, and I can’t get this to work on any of three devices, you can run it in stereo mode – which should display the test screen twice. It’s like so:

The output, that is your frames per second, will be displayed in the terminal itself. If you want to exit the program, you can close the window it opened or you can press CTRL + C

Of course, you can see the same thing I just showed you by running ‘man glxgears‘ in the terminal. It’s not a complicated program, but it will let you check your frames per second.

Closure:

There you have it, a nice and simple article. This time we’ve talked about how to check your frames per second in the terminal, which is kinda neat. There’s just so many things you can do in the terminal. It’s not always complicated. A lot of what you can do is pretty simple.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Make A Website Screenshot With CutyCapt

In today’s article, we’re going to use the terminal and make a website screenshot with CutyCapt. It’ll be a short and easily followed article, but one for everyone to follow. Even a rank beginner will easily be able to make a website screenshot with CutyCapt! (That’s the link to the project homepage, or where you need to go to learn more about CutyCapt.)

There are pretty much a zillion screenshot tools. There are even a metric-ton of browser extensions that specialize in taking a website screenshot. You can use any of those, or you can just install CutyCapt and use that from the terminal. There are even multiple choices when it comes to taking website screenshots from within the terminal, but  we’ll just be using this CutyCapt in this article.

If you’re curious, CutyCapt defines itself on SourceForge as:

CutyCapt is a small cross-platform command-line utility to capture WebKit’s rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP.

That appears to be a pretty solid definition. The CutyCapt tool does what it says on the tin and that’s it. You can’t really expect anything more – which is not a bad thing. You have one job and you need one tool. If the goal is to take a screenshot of a website via the terminal, the tool is CutyCat.

Make A Website Screenshot With CutyCapt:

Like oh so many, this article also requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, you’re going to need to install said CutyCapt. This may not be available for in all default repositories, but it’s in Debian/Ubuntu/Mint’s default repositories. So, using those as my example, you can install CutyCapt with:

Just know that your distro may not have this packaged, so follow the link in the preamble and find a way to install it in your distro of choice. You can compile it easily enough, should you need to go that far.

Once you have CutyCapt installed, it’s actually pretty easy. If you want use CutyCapt to take a screenshot of linux-tips.us, your command might look a little like this:

Or, in other words, it’s pretty basic:

It might look complicated, but CutyCapt is not all that complicated when you break it down. If the output size isn’t quite what you’re after (and it might not be), you can just keep playing with it until you get it exactly how you want it. The output format and expected screenshot size is all you need to worry about getting right.

Either way, as mentioned in the preamble, you can change the output. In our example, we specified .png. You need only change that and the output will change to what you specified. If you need any further assistance, you can use the classic man cutycapt to learn more about the application.

Closure:

See? You have yet another article. This one teaches you how to make a website screenshot with CutyCapt. It’s a pretty handy application to have on-hand if you’re into taking screenshots of websites. CutyCapt is only used for making screenshots and not a whole lot more than that, so it’s a one-trick-pony and intentionally so.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Convert JPG to PNG

In today’s article, we’re going to learn how to convert JPG to PNG image files. It’s a pretty easy process. In fact, the second part of the article should be fairly brief. Read on to learn more!

I should also mention that we’ll be learning how to convert JPG to PNG in the terminal. There are all sorts of GUI ways to do so, from individually converting files to batch conversions. Well, you can do all that in the terminal and this article will show you how.

Why PNG? Well, it supports lossless compression. PNG also supports transparency. PNG also looks better at higher resolutions, as it is able to display more details. Additionally, PNG not only supports lossless compression, it supports compression better – so you needn’t transfer larger files if you have no reason to do so. Plus, PNG is one of the better formats if  you’re going to do things like share the images online.

So, there are a number of reasons why you’d want to convert JPG to PNG. Fortunately, as I mentioned above, it’s really not all that difficult. You have tools to do this right in your default repositories, assuming you’re using a mainstream distro.

Without further ado…

Convert JPG to PNG:

As we’ll be converting in the terminal, you will have to have an open terminal. To do that, just press CTRL + ALT + T and your default terminal should open. See? We’re off to a good start.

Now, the tool we’ll be using is ‘ImageMagick’ and it’s available to install via  your normal channels. If you were using a distro that uses apt (Debian/Ubuntu/Mint/etc) then it’s trivial to install with:

Otherwise, install it with your default package manager tools. (You just might have installed when we covered how to resize images with ImageMagick. If not, now’s a good time to install it and then read that article!)

So, next you’ll either want to use the /path/to/directory where your JPG files are,  or just navigate to the directory where you’ve stored them (the easiest path), and you can convert them all with just one command:

Congratulations, in just that one command you’ll have converted all the JPG to PNG files. Feel the power of Linux! You’ll retain the originals, just in case something goes awry. If you’re happy with the results, you can always delete the originals with any one of a number of commands.

So, what if you just want to convert one JPG to PNG? Well, that’s easy:

See? I told you it was easy. While there’s a whole lot of complexity with ImageMagick, it can be quite simple to use for some very generic day-to-day tasks. Of couse, man imagemagick is always an option to learn more.

Closure:

Yup… It’s really not all that hard to convert JPG to PNG files with ImageMagick. If it’s a large number of files, it could be a bit for you to convert them all, but let it do its thing and it won’t take too long on a modern computer. If you only need to convert one image, that’s fine too.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Find Your Graphics Card Information

Today’s article isn’t all that spectacular, but it is useful, as we’re going to discuss a few ways to find your graphics card information. That’s handy stuff to know, especially if you are new to the computer or are looking to do things like find drivers for said graphics card. This should be remarkably quick and easy, actually.

We will be using tools we’ve used before. These are simple tools, tools used to learn hardware information. Well, they can all be narrowed down to show just the graphics card information. They can also give information about other hardware, not just graphics card information.

All the tools we’ll be using should be installed by default. We will use one program that isn’t necessarily installed by default. That program will be inxi. You can learn how to install inxi easily enough, and the rest should be installed by default. If inxi is not installed, install it.

Like I said, the article should be fairly quick and easy. You only need a few specific commands. ‘Snot all that complicated, now is it? 

So, let’s take a minute to read an article that tells you how to learn more about your…

Graphics Card Information:

As is often the case, this article requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, let’s go ahead and use the inxi command first:

See? Plenty of graphics card information.

How about we use ‘lshw’, a tool for listing hardware information? Well, the command for that would be pretty easy. You just need to specify that you want graphics card information. It looks like:

Finally, we can use ‘grep’ and ‘lspci’. We’ll also use the -k flag to list kernel drivers. It’s easy. You don’t have to memorize it, you can just refer back here later when you actually have a need for your graphics card information. It looks like:

That should do it. You can use any of those three methods (or more) to find your graphics card info. I just use on-board graphics, so a screenshot would be quite boring.

Closure:

Well, there you have it. You have yet another article. I didn’t go deep into the usage of each tool because there’s no reason to. Each program has a help file associated with it. Consult the help file if you wish to know more. This article’s goal was to demonstrate a specific use.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

A Couple of Ways To Resize Images With ImageMagick

In today’s article, we’re going to go over a couple of ways to resize images with ImageMagick. It’s a useful skill to have if you’re into sharing images or the likes. This will actually be pretty quick and easy. I won’t take much of your time today but it’ll be longer than some other articles – but it really should be a quick read for you today.

It’s nice to not put full resolution pictures online – unless there’s a reason for the higher resolution. So, it’s a bit of a politeness to resize your images. I try to be considerate, ’cause I know what it’s like to have limited bandwidth. You people who started off in life with things like 100 GB fiber have no idea the pain we went through to get here! Alas, that whining is perhaps subject to another article, though probably not really a suitable article for this site. There are people who still use slow connections, and metered connections are entirely too popular.

So, what is ImageMagick? It describes itself as:

ImageMagick – is a free software suite for the creation, modification
and display of bitmap images.

ImageMagick is actually quite a useful application for quickly and easily manipulating images in the terminal. ImageMagick is so robust that trying to cover all of it in a single article would be foolish. I simply couldn’t do it within the bounds of a single article.

That’s why we’ll just be examining a couple of quick ways to resize images with ImageMagick. We couldn’t possibly cover it all today. If you want to see what all the options are, I’d recommend checking the man pages – and reading other tutorials that cover the things you’d like to do.

With that said and done, let’s resize some images with ImageMagick!

Resize Images With ImageMagick:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

The first thing we’re going to need to do is make sure you have ImageMagick installed. So, let’s install it. The command below is for those who use apt, but you can easily change it to your own package manager. I’m 99% certain that ImageMagick will be in your default repositories! It’s a pretty widely used application! The command for those of us who are apt-using people is simply:

Follow any on-screen prompts to install it, else it’ll tell you that it is already installed. ImageMagick appears to be installed by default on a number of distros, but it’s easy enough to install. You can actually just add a -y to it and skip some of the prompts:

Of course, you’ll still need to enter your password. Well, if you really want to live on the edge, you can enable passwordless sudo easily enough. I don’t really suggest that, but I do tell you how to do it. ‘Snot something for the faint of  heart.

Ah well… Onto the meat of the article!

Resize By Resolution:

Now that you have ImageMagick installed, let’s try resizing something. What we’re going to do first is resize it by way of the resolution. That is, we will resize it by declaring the new height and length. To do so, you’d use a command like:

For example, you might try something like this:

See? Pretty easy. I told you this wouldn’t be too hard – nor will this article be all that long. Well, it might be a bit longer than some, but I won’t let it be too long. I know my reader’s attention span! You should make sure to use the same base resolution. If the image is 16:9, your resized image should retain that aspect ratio. Otherwise, your images may appear warped and ugly.

I should probably mention that it’s possible to make images larger with this command. However, when you make an image larger you lose fidelity. Making an image too large is going to result in an ugly image. It’s not like the television where you can just keep zooming in and enhancing. Ones and zeros don’t work like that.

Resize By Percentage:

This is my favorite way to resize images with ImageMagick, unless I have a specific reason to resize images by resolution. In this case, you just declare a percentage of the original and ImageMagick does the rest. It’s really a very easy command. It looks a little like this:

If you want, here’s an example of how you can use that command to resize images by percentage with ImageMagick:

That command will make ImageMagick output a file that’s 50% smaller than the original image. Not only will this be a smaller image visually, it will have a smaller file size. Because of the way images work, this doesn’t mean the new file size, size on disk, will be reduced by 50%. It just means you’ve reduced the image’s dimensions by 50%. The size on disk will also be lower, but it’s not directly proportionate. 

Like above, where  you resize the image by resolution, you can use this to make images larger. The same caveats exist that existed above. That is making an image too large means it results in a poor quality image. As you can guess, making images larger isn’t always a good idea, but it’s generally fine if the operation is making the images smaller.

Closure:

And there you have it. You have another article! This time, we’ve covered how to resize images with ImageMagick. I think that’s a useful skill to have and it’s a quick/easy thing to learn. Of course, you can always check man imagemagick to check the man page. That man page will be enlightening, I suspect.

I’ve changed the format a bit for this article (though I’ve used it before), and made it a bit longer than the recent articles. If you have an opinion on the matter, please feel free to leave a comment. The more I know about your wants, the more I can tailor the content. The more I can tailor the content, the better you’ll enjoy the content. To do this, I need to know your thoughts on the matter. Speak up!

So, do you enjoy the longer articles? Do you enjoy the shorter articles? Do you appreciate a mix of them, and each article only being as long as it really needs to be? I normally try to keep all my articles friendly, informative,  and fairly strictly informal. Lately they’ve been pretty  short, but I can be more verbose, as many of you will have witnessed.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips