How To Make The Linux Terminal User Friendly With ColorLS

The Linux terminal has a solid UI. Most distributions have good defaults, and it makes using the command-line much easier. Still, for as great as the Linux terminal is, improvements are always welcome, especially those that make the Linux terminal user friendly.

Introducing ColorLS, a command-line addition that can make using the terminal much nicer. It adds nicer fonts, and icons next to different files in the command-line (like a music icon next to an MP3 file, a picture icon next to a JPG file, etc.)

Install Ruby

The ColorLS app requires work as there isn’t an easy way to install the software. As of now, there aren’t any downloadable packages, and no Linux distributions have direct support for the software. Instead, to use it, you must build the software from scratch.

ColorLS is a Ruby gem, so the Ruby programming language is a prerequisite. The Ruby programming language and run-time aren’t difficult to install on Linux.

To get Ruby, open a terminal and follow the instructions that correspond with your distribution.

Ubuntu

sudo apt install ruby ruby-dev git

Debian

sudo apt-get install ruby ruby-dev git

Arch Linux

sudo pacman -S ruby git

Fedora

sudo dnf install ruby git -y

OpenSUSE

sudo zypper install ruby git

Generic Linuxes

ColorLS needs Ruby, and there’s no way around it. If you don’t install it, ColorLS simply won’t run. Luckily, even the most obscure Linux distributions can easily install the Ruby language/runtime, due to some Linux programs made with Ruby.

Open up a terminal, use the package manager to search for “Ruby” and install it. Can’t get Ruby? Head over to the official website and build it manually. Be sure that you also install the Git tool, as it’s necessary for interacting with the various Git repos in this tutorial.

Install Fonts

The amazing features that ColorLS has come from a custom font. This font provides a customized look and so many other things that just aren’t possible with fonts that most Linux distributions ship with. As a result, before getting to use the ColorLS terminal add-on, you must install Nerd-Fonts.

Nerd-Fonts is huge and will take a long time to grab from GitHub. In a terminal, clone the files to your Linux PC.

git clone https://github.com/ryanoasis/nerd-fonts.git

Cloning the Nerd-Fonts files will take a long time, so it’s best to just leave the terminal window open and go do other things. When it completes, it’s time start the installation.

First, use the CD command and move the terminal into the “nerd-fonts” folder on your PC.

cd nerd-fonts

The Nerd-Fonts package comes with an installation script so that users don’t need to place the files on the system manually. Execute the script with:

./install.sh

Let the script install the fonts, but be patient, as installation takes quite a while.

Install ColorLS

ColorLS is up on Github, so to get it, open up a terminal and use the git clone command.

git clone https://github.com/athityakumar/colorls.git

Move the terminal into the sources folder with the CD command.

cd colorls

Install the program with the ruby command.

sudo gem install colorls

Using ColorLS

ColorLS is an application and doesn’t need any configuration to run. To take advantage of it, open up a terminal and run it in any directory.

colorls

Running the basic ColorLS command with no modifiers or switches will print out all files in the directory it’s in, along with special icons next to each file type. However, it will not show hidden files, unless the “a” switch is used.

colorls -a

View Permissions

Like the traditional LS command, ColorLS can view more than just files in a given directory. It can also determine the ownership of files, permission settings, sort files, etc. To view permissions with the ColorLS tool, run the following command in a terminal.

colorls -l

Sort Files By size

With the “S” switch, ColorLS can show and sort files with size in mind. To do this, run:

colorls -S

Only Show Folders

Want to view items in a directory but only want to see sub-folders? By running the ColorLS command with the d switch, you can. In a terminal, do the following.

colorls -d

Save ColorLS Command Arguments To File

There are dozens of different options for the ColorLS tool that make it a truly useful and colorful replacement to the LS command. If you’d like to see all of the command arguments, run ColorLS in a terminal with the help switch.

colorls --help

Alternatively, it’s possible to save the “help” information that appears when the above command is run by piping it to a text file.

colorls --help >> ~/Documents/colorls-commands.txt

View the contents of the text file in a terminal using the cat command.

cat ~/Documents/colorls-commands.txt

Read How To Make The Linux Terminal User Friendly With ColorLS by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Install The qTox Client On Linux

