Tag: tuts

The Best Linux, Unix, and BSD Open Source Programs

The Best Linux, Unix, and BSD Open Source Programs

Linux Apps

It’s sometimes hard for me to believe that I’ve been using Linux for well over 6 years. In that time, I have steeped myself in the open source way and used and created many programs for different projects. I am sharing this with the world in hopes of guiding the new and old adopters of Linux, Unix, and BSD in finding wonderful applications that can get any project done. With old users, you might know of all of the ones mentioned here and disagree with my reasoning. Feel free to explain in the comments below and please provide an alternative! Note, I linked to the sites but you can download most of them through your package manager or getting a ppa as needed.

Graphics

Let’s start off with the first group, graphics. We need the ability to edit images as they are an important part of our lives. If you are the goto family member who does all he home videos and web work for the family site, then you need these tools! Obviously, you could be an artiest or person who just wants to edit or create an image and these will help you too.

OK, so, the first three applications are probably not surprising to anyone who are new and old in the open source community. Gimp is the de facto choice to do ones image editing as it is the swiss army knife of image editors. It has a loooonnng history and is easily recommended. Next, Inkscape is a vector graphics editor and can be used to create or edit vector graphics. Illustrations, diagrams, line arts, charts, logos and complex paintings are but a few of the things one can do. It also makes up for Gimp’s lack of vector graphics editing options. Now, Darktable isn’t really an image editor but more a virtual darkroom to work with images and do color corrections. Still, it is a great tool for those editing raw photo files from a camera and then importing it to Gimp to finish with gusto. Once done editing images, we need an image viewer. I love Mirage as it fulfills my needs perfectly as an image viewer. It is lightweight and fast but has features for zooming, rotating, cropping and more. Last listed here is Gpick. I do web work and often need a particular color that a page is using. Gpick gets the color info on the screen for usage in other applications. This is great too for when using Gimp but it can’t select the color outside of its window.

Multimedia

Next, we have multimedia programs. This section is clearly important so you can listen to music, view your videos, make videos, edit videos, and more.

OK, the first two are video players. SMPlayer is more a front end for Mplayer but Mplayer is my favorite player given it’s fast, has simple controls, and it plays plethora of video types. I add/mention VLC here because Mplayer doesn’t always have the ability to play the latest and greatest codec and VLC picks up the slack. After these two, OBS is listed because of the awesome ways to record the desktop. One can stream using it too but I use it to get quality recordings of the desktop to do tutorials with. Next to talk about is Blender. It is here for its Non-Linear Video Editor. The controls can be a steep learning curve to learn; but, once you master them, you can not only do video editing but 3D graphics stuff as well. It’s also the best editor for videos on *Nix systems as others tend to be iffy. Now, Deadbeef is indeed the best music player as it loves to state on its site. It plays all kinds of esoteric (PlayStation sound files for instance) and popular music types with great ease. Not only that, its user interface is dynamic and allows for you to setup the look of the player to your needs. Finally, the last two in the list are excellent audio controllers. The first is Alsamixer which is a graphical control interface through the terminal for the Alsa sound system. The second is Pavucontrol which controls the Pulseaudio sound system through its GTK interface.

Internet/Network Tools

In the next group, we have Internet and network programs. This section is clearly important for the fact that we are an interconnected world. To have tools for the Internet is important in order to access it, use it, and maintain it.

OK, Firefox is a no brainer; though, I have less appreciation for it today than I have had before. It mostly comes down to their new plugin system, the weird applications they ship it with, and the loss of some tools that are near and dear to my heart such as Tabgroups. Anyways, it still is the best browser out there. Now, XChat is great for connecting to IRC channels (chat rooms) and even has a built in list of rooms to connect to. The next to talk about is Qbittorrent. It is a phenomenal torrent client that allows you to search databases from it and it has an excellent interface that is superior to Transmission. Now, Filezilla is great for getting files from different computers using FTP, SFTP, and other protocols. It has a great user interface as well that makes remote file access a breeze.

It’s worth mentioning that the next few program we are mentioning gets us into territory that depends on the user. You may not need these programs and so it will dictate if you should download them or not. To start, Wireshark for instance is a network monitoring/capture tool. I use it for several projects but if you aren’t doing anything with networks, you likely wont need it. That being said, EtherApe is similar to Wireshark but only in that it can monitor your network. It is cool even if you don’t necessarily need it because it gives a graphical view of the network connections you are making and how much data you are sending. Last, Remmina is useful if you need to remote into computers and need a graphical connection. It has varying connection options such as ssh, RDP, and more.

Office

This group covers office tools of which there aren’t many per say. Office work is of course a necessary evil in the world; but, you don’t have to use horrible tools too.

OK, other than Microsoft Word, the only contender for handling documents is Libreoffice. Period. As for Evince, it is the best PDF viewer out there and I’ve tried every one of them and continue to come back to it. For dictionaries, you really only have two options to chose from. The first is Google and the second it Xfce4 Dictionary. I keep Xfce4 Dictionary just in case I lose Internet access and need to look something up. Finally, using VYM depends on you. I like visualizing my logic and VYM helps me do just that.

Gaming

Games. What’s there to say? It’s games….

OK, yes, Steam is present. It’s not open source but it’s the only exception to the list I’ve made. Next up, PlayOnLinux (PoL). It can be used for more than games but I think it’s safe to say it’s the biggest reason for using it. They may disagree and you might too but you and them are totally wrong…. I am joking but it is pretty true that the biggest reason to use PoL is for the games. Now, DOSBox will get the old but good games playing if you are a connoisseur of such antiquities. It’s the only emulator out there that I am aware of that targets old systems. Next, everything after DOSBox and before QJoypad are games worth downloading that are free and open source. Goodies like Freedoom and my favorite to this day, The Battle for Wesnoth, are listed. Last is QJoypad. I highly recommend this program to get your controllers working. Go to the site to get the latest version as the repos tend to be older.

Tools/Other

The final group listed here covers tools and other programs. System cleaning, virtualization, and more is l;isted here.

Finally, we reach the end of our list of great apps! This section has a number of useful tools such a Virtualbox which will let you run virtual machines. From there, we have Gparted which manages partitions. Bleachbit and Gtkorphan keep the system clean while MidnightCommander is a great terminal file viewer. Gdebi is an excelent graphical interface to install deb packages and Htop views system resource usage from the terminal. Leafpad is a fast and small text editor to make quick changes to text files while Atom will allow for heavy lifting edits such as coding. Terminator is a great terminal that allows for multi-pane views, transparent background, and more. Next, Gufw is a great interface for managing firewall rules and Ghex lets you view hex files and edit them. Last is one of my creations, FXWinWrap. It is a front end for XWinWrap and makes it easier to set the various perameters.

Well, this complets my list for awesome programs one can use in *Nix like systems. This list is by no means complete but makes a great start. I mentioned web work and one of the tiools I use. Another tool I use is wordpress-cli which helps me manage WordPress through the terminal than the WordPress interface. Linked below is my review for it.


https://www.itdominator.com/wordpress-cli/

Wordpress CLI

WordPress CLI

WordPress CLI

WordPress CLI

As a person who is more comfortable in a terminal environment than GUI, I love finding tools that make my life easier and more comfortable. When I started using WordPress I was often aggravated by the fact that I had to move around an interface rather than just typing up some html or a command to get a task done. Obviously, that method works well for small scale projects but less so when one is managing a lot of content and pages. WordPress just makes life easier in that respect. But I still like having lower level access and this is where WordPress CLI comes in. WordPress CLI is a command line interface for managing WordPress sites. Things like updating the core, plugins, or themes is made faster since I SSH often into my site’s box and can type up some commands quickly to do those tasks and much more. As such, I wanted to make a simple collection of commands that everyone will find useful. But first, we need to install the plugin….

Installing WordPress CLI

As per the sites instructions, it is extremely easy to get up and running. All one simply needs to do is download the file, chmod it, and move it to the proper location.
To download:
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
OR
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Next, let us make it runnable. Simply type:
chmod +x wp-cli.phar
Let’s make sure the file is working properly.
php wp-cli.phar --info
From there, we are ready to move it to its new home. Simply type:
*Note: You might need to use sudo depending on your level of access to the server.
mv wp-cli.phar /usr/local/bin/wp

Using WordPress CLI

OK, now that WordPress CLI is installed we are set to use it. The first thing to do though is cd to the WordPress directory. This is usually somewhere in /var.
Once there, it’s time to play with some of the commands. First things first, one should know what plugins and themes are installed. To do that, simply type:
wp plugin list && wp theme list
This will list all the slugs associated with the plugins themes. One needs them in order to do things like disable, remove, and install them.
Now, let us say that we got from the above commands:

Plugins:
+--------------------------------+----------+--------+---------+
| name                           | status   | update | version |
+--------------------------------+----------+--------+---------+
| add-from-server                | active   | none   | 3.3.3   |
| akismet                        | active   | none   | 3.3.3   |
| backup                         | inactive | none   | 1.1.46  |
| maintenance-mode-free          | active   | none   | 1.2     |
+--------------------------------+----------+--------+---------+

Themes
+-----------------+----------+--------+---------+
| name            | status   | update | version |
+-----------------+----------+--------+---------+
| twentyfifteen   | active   | none   | 1.8     |
| twentyseventeen | inactive | none   | 1.3     |
| twentysixteen   | inactive | none   | 1.3     |
+-----------------+----------+--------+---------+

We notice that Akismet is installed and know too that we are transitioning to use a different plugin to handle spam fighting. To uninstall it we do the following:
wp plugin deactivate akismet && wp plugin delete akismet
If we want it back, we can do the following:
wp plugin install akismet && wp plugin activate akismet
Now, we should update or at least check to see if there is an update needed.
wp plugin update akismet
The same principles are used with themes as well. Replace akismet with the theme name from the list and you get the same results but for themes. The only differences are that instead of plugin we use theme in the command and to disable a theme one needs to use the term disable rather than deactivate. Like so:
wp theme disable twentyfifteen

Final Thoughts

As a final thought or two, it is worth noting how to find the slug for a plugin or theme. To do that, go to either https://wordpress.org/plugins/ or https://wordpress.org/themes/. From there, after finding something worth while, look at the end of the url to find what we need. For this example, use the plugin bbpress and look at the end of its URL: https://wordpress.org/plugins/bbpress/. Supplant that information like so:
wp plugin install bbpress && wp plugin activate bbpress
This will then install the plugin and activate it.
Welp, this covers the basics and gets one started but there are other commands that are available. Simply go to their site to find them. Now that we have an new awesome tool to play with, click the image below to look at quick servers one can setup for WordPress.


https://www.itdominator.com/quick-test-server/

servers with a blue tinted globe

Top Resources For Distro Maintainers

Top Resources For Distro Maintainers

Distro Maintainer
Distro Maintainers looking serious….

There are great resources for a Linux distribution maintainer and here are a few of my favorite. Most sources are geared towards Ubuntu based systems but a few like the Themes and Window Managers links are more or less universal.

Window Managers

The first site deals with the plethora of window managers that are out there. XWinMan lists many managers ranging from session and full desktop managers to just the bare windows themselves. There are some that are deprecated so be weary; but, it still has many that are not!
              Link:  http://www.xwinman.org/

Source List Generator

The next is a site that generates source list files for Ubuntu. This is really awesome for a number of reasons but the biggest for me is recovering from a bad dependency hell scenario. While it is rare, it is something that a maintainer and even a user needs to be aware of. Adding too many PPAs (which generally isn’t recommended) can cause loops and other strange and unexpected behavior from a package manager. In addition, the generator gives PPA info on a number of popular software this is not necessarily shipped with the system. It is well worth keeping in ones developer/user arsenal.
              Link:  https://repogen.simplylinux.ch/index.php

Themes

This third link deals with themes, icons, backgrounds, etc. Who doesn’t like themes? Anyway, it has many of these to spruce up the system and make it less boring. I started using Gnome-Look early on in my Linux experience and it has yet to fail to find me something cool or aesthetically pleasing.
              Link:  http://www.gnome-look.org/

Debootstrap Versions

This fourth link is geared towards building a Debian based distribution. Debootstrap is a great peace of software but needs the PPAs of the system it will setup in a subdirectory of ones system. This links provides the needed information.
              Link:  http://packages.ubuntu.com/search?keywords=debootstrap&searchon=names&suite=all§ion=all

Ubuntu-Mini-Remix

This fifth link goes to a website that has minified Ubuntu ISOs. These are phenomenal for creating new distributions from pretty much scratch. It isn’t LFS kinda scratch but it’s as close as it’s likely to get.
              Link:  http://www.ubuntu-mini-remix.org/

Chrooting in and building up is the best way to do this. I have a video of the steps too:

Package List

This last link is great for doing source compiling. This can be used to find the install name of a package when an error output doesn’t give much of a hint. I must admit I only just recently heard of this page after attempting to compile a installer package. Going to the IRC of the developer was where I learned of this. It’s a bit embarrassing for not having known of this given how long I’ve been using various *nix systems. Still, I guess the old adage, “you can’t teach an old dog new tricks”, is proven wrong.
              Link:  http://packages.ubuntu.com/

Quick Test Server

Quick Test Server

Server

There are times when I need a server in order to test some feature or bit of code. I don’t like spooling up a Linux, Apache, MySQL, and PHP (LAMP) or Linux, NGINX, MySQL, and PHP (LEMP) stack because it’s tedious. Notice what I did there? I made the whole sentence tedious to get you to think it really is tedious. It really isn’t but frankly, I needed a reason to write this. Anyway, so, what is one to do? Well, there are two option that come to mind and those are Python, PHP, or Netcat. One might ask: “Whaaat? Rly?”. Yup. Really. All one needs to do is open up a terminal/cli and get ta hackin.

Python call up the Python module SimpleHTTPServer using the switch -m and then give it a port. Make the port greater than 1024 since those are reserved and require root to use. BAM! Open your browser of poison and go to localhost:portNumber or 127.0.0.1:portNumber.

Python Server

python -m SimpleHTTPServer 1337

I did not need to insert any index.html files to the directory. Python automatically gives a list of the directory contents when no index file is found. As a side note, Python doesn’t seem to read Php properly. I have yet to get it to work.

For PHP all one does is use the switch -S and then give it an address (127.0.0.1) and port. Again, make the port greater than 1024 since those are reserved and require root to use. BAM! Once more, open your browser of poison and go to localhost:portNumber or 127.0.0.1:portNumber.

PHP Server

php -S 127.0.0.1:1337

It is worth noting that with PHP I had to insert an index.php file into the directory I ran the command from. It doesn’t generate any list but does throw an error when no index is found. Additionally, this method seems to only work with PHP files. To test if the PHP server works, simply insert in the index.PHP :

<?php
    phpinfo();
?>

 

For the last one we will look at Netcat. Netcat is the swiss army knife of the networking tools and has an interesting way of creating a kind of server. To start off, simply create a file called serve.sh. The name is arbitrary but that’s what we will use for this example. Then, in the file add

Netcat Server

#!/bin/bash

    echo "`cat index.html`"

When this is done, simply create an index.html as you would any other. In my case, I did:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Google Link</title>
</head>
<body>
    <h1><a href="http://www.google.com">Google</a></h1>
</body>
</html>

After all this prep, which isn’t much we simply run in the terminal where serve.sh and index.html is:

while true; \
do { \
    echo -e 'HTTP/1.1 200 OK\r\n'; sh serve.sh; \
} | nc -l 1337; \
done

One might need to press enter again to actually run it because of the \’s stating “look to next line for rest of command”. One can also just remove the \’s and put the whole command like so:

while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh serve.sh; } | nc -l 1337; done

One can use PHP with this by the way. All one does is rename index.html to index.php. Then one adds some code like in the PHP example above. After that, in the serve.sh, edit the cat index.php to be PHP index.php. This has PHP interpret the file which then has its output gets echoed back to the requester.
All of this needs some explaining. So what is happening is that the while loop is checking to see if there is anything left to run. Note that the first part before the semicolon tells the browser that there is a server where one requested one. IE, it confirms the request. Then, the serve.sh is ran. In serve.sh it echos out what cat prints from index.html or what PHP prints from index.php. This is essentially sent as the file back to the requester. Thus, we can see the h1 sized Google anchor link in this example.

Voila! A nice juicy server is ready for use in any project that needs one. If one is adventurous, one can use these simple servers to serve files on the local network. To do this, all you have to do is allow the port to accept connections using UFW and then change the address “127.0.0.1” to “0.0.0.0”. This isn’t recommended for long term use but can be useful when needing to transfer something or using an app that’s for the local network. Even then, one might be better off just using ssh or email! Still, in those rare times, all one does is allow the port to be open by using ufw.

ufw allow portNumber/tcp

To remove the rule:

ufw status numbered
ufw delete "the number associated with ones portNumber"
Schools Should Teach Kids Scripting

Schools Should Teach Kids Scripting

Schools should teach kids scripting. When I say kids I am thinking of those old enough to be in grades 5-8. Forget actual programming (though one may argue scripting is programming) and get them into Bash. I say Bash because it’s already installed on most major platforms with Microsoft finally coming around in Windows 10. One may ask why and the answer is simple. It is simple. There is no need to install compilers and there is no need to worry about includes or imports or whatever else others have cleverly implemented to create despair in a programmer. Not only that, it gets the core ideas of programming down. Sure, it isn’t Object Oriented Programming (OOP) but that is a minor issue when we are talking about kids. The gist of programming is understanding iterations, functions, variables, assignment, general maths, and other bits and bobs. Once these are down, it is relatively easy to learn most languages. As an example of how easy it is to get started, I will show an example that prints to the terminal screen “Hello World!” and the current user that is logged in with a separate function for each: main and showUser.

Bash Example

#!/bin/bash

function main() {
    echo "Hello World!"; // Prints to the terminal Hello World.
    showUser;            // Calls showUser function
}

function showUser() {
    me=`whoami`;  // Runs a command and assigns the output to me
    echo $me;     // calls the variable me and prints to the terminal.
}
main; // Calls main function

When in a Linux environment this can be made more advanced with simple GUIs through zenity, yad, or dialog.
I wont show an example for those but one should get the drift.

From the established core, one will then focus their attention on concepts like encapsulation, obfuscation, polymorphism, etc. Getting core concepts involving imperative statements and logical procedure is the hardest part. Having had my programming career start off this way makes me biased but it seems to me to be a more logical flow. Schools covering grades 9-12 should cover concepts of OOP by using Java which is a proper programming language. I advocate for Java because of its FX library and the tools that allow one to create full fledged programs. As case and point, let’s look at how easy it is to create a window with a button. To see how easy it is I will use an analogy of a play being setup.

Java Example

import javafx.application.Application;  // The building where the play is
import javafx.stage.Stage;              // The stage in the building
import javafx.scene.Scene;              // The scene of the play. Ie, are we in a city, park, house
import javafx.scene.layout.AnchorPane;  // The confinement of the objects in the scene. Like a house or ally with walls.
import javafx.scene.control.Button;     // The actual objects of the play. Plants, pots, food, etc.

public class Main extends Application {
    @Override
    public void start(Stage stage) {
        // define what is going to be in the scene
        AnchorPane pane = new AnchorPane();    // Create the confinement of where objects go.
        Button closeBttn = new Button("Close Stage Curtain");  // Create an object for our world. A button called Close Stage Curtain.

        pane.getChildren().add(closeBttn);            // Add to the confinement
        Scene scene = new Scene(pane, 800, 600);      // Determin what the scene is comprised of. Ie, dogs and cats with plants?

        stage.setTitle("The Phantome of the Opera");  // Tell the world what play we are seeing
        stage.setResizable(false);    // Limit the stage size to what size the scene says and no more or less
        stage.setScene(scene);        // Set our scene onto the stage
        stage.show();                 // Open the curtains

        closeBttn.setOnAction(e -> {
            stage.close();  // Close the stage curtain
        });
    }

    public static void main(String[] args) { launch(args); }
}

Excluding the fluff of importing the needed libraries and calling main, one can with nine to ten meaningful commands setup a window with a proper title and a button. Not only that, the button closes the window. Amazing! I also like using the play analogy because it gives the top to bottom logic of how Java operates to setup a window. In addition, Java uses HTML and CSS for styling windows. This is awesome because it adds another useful tool were one to get further along in learning all there is to know about tech. So what are your thoughts? Should schools teach kids in this order and with these selected languages? Comment below or Message me through email.

ITDominator’s Youtube Channel

ITDominator’s Youtube Channel

Youtube Channel:

    Linked is my Youtube Channel. At the inception of this post and following my need to switch accounts in order to unify my brand, I am pretty much back to zero subscribers. Starting new yet with more knowledge is invigorating and terrifying all at the same time. I hope you dear follower will find something useful or amusing from my humble collection of videos. I cover a lot but like to focus on C, C++, Java, JavaFX, Bash, Python, Blender, Gaming, and a whole lot of other topics.

Redirect