How To: Install XnView MP On Ubuntu

Today’s article is going to do exactly what it says in the headline, it’s going to show you how to install XnView MP on Ubuntu. It won’t be a very long article, perhaps a bit longer than some, nor will it be all that difficult. XnView is a great photo viewing and manipulation application that I invite you to try out. I’ll be counting this as a review. That defines it best.

First, let me be clear… XnView is a closed-source application. It is proprietary and you never own the software. That doesn’t make it bad, it’s great software, it just means that some people may choose to ignore this article in favor of truly open software. That’s okay, they have that choice. Yay! Freedom!

So, what is XnView? It’s an image viewing/manipulation tool. It even allows you to do some batch processing on images, while offering some great ways to visualize your image collections. I was a fan back when I used Windows. When they started releasing versions for Linux I was pretty stoked.

In fact, it used to be XnView and now it’s XnView MP with the ‘MP’ standing for ‘multi-platform’. And, well, that’s true. It is mult-platform. And, well, that’s a great thing. I love this program!

I have previously mentioned XnView MP in these articles:

Let’s Reduce The Size Of .png Files
How To: Sanitize Exif Data From Your Digital Images For Privacy Sake

And, while this article is aimed at Ubuntu, it will work for other distros with just a few changes. Feel free to check XnView.com to see if they have a download for you.

More About XnView MP:

See, the greatest thing about XnView MP is exactly how many image files types it can deal with. It works for *all of them*. You’ll have to work REALLY hard to find an image format that doesn’t work properly in XnView.

Lemme find you a link…

Here, XnView handles more than 500 image formats. I wasn’t kidding. You’ll work REALLY hard to find an image format that’s unsupported by XnView MP!

Not only that, you can convert between image formats. You can not only do so, you can batch process them. If you visit the link, everything with the ‘write’ box checked can be converted to. It’s an easy to operate application, as well.

You can also do things like watermark an image – and, again, do so by batch processing your image collection. There are other tools from the same company, including XnConvert which is a more specialized tool. Examine those in your free time, if you’d like.

Anyhow, XnView MP has the usual tools. You can resize and crop. You can edit red eye out of the image. You can adjust contrast and light. Then, there are a variety of effects and filters you can apply. 

Finally, or not, you can view your photo collection in a variety of ways. You have everything from filmstrip view to slideshow options. There’s a bunch of different choices and things like EXIF data are supported. You really can’t go wrong with XnView MP.

How To Install XnView MP:

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.

Once you’re there, let’s change to the Downloads directory:

Next, you’re gonna download XnView MP:

Finally, you’ll want to install XnView MP:

Now, XnView MP updates frequently, so you’ll want to remember this page and these steps. When XnView MP updates, simply run the above commands all over again and you can update XnView MP on Ubuntu. It’s amazing what you can do in the terminal. You can do all the things in the terminal!

Bonus:

By pure happenstance, I happened to check this on a Linux Mint box. It’s an older version of XnView, but you can actually find a version of XnView in the default repositories. It probably(?) won’t update with nearly the same frequency as your manual updates, but Mint users can install XnView with:

Follow the prompts and you can install what I suppose would be a supported version of XnView. I can’t think of any good reason to use an older version, but I wanted to mention that the option is there. Then again, it might just be the same and update with the same frequency. I confess that I’ve never tried it.

Notably, there’s no such option on Lubuntu (Ubuntu) 22.04. So, I guess it’s a Mint thing. Even with Mint, I’d expect that you’ll be just fine by installing XnView MP with the method above. The above method will, of course, work on any system that’s using a package manager that works with .deb files. Easy peasy…

Closure:

And there you have it. You have a new article! This time around, you’ll have learned how to install XnView MP on Ubuntu. It’s not terribly difficult and it’s a great application.

Sure, it’s proprietary – but that doesn’t necessarily mean it’s bad. If you’re philosophically opposed to closed source software, this article isn’t really meant for you. Again, this is really more of a review – a way to make more Linux users aware that XnView exists and is available for Linux.

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 Multiple Filenames By Extension – With Locate

In today’s article, we’re going to explore another way to find multiple filenames by extension – with locate. It’s a handy skill to have and will see you installing ‘mlocate’ to get access to the ‘locate’ command. It shouldn’t be a difficult or even very long article.

If this seems really familiar, then you’re paying attention. After all, it was just a couple of days ago that you saw this article:

How To: Find Multiple Filenames By Extension

So, why are we covering the same topic? Well, WordPress, for legitimate security concerns, likes to eat the slash. (It’s a slash and a backslash. There’s no ‘forward slash’ if you want to be *technically* correct.)

Slashes are understood programmatically, by many programs – including PHP. So, in theory it’d be possible to at least probe for exploits with an unescaped slash. The solution is sort of to escape the slash by including two of them, but then WordPress eats that escaping slash every time you save a draft and add to it!

This is extremely frustrating as an author. It seriously sucks. It’s something I’ll need to keep in mind for future articles, always wary of the dastardly slash! At least now I know…

Well, that hassle of escaping the slash also reminded me that we can accomplish the same thing without any slashes, just by using the ‘locate’ command. With the previous article still fresh in my memory, I figured I might as well write the same article – but with a different tool. Why not?!?

Install mlocate:

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 ‘locate’ command is actually a part of the mlocate package. It’s not always installed by default, but it should be in every default repository out there. It should be easy enough for you to install. 

For the record, the ‘locate’ command describes itself like:

locate – find files by name

Well, that description looks promising – and is exactly what we’re hoping to accomplish! So then, go ahead and install it. You can install it just like you’d install any other software. In the terminal, it’d look something like:

Install mlocate In RHEL/CentOS:
Install mlocate In Debian/Ubuntu:

That’ll work for most distros, assuming you’re using those package managers. If you’re using a different distro, just go ahead and try the same command but adjusted for your package management software. You should be able to find and install it easily.

NOTE: You’re not done yet. The locate command works off of a database. It’s really quick to generate it and it will use a cron job to keep itself updated after that. So, to get the database started, you’ll want to use this command:

With that done, you’re good to go to the next step…

Find Multiple Filenames By Extension With Locate:

Don’t close your terminal from the previous step! Like oh so many articles, this one also requires an open terminal. So, with your terminal still open, you can start to find filenames by extension with locate. For example:

That will find filenames by extension (with ‘locate’) in the current directory. If you want to specify more filenames, it’s really simple:

You can find just one file by extension:

Or you can find a few files by extension:

The sky’s the proverbial limit and the syntax is so much easier. It’s my understanding that the ‘locate’ command is faster because it relies on a database. I ran a couple of tests, using the article about how to time a command and the results weren’t really conclusive – but I only tested with very simple operations. So, your mileage may vary. Feel free to test it and let me know your results!

Closure:

Well, there’s another article. This time, you’ve learned how to find multiple filenames by extension with ‘locate’, and seen that ‘locate’ is a handy command with easier syntax. So, if you’re interested in the ‘locate’ command, be sure to check the man page (man locate). There are many folks who seem to prefer the ‘locate’ command in general, so it seemed like a good article to include.

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.

Check System Information With uname

In today’s article, we’re going to show you how to check system information with uname. This is a pretty handy command to have in your toolbox, and it’s really simple to use.

Once again, I’ll probably not cover every option, but only show you the commands I think you’ll find most useful. This should be both quick and easy enough for anyone to understand. Even a rank beginner should be able to follow along.

If you’ve ever asked a question on a forum, you may have been asked to show the output of the ‘uname -a‘ command. That’s a fine generic command to run, but you don’t have to output all that information. This could come in handy when you’re scripting and only need some of the information.

We’ll be using the uname command, as you might have guessed. According to the man page, the command defines itself as:

uname – print system information

That’s a pretty accurate definition and, sure enough, matches the headline and the introductory paragraph. Like I said, we’ll be collecting system information with uname. There’s not much more to it, so let’s just jump into the article.

Check System Information with uname:

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.

In it’s basic usage, the uname command can be run without any modifiers at all. To do so, simply type the following to get the system’s name:

The output of that will almost certainly just say ‘Linux’. Handy! 

Ah, but the uname command can do so much more. Want to know if you’re using 32 or 64 bit, the architecture? Easy enough, just use:

Would you like to use uname to check your kernel version? Try this command:

If you want to know your kernel release, that is the specific release you’re using at the moment, you need the -r flag. Try this:

Want to know the name of the network? Amazingly enough, that would require you using the -n flag. So it looks like:

Finally, as I mentioned in the intro, there’s the granddaddy of uname commands, which will output all the information you really need. Sure enough,  it’s accomplished with the -a flag:

As you can see, the flags mostly make sense for this command. Because of this, they should be easy to remember when you need to recall system information with the uname command. To see the complete manual, use the man uname command.

Closure:

Well, that’s yet another article. I hope you liked reading it as much as I enjoy typing these silly things out. It’s probably time to do a meta article soon – as I’m really itching to do so. There have been some pretty good changes. So, that’ll be a fun article to write and I may do so soon.

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.

Some Useful Ways To Use The Touch Command In Linux

In today’s article, we’re going to learn some useful ways to use the touch command. It’s not a complete listing of options, it’s just the commands that I think you’re most likely to find useful when using said touch command. This won’t be all that difficult to process, even for a new Linux user.

It pains me to not give this a witty, clickbait title. Though, it does remind me of a story. I think I’ll share it…

So, I was on the Interstate. At the time, my weekend was partially filled up by playing in a Top-40 band. That explains why I had pop radio on the FM radio we all used back then. I was driving along and on came this song for the first time, or at least my first time hearing it.

Yes, the Divinyls song, I Touch Myself. I laughed so hard that I had to pull off to the breakdown lane. I didn’t even notice the cop pull up until he flashed his lights and used his cruiser’s bullhorn thing to tell me that it was an emergency lane and to move on. He didn’t even check if I had an emergency, he just told me to move on. Maybe he too was listening to pop radio at the time?

So, I just want you to know how hard it was for me to *not* use a ‘witty’ article title. You’re welcome. As I often say, I’m pretty much just a giant 5 year old.

Anyhow, like I said in the beginning, this is going to be some useful ways to use the touch command in Linux. Read on!

The Touch Command:

The touch command is a terminal only thing, so you’ll need an open terminal to follow this article. 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.

As I said, this isn’t going to be a complete listing of touch commands, it’s just the most useful – or those I think you’ll find the most useful. If you want a complete list, just run man touch in your terminal and all shall be revealed.

So, you’re mostly going to use the touch command to create files. You can create files with touch by using the following:

Or create multiple files with:

I suspect many of you know about that, but there’s more to touch! Quite a bit more, actually. It’s a handy commend for other things, like mucking about with timestamps.

Want to create a file – but not make the file if the filename already exists (handy for scripting)? You can do that. The command would be:

Want to change a file’s modification and access time? You can do that with the -a flag, which will change both to the current date and time:

If you want to change just the modification time, use the -m flag.

Now, you can also specify a specific access and modification time, so that you’re not just setting it to the current date and time. It’s not too complicated. It looks like this:

That’s YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. So, a fairly universal time and date format, something you may know from other commands.

You can also just tell touch to use the timestamp from another file. That’s done with:

In the above case, the command will set the timestamp of <file_1> to that of <file_2>. Pretty handy, huh? 

Again, there’s more to the touch command. To learn more, just type man touch into your terminal and you’ll see the various other options. These are just a few of the options that I’ve used, those that I think are the most useful. It’s a great way to expose newer users to some of the nifty terminal commands available in their Linux systems.

Closure:

And there you  have it. You now have an article that helps you learn how to use the touch command in Linux. It’s a handy command and it does more than just make files. We’ve actually used the touch command in exercises before, so it’s nice to see what other options are available. Also, as tempting as it was, I didn’t use any puns or innuendo in the article. 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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Let’s Learn To Remove A Directory

Today’s article is going to teach you how to remove a directory. This being Linux and rmdir, you can only remove empty directories. That’s okay, that’s still what we’re going to use. I’m pretty sure I’ve explained how to remove files before and, if not, that’s a pretty simple task.

This article is going to be light on details and pretty short. I popped positive on one COVID test and negative on another. I could take a third test, but I really just feel crappy and not all that bad. Still, it’s an excuse to have a nice and easy article! I like those sometimes! My proofreading may be sub-par.

Like I said, we’ll be using ‘rmdir’ and that only works on EMPTY directories. I can’t stress this enough! If there’s a file in the directory, any file, it will not delete the directory. 

Umm…

I do not know the design reason for making ‘rmdir’ (a standard tool in every Linux) only remove empty directories – but I suspect it’s a protection method. It’s protecting itself from you – meaning you must go in and confirm that it is empty and that there are no files remaining that you’d like to keep. After that, you can delete the directory.

That stands to reason and, frankly, it’s the only reason I can think of. If anyone knows the real reason, assuming I am wrong, please feel free to let me know in a comment. I’m quite curious. Ah well… Onto the article!

Remove A Directory:

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.

Now, with your terminal open, let’s use ‘rmdir‘ and learn how to remove a directory. In its basic form, the command is:

This works if it’s a path you want to specify:

If you want, you can use the -v switch and get a verbose output, telling you what is being deleted. This is probably for the best. So, it’d look like:

But wait, there’s more! What if you wanted to remove all of that, you want to remove /path /path/to and /path/to/dir? Well, you can do that:

Of course, if you want confirmation of what’s being deleted, try:

Assuming all those directories are empty, the command will complete itself and remove all the directories in that path. Those are basically all the rmdir commands you’re likely to need, but you can check man rmdir for more information.

Closure:

See? Nice and easy. See? You even get an article when I’m dying from the plague! Don’t worry, I’m sure I’ll be just fine. Statistics are my friend at times like this, so my worry level is exactly 0%. The odds of it incapacitating me are negligible and I’m a pretty big fan of math.

I’m vaxxed to the max and even boosted – which only lessens your chance. I’ll be fine. After all, only the good die young! (I am not young, now that I think about it!) I’ll quarantine at home and hope for the best, while monitoring for degradation.

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.

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