Encrypted messaging is getting big on Linux, and one of the more popular protocols for this type of communication lately is Tox. It’s completely p2p, supports text, video, and has dozens of security and privacy features. The Tox protocol is open source, and the project encourages developers to create their own third-party AppImage to use the chat service. Out of all of the clients out there, qTox client is one of the most popular.

Install Dependencies

The qTox client itself, like all Tox clients, rely on the Tox protocol. On many Linux distributions, there aren’t official packages for the protocol, so you’ll need to build it manually. To compile the protocol, open up a terminal and install the necessary build dependencies. Then follow the commands to compile the code on your system.

Ubuntu

sudo apt-get install \
    build-essential \
    cmake \
    libavcodec-dev \
    libavdevice-dev \
    libavfilter-dev \
    libavutil-dev \
    libexif-dev \
    libgdk-pixbuf2.0-dev \
    libglib2.0-dev \
    libgtk2.0-dev \
    libkdeui5 \
    libopenal-dev \
    libopus-dev \
    libqrencode-dev \
    libqt5opengl5-dev \
    libqt5svg5-dev \
    libsodium-dev \
    libsqlcipher-dev \
    libswresample-dev \
    libswscale-dev \
    libvpx-dev \
    libxss-dev \
    qrencode \
    qt5-default \
    qttools5-dev-tools \
    qttools5-dev \
    git

Debian

Getting qTox built on Debian is no problem, though officially, only Debian 9 Stable (Stretch) has support. Those intending to build this software on Old Stable (8) or Testing (10) do so at your own risk!

In a terminal, install the following dependencies with the Apt-get package manager.

sudo apt-get install \
    automake \
    autotools-dev \
    build-essential \
    check \
    checkinstall \
    cmake \
    ffmpeg \
    libavcodec-dev \
    libavdevice-dev \
    libexif-dev \
    libgdk-pixbuf2.0-dev \
    libgtk2.0-dev \
    libkdeui5 \
    libopenal-dev \
    libopus-dev \
    libqrencode-dev \
    libqt5opengl5-dev \
    libqt5svg5-dev \
    libsodium-dev \
    libsqlcipher-dev \
    libtool \
    libvpx-dev \
    libxss-dev \
    pkg-config \
    qrencode \
    qt5-default \
    qttools5-dev \
    qttools5-dev-tools \
    yasm \
    git

Arch Linux

Arch Linux users should have no issue installing the qTox dependencies, as support for the OS is specifically outlined on the website. However, if you’re on Arch Linux and don’t feel like building the app from source, consider downloading the AUR package of qTox instead.

sudo pacman -S --needed base-devel qt5 openal libxss qrencode ffmpeg opus libvpx libsodium git

Fedora

Getting all necessary dependencies for Fedora Linux is a two-step process. First, open up a terminal and use DNF to install the Fedora development package group.

sudo dnf groupinstall "Development Tools" "C Development Tools and Libraries"

Next, use the terminal to get the special qTox/Toxcore dependencies.

sudo dnf install \
    autoconf \
    automake \
    check \
    check-devel \
    ffmpeg-devel \
    gtk2-devel \
    kf5-sonnet \
    libexif-devel \
    libsodium-devel \
    libtool \
    libvpx-devel \
    libXScrnSaver-devel \
    openal-soft-devel \
    openssl-devel \
    opus-devel \
    qrencode-devel \
    qt5-linguist \
    qt5-qtsvg \
    qt5-qtsvg-devel \
    qt-creator \
    qt-devel \
    qt-doc \
    qtsingleapplication \
    sqlcipher \
    sqlcipher-devel \
    git

OpenSUSE

sudo zypper install \
    libexif-devel \
    libffmpeg-devel \
    libopus-devel \
    libQt5Concurrent-devel \
    libqt5-linguist \
    libQt5Network-devel \
    libQt5OpenGL-devel \
    libqt5-qtbase-common-devel \
    libqt5-qtsvg-devel \
    libQt5Xml-devel \
    libsodium-devel \
    libvpx-devel \
    libXScrnSaver-devel \
    openal-soft-devel \
    patterns-openSUSE-devel_basis \
    qrencode-devel \
    sqlcipher-devel \
    sonnet-devel \
    git

Generic Linux

Linux users who want qTox and all of its components will need to visit the installation page and learn about what to install to build the code successfully. Alternatively, there is a qTox AppImage available. The AppImage will get the job done, though by not compiling it from source, the program will not be optimized for your PC.

Compiling Toxcore

At the center of qTox is the Tox protocol (aka toxcore). Toxcore is the main dependency, and without it, the qTox program will not build correctly. Luckily, building and installing the Tox protocol on a Linux system is super simple.

Start the installation process of Toxcore by grabbing the latest code in a terminal with the Git tool.

git clone https://github.com/toktok/c-toxcore.git toxcore

CD into the new “toxcore” folder and run cmake.

cd toxcore
cmake .

Build the Toxcore software by executing the make command.

make -j$(nproc)

Lastly, finish up the process by installing Toxcore.

sudo make install
echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf

sudo ldconfig

Install qTox Client

Toxcore is working, so now it’s time to build the qTox client and install it on Linux. Like with toxcore, building the qTox client starts by cloning the code locally via Git.

git clone https://github.com/qTox/qTox.git

With the qTox code on your Linux PC, use the CD command and move the terminal into the sources folder.

cd qTox

Inside the sources folder, run cmake to generate a makefile.

cmake .

Compile the qTox code on your Linux PC with the make command.

make -j$(nproc)

Install the software on your Linux PC with make install.

sudo make install

Using qTox

Launch the qTox app on your Linux desktop. After the app finishes starting up, you’ll notice a login window. If you’ve already got a Tox account, log in with your user information. Alternatively, select the “New Profile” button, and create a new user.

Once you’re in qTox, you’ll be able to add friends by pasting their ID codes into the “Tox ID” box, under the “add friend menu”.

Read How To Install The qTox Client On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Set Up A uTorrent Server On Linux

If you love uTorrent, but don’t feel like dealing with Wine just to get it working on Linux, there’s another way to enjoy the software. As it turns out, uTorrent does have support for Linux, in the form of “uTorrent server” which means you can set up a uTorrent server on Linux and avoid using Wine altogether.

uTorrent server works like a lot of other torrent server tools on Linux and allows users to add torrents from any machine on the network via a web browser.

Install uTorrent Server

The uTorrent server app does have Linux support, though it only has downloads available for Debian/Ubuntu systems. If you plan to run a uTorrent server on Linux, it’s best to install Ubuntu Server, or to set up a Debian server, as there appear to be no plans for Redhat based systems like CentOS/Suse Enterprise, Fedora Server, Rhel, etc.

Note: if you absolutely have to have uTorrent server on your Redhat Linux server system, try running the software anyway. Though the website says it supports “Debian,” it’s just a Tar archive.

Getting uTorrent server starts out by using the wget download tool. Open up a terminal and grab the most recent version of the server software.

Ubuntu

wget http://download-hr.utorrent.com/track/beta/endpoint/utserver/os/linux-x64-ubuntu-13-04 -O utserver-ubuntu-64bit.tar.gz

or

wget http://download-hr.utorrent.com/track/beta/endpoint/utserver/os/linux-i386-ubuntu-13-04 -O utserver-ubuntu-32bit.tar.gz

Debian

wget http://download-hr.utorrent.com/track/beta/endpoint/utserver/os/linux-x64-debian-7-0 -O utserver-debian-64bit.tar.gz

or

wget http://download-hr.utorrent.com/track/beta/endpoint/utserver/os/linux-i386-debian-7-0 -O utserver-debian-32bit.tar.gz

Extract the server software into the /opt/ folder on the server’s file system.

sudo mkdir -p /opt/utorrent-server/
sudo tar -zxvf utserver-ubuntu-*.tar.gz -C /opt/utorrent-server/ --strip=1

or

sudo tar -zxvf utserver-debian-*.tar.gz -C /opt/utorrent-server/ --strip=1

This version of uTorrent server is for Ubuntu 13.04, and Debian 7. However, it will run on newer versions like Ubuntu server 18.04, and Debian 9. To do this, you’ll need to install a few things. Specifically, LibSSL 1.0. In a terminal, enter the following commands to get it going.

sudo apt install libssl1.0.0 libssl-dev

or, for Debian users:

sudo apt-get install libssl1.0.0 libssl-dev

Set up uTorrent

Downloading uTorrent server for Linux contains a few things. Mainly, the core server software, which is important to run the app. In addition to the server binary, there’s a web UI component that needs setting up. Luckily, to set up the web UI, you’ll only need to extract some files to a directory. In a terminal, use the cd command and move the terminal to the new /opt/utorrent-server/ folder on your server. Then gain root access to start the extraction process.

cd /opt/utorrent-server/
sudo -s

The uTorrent software package has another archive inside of it, that needs extracting. To extract it, run unzip.

unzip webui.zip

Start tuTorrent Server

With the uTorrent Server application set up correctly, it’s time to launch it. Open up a terminal and use the CD command to move to the uTorrent server directory.

cd /opt/utorrent-server/

In the uTorrent server directory, use the chmod command to update the server app’s permissions and set it to “executable”. It’s important to update the permissions of this file, otherwise, the server will not start up.

sudo chmod +x utserver

Now that the permissions are set up correctly, uTorrent server is ready to start up. In the terminal, execute the utserver file.

sudo ./utserver

Run uTorrent Server In Background

The uTorrent server is running, though it doesn’t have a script to automatically start it up. As a result, the admin will need to manually run the utserver command and keep a terminal open.

Luckily, it’s possible to set up uTorrent server to run in the background, with the help of a simple script. To set up the script, open up a terminal and follow the instructions below.

First, add the Shebang to the autostart program. Adding a Shebang allows Bash and the terminal to understand what to do with the script when run.

sudo touch /opt/utorrent-server/utorrent-start

sudo -s 
echo '#!/bin/bash' >> /opt/utorrent-server/utorrent-start
echo '' >> /opt/utorrent-server/utorrent-start

Use the echo command to add the automatic start command to the startup script.

sudo -s 

echo 'cd /opt/utorrent-server/' >> /opt/utorrent-server/utorrent-start
echo '' >> /opt/utorrent-server/utorrent-start
echo './utserver &>/dev/null &' >> /opt/utorrent-server/utorrent-start

Update the permissions of the script and move it into place.

sudo chmod +x /opt/utorrent-server/utorrent-start

sudo mv /opt/utorrent-server/utorrent-start /usr/bin

To run uTorrent server, enter the following command.

sudo utorrent-start

Accessing uTorrent Server

Installation is complete! Now it’s time to access the server! Open up a new browser tab on your Linux PC, and visit the following website URL.

Note: enter “admin” in the username section, and leave “password” blank to log in.

http://ip-address-of-server-pc:8080/gui/web/index.html

Running uTorrent server on your Ubuntu/Debian desktop? Open a web browser and visit this URL instead.

http://localhost:8080/gui/web/index.html

Read How To Set Up A uTorrent Server On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Edit Subtitles In Movies On Linux With Aegisub

Many video players support loading subtitle files alongside video files, even on Linux. However, it’s much better to add subtitles directly to the video file. Going this route ensures that no matter what program plays your video file, the subtitles will always be present. When it comes to importing subtitles into video files on Linux, there’s no better choice than Aegisub. It can work with a multitude of different video file codecs and subtitle formats. Better yet, it comes with a graphical editor that allows users to edit subtitles in movies in real time.

Note: downloading subtitle files online is illegal. Please obtain subtitles by extracting them from personal movie backups made legally, and do not share them with anyone!

Install Aegisub

Looking to install the Aegisub app on your Linux PC? You’re in luck; many Linux distributions have packages of it directly in their software sources, so the process is quite easy. To install it, open up a terminal window and follow the instructions below for your respective operating system.

Ubuntu

Ubuntu Linux usually has Aegisub readily available in the software sources. However, for the latest version of the OS (Ubuntu 18.04,) there’s a bug that prevents it from installing. Luckily, if you’re on 18.04, there’s a third-party PPA available. To install it, open up a terminal and use the add-apt-repository command.

sudo add-apt-repository ppa:alex-p/aegisub

Next, run the update and upgrade commands to refresh and install any updates available on Ubuntu.

sudo apt update

sudo apt upgrade -y

Install Aegisub with:

sudo apt install aegisub

Debian

sudo apt-get install aegisub

Arch Linux

sudo pacman -S aegisub

Fedora

It’s possible to use Aegisub on Fedora Linux, though users will not be able to install it through the traditional software sources. Instead, RPM Fusion needs setting up.

Note: replace X with the release number of Fedora Linux you’re using.

sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-X.noarch.rpm -y

sudo dnf install aegisub -y

OpenSUSE

OpenSUSE users looking to get Aegisub will need to first enable a third-party software source.

Leap 15.0

sudo zypper addrepo http://ftp.gwdg.de/pub/opensuse/repositories/multimedia:/apps/openSUSE_Leap_15.0/ opensuse-multimedia-apps

Leap 42.3

sudo zypper addrepo http://packman.inode.at/suse/openSUSE_Leap_42.3/ packman

Tumbleweed

sudo zypper addrepo http://ftp.gwdg.de/pub/opensuse/repositories/multimedia:/apps/openSUSE_Tumbleweed/ opensuse-multimedia-apps

Install Aegisub with the Zypper package tool:

sudo zypper install aegisub

Generic Linux

Need the Aegisub app on an obscure Linux distribution? Grab the source code and compile it yourself!

Add Subtitles To movies

Adding subtitles to video files with Aegisub is surprisingly simple. It starts out by importing the movie file. Import your movie file to the app by clicking the “Video” menu button, then selecting the “open video” option.

Browse for your video file in the “open file” window to load it up in Aegisub.

After importing the movie file into Aegisub, the app will scan the video file quickly, so that it can play it back in real-time, during the subtitle editing process. When the scanning process is complete, click the “play” button in the player and let the video file playback for a bit. Watch the video and ensure that Aegisub is handling the file correctly.

Aegisub has your movie file and can play it back without errors. This means that the subtitling process can begin. The first step in this process is to obtain a subtitle file for your movie. Head over to our MKVToolNix tutorial and learn how to extract subtitle files from the legal backup of your movie.

Once the subtitle file is extracted to your Linux PC’s hard drive, go back to Aegisub, select “File,” then “Open Subtitles”.

Browse for the subtitle file on your hard drive, and allow it to load into the Aegisub app.

When the subtitle file loads up, Aegisub will automatically set out a timeline with the text and overlay it with the video. To view the subtitles, click “play” in the video window.

Edit Subtitles

Now that Aegisub has the subtitle file in sync with the video file, you’ll be able to edit subtitles in movies and make as many changes to the subtitles as possible. Best of all, since you’re working with an existing subtitle set, there’s no need to tinker with the timing of the lines or anything like that.

The on-screen subs appear in a list, chronologically. Use the scroll-bar and look for a line to edit. When you’ve found the line you’d like to change, double-click on it.

Double-clicking on a line in the list will automatically skip to it in the Aegisub video player. From here, click on the text-area next to the video player and write in whatever changes you’d like to make.

Done editing the subtitles in Aegisub? Click “file” then “Save subtitles as” to save the changes.

Read How To Edit Subtitles In Movies On Linux With Aegisub by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Install The Sigil eBook Editor On Linux

If you’re planning to create a new eBook on the Linux platform, you’ll need a solid editor. On Linux, there are a few choices, but one that consistently gets tons of use is the Sigil eBook editor.

Install Libraries

Building Sigil on Linux is possible, though before attempting to do it, you’ll need to install the necessary libraries and various dependency files. Open up a terminal and follow the instructions below. Keep in mind that dependencies are going to differ on each version of Linux, so it’s best to refer to the official documentation for building software on your Linux distribution.

Note: some Linux distributions have Sigil in their software sources. However, building the software from source gives you a more up to date version.

Ubuntu/Debian

sudo apt install git python3-tk python3-pyqt5 python3-html5lib python3-regex python3-pillow python3-cssselect python3-cssutils python3-chardet python3-dev python3-pip python3-lxml python3-six build-essential libhunspell-dev libpcre3-dev libminizip-dev git cmake qtbase5-dev qttools5-dev qttools5-dev-tools libqt5webkit5-dev libqt5svg5-dev libqt5xmlpatterns5-dev

or

sudo apt-get git python3-tk python3-pyqt5 python3-html5lib python3-regex python3-pillow python3-cssselect python3-cssutils python3-chardet install python3-dev python3-pip python3-lxml python3-six libhunspell-dev libpcre3-dev libminizip-dev build-essential git cmake qtbase5-dev qttools5-dev qttools5-dev-tools libqt5webkit5-dev libqt5svg5-dev libqt5xmlpatterns5-dev

Arch Linux

For Arch Linux user there’s a convenient AUR package available that will automatically install all dependencies, and build Sigil. Point your favorite AUR helper at this package here. Alternatively, install the libraries manually:

sudo pacman -S base-devel git
git clone https://aur.archlinux.org/sigil-git.git
cd sigil-git
makepkg -si

Fedora

sudo dnf install git python3-tkinter cmake qt5-qtbase-devel qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel qt5-qtxmlpatterns-devel zlib-devel hunspell-devel pcre-devel minizip-devel pkgconfig python3-devel desktop-file-utils libappstream-glib python3-pillow python3-cssselect python3-cssutils python3-html5lib python3-lxml python3-qt5 python3-regex python3-chardet python3-six hicolor-icon-theme

OpenSUSE

sudo zypper install git boost-devel pkgconfig cmake dos2unix fdupes make hunspell-devel libqt5-qtbase-devel gcc-c++ libqt5-qtlocation-devel libstdc++-devel libxerces-c-devel libxml2-devel libxslt-devel make pcre-devel python3-devel unzip python3-html5lib python3-lxml python3-six python3-tk python3-Pillow python3-cssselect python3-cssutils

Generic Linux

The Sigil Github page outlines in detail the dependencies a user needs to get the software built. Unfortunately, it only goes over what to install on Ubuntu and Debian. Thankfully, it’s possible to take the Ubuntu package names, input them into Pkgs.org and find equivalents on many different distributions.

Build Sigil

The first step in building the Sigil eBook editor is to pull the latest version of the source code from it’s Github page. In a terminal, use the git clone command.

git clone https://github.com/Sigil-Ebook/Sigil.git

Next, use the mkdir command and create a new, separate build directory. Creating a build directory is important because it’s not a good idea to compile the code directly in the source code folder.

mkdir ~/sigil-build

Move the terminal into the new Sigil build folder with CD.

cd ~/sigil-build

Call cmake and set up the development environment.

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ~/Sigil

The above command will generate all of the necessary tools to get Sigil working. If cmake finishes without errors, move on to the compiling process. In the terminal, run the make command.

make

If you have a high-end Linux PC with cores to spare, try this command instead.

make -j4

Compiling programs from scratch takes a long time. When it comes to Sigil, there is no exception; you will be waiting a long time for the build to finish (especially if your Linux PC doesn’t have many cores). When the compiler is done building the code, you’ll be able to install Sigil on your computer with the following command:

sudo make install

Uninstalling Sigil

Built Sigil, used it and realize you don’t want it on your Linux PC anymore? Sadly, since the program was built by hand, there’s no easy “uninstall” button to click.

No worries! Follow the steps below to learn how to clean it from the system.

First, open up a terminal and delete all the traces of the source code and built binaries.

sudo rm -rf ~/Sigil

sudo rm -rf ~/sigil-build

Next, delete the application shortcut so that it no longer appears in menus.

sudo rm /usr/local/share/applications/sigil.desktop

Lastly, purge the rest of the files from your Linux PC:

sudo rm -rf /usr/local/lib/sigil/
sudo rm /usr/local/bin/sigil
sudo rm /usr/local/share/pixmaps/sigil.png
sudo rm -rf /usr/local/share/sigil/

Deleting all of these files should instantly make Sigil unavailable on your operating system. If the Sigil app icon remains accessible in the application menu on your desktop environment, reboot your Linux PC. Resetting your PC will refresh the desktop. After logging back in, the icon will be gone.

Read How To Install The Sigil eBook Editor On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter