Essential System Tools: Alacritty – hardware-accelerated terminal emulator

The first tools under the spotlight were ps_mem, a small utility that accurately reports memory consumption of software, and gtop, a system monitoring dashboard. The third tool we showcased was pet, a simple command-line snippet manager. These utilities are console-based. This time we switch to a graphical utility. It’s a terminal emulator called Alacritty. But it’s different to most terminal emulators.

Linux has lots of terminal emulators. What distinguishes Alacritty from the vast majority of terminal emulators? It differentiates itself by offering GPU-acceleration combined with a minimal feature set.

The software is written in Rust, a popular programming language among developers. For example, Rust won the most loved language in Stack Overflow’s Developer Survey for the past 3 years.

Installation

My preferred way of installing software is to compile a program’s source code. For my Arch Linux distribution, I installed a few packages first.

sudo pacman -S cmake freetype2 fontconfig pkg-config make xclip

Then it’s just a matter of cloning the software’s repository and building the software with cargo, Rust’s package manager. Cargo makes it easy to get up and running by downloading a Rust project’s dependencies, compiling the project, making packages, and more.

git clone https://github.com/jwilm/alacritty.git
cd alacritty

cargo build –release

If you’re so inclined, there’s a snap available. And many popular distributions carry a package for the software.

In operation

Let’s go through a simple test to see how Alacritty performs in practice. Alacritty boasts that it’s the fastest terminal emulator available. Defining ‘fastest’ is subjective. Are we measuring the software’s latency? Or the completion of a basic test such as the ability to scroll text in the shortest time?

For simplicity, I compared the software with other popular terminal emulators, seeing how long it takes each emulator to scroll through 100MB of text. Here are the results:

AlacrittyClick image for full size

As you can see, Alacritty completes the test in the quickest time. It’s about twice as quick as kitty, another GPU based terminal emulator. Most non-hardware accelerated terminal emulators lag behind in the test, although there are a few notable exceptions. I also tested a dozen other terminal emulator (results not shown, which were comparable with the results for Terminator and GNOME Terminal etc.), and Alacritty remains top. Different types of text manipulation tests also yielded similar results.

With the same set terminal emulators, let’s see how much memory each emulator consumes at startup in their default configuration, using the ps_mem utility.

AlacrittyClick image for full size

Alacritty consumes the most memory. The default installation sets the scrollback buffer to hold 10,000 lines. You can reduce the software’s memory consumption by lowering the number of scrollback lines. Ideally, we’d like to see dynamic memory allocation, as it can be helpful to have a large scrollback buffer in some situations while minimizing memory consumption.

Features of Alacritty include:

  • The software deliberately pares features to the bone. For example, tabs or splits are not offered. There’s no audio bell.
  • Uses a system’s dedicated GPU to improve performance.
  • Supports scrollback with definable number of lines to scrollback, together with control of the number of lines scrolled (faux scrolling).
  • Option to open URLs on click.
  • save_to_clipboard configuration option for copying selected text to the system clipboard.
  • Support for the LCD-V pixel mode (vertical screens).
  • Supports scancode-based key bindings.
  • Support for bitmap fonts.
  • Preliminary support for Wayland.
  • Cross-platform support – runs under Linux, macOS, FreeBSD, and OpenBSD. Windows support is planned.

Summary

Alacritty is a useful terminal emulator. While its features are frugal, it’s designed to be used together with other software such as tmux. It supports the Unix philosophy of composability, where components can be selected and assembled in various combinations to meet a user’s preferences.

It’s important to remember that Alacritty is in a fairly early stage of development. The developers consider the code to be alpha quality.

Website: github.com/jwilm/alacritty
Support: Wiki
Developer: Joe Wilm, Christian Duerr, and many contributors
License: Apache License 2.0

Source

Linux Today – IPFire Hardened Linux Firewall Distribution Is Now Available on Amazon Cloud

Oct 21, 2018, 14:00

(Other stories by Marius Nestor)

IPFire 2.21 Core Update 124 is now available with Linux kernel, OpenSSH, and Unbound hardening. It ships with Linux kernel 4.14.72 LTS, a release that improves support for network adapters and enables built-in kernel security features to further harden IPFire against various attack vectors, and Unbound 1.8 DNS proxy hardened to reduce the load on DNS servers. This is also the first release of IPFire to add support for booting in EFI (UEFI) mode on x86_64 computers that support the standard. However, the developers noted the fact that to benefit of EFI support, users will have to reinstall IPFire. Due to software running underneath IPFire, which could expose the firewall to more attack vectors, it is recommended to disable EFI in BIOS if possible.

Complete Story

Source

Nano 3.0 Released! Reads Files 70% Faster

A new major release of open source text editor GNU nano is here. GNU nano 3.0 reads files 70% faster and brings several other features.

GNU nano logo

GNU nano is one of the most popular terminal based text editors. Those who keep forgetting how to exit Vim, seek refuge with GNU nano. It’s a godsend for beginners who have to deal with editing in the command line while the experienced nano fans just swear by it.

GNU nano 3.0 has just been released. Let’s see what new features it brings.

New features in GNU nano 3.0

Some of the main new features in GNU nano 3.0 are:

  • Reads files 70% faster
  • Speed of handling ASCII text has been almost doubled
  • New shortcuts: Ctrl+Delete erases the next word and Ctrl+Shift+Delete erases the preceding word
  • Many other keybinding changes
  • Shows the correct number of lines on the status bar when opening multiple files
  • Ignores any presses of before a valid command keystroke
  • Recognizes more escape sequences
  • Avoids a possible hang during a Full-Justify

You can read the release note for GNU nano 3.0 here.

Getting GNU nano 3.0

Nano is the default text editor on Ubuntu. It comes preinstalled with many other distributions. You can find it in the main repository of almost all Linux distributions.

But when it comes to installing nano 3.0, you should wait for your distribution to provide this update. It will take some time before you’ll see this in your system updates. Arch users should be getting it before everyone else, as always.

If you are one of the few who likes installing software from its source code, you can get it from its download page.

Excited about GNU nano 3.0?

Are you one of the nano fans? Are you excited for this new release? Why do you use nano over the likes of Vim? Share your views with us in the comment section below.

About Abhishek Prakash

I am a professional software developer, and founder of It’s FOSS. I am an avid Linux lover and Open Source enthusiast. I use Ubuntu and believe in sharing knowledge. Apart from Linux, I love classic detective mysteries. I’m a huge fan of Agatha Christie’s work.

Source

Restart Nginx on Ubuntu, Centos and Docker

linux restart nginx

How often do you restart ngnix service on Linux webserver? This blog post will cover various ways to restart Nginx on a Linux system via command line and on Nginx running in a docker container. I have covered on both on a Systemd server and SysV init/Upstart system.

Open your terminal and login with root/sudo user to run below shown commands.

Restart Nginx HTTP server

CentOS 7, Ubuntu 18.04 and Ubuntu16.04 are a systemd operating system. To restart nginx service, you’ll need to use systemctl command line tool.

It is recommended to check syntax before restarting nginx service,

$ sudo nginx -t
$ sudo systemctl restart nginx

If you’re restarting after modifying nginx service unit file, you need to reload systemd first

$ sudo systemctl daemon-reload

Then restart nginx

$ sudo systemctl restart nginx

If you want to reload the configuration without restarting the service, i.e maintain current sessions, use

sudo systemctl reload nginx

Restarting Nginx on Upstart/SysV init system

If you’re running a system with upstart or SysV init system. e.g Ubuntu 14.04, CentOS 6, you need to manage nginx service using the servicecommand.

$ sudo service nginx restart

You can also use an absolute path to init script, e.g

sudo /etc/init.d/nginx restart

Restarting Nginx inside docker container

For nginx running inside a Docker container, it is advisable to reload the configuration instead of restarting the service.

docker exec <nginx-container-name-or-id> nginx -s reload

If you must restart the nginx process, then consider restarting the container using the command:

$ docker restart <container name|id>

Example

$ docker restart nginx

Where nginx is the name of nginx container.

Restarting nginx is a simple process but you need to be careful to ensure that any change made has correct syntax to avoid failure during a restart. The command used to check for configuration syntax is nginx -t

Read Also:

Source

The Performance & Power Efficiency Of The Core i7 990X vs. Core i9 9900K

With my initial Core i9 9900K benchmarks out there following Friday’s embargo expiration, for some weekend benchmarking fun I decided to pull out the old Core i7 990X to see how it compares to the new 9900K… The Gulftown and Coffeelake processors were compared not only on raw performance but also overall power consumption and performance-per-Watt.

 

 

The Core i7 990X was the Extreme Edition processor back from 2011 codenamed “Gulftown” (Westmere microarchitecture), the 32nm generation before Sandy Bridge. Granted the announced but not yet released Core i9 9900X X-Series CPU will be more akin for comparison to the 990X, and I will at such time that it is available, but just for some extra benchmark runs over the weekend I was curious to see how the 990X and 9900K compare…

 

 

Here’s a look at how the i7 990X stacks up to today’s i9 9900K in some key areas as well as the yet-to-ship Core i9 990X:

 

 

For this fresh benchmarking, the i7 990X was running with the MSI X58M motherboard and 3 x 4GB DDR3-1066 per the rated specifications. The Core i9 9900K was running with the ASUS PRIME Z390-A motherboard and 2 x 8GB DDR4-3200 memory. Both systems were tested with a Samsung 860 EVO SATA 3.0 solid-state drive and Sapphire Radeon RX 560 graphics card.

 

 

Both systems were running the newly-released Ubuntu 18.10 x86_64 Linux with the 4.18 kernel and its latest Spectre/Meltdown mitigations, GCC 8.2.0 compiler, EXT4 file-system, and other default software components.

 

Via the Phoronix Test Suite a range of benchmarks were run on each system. The AC system power consumption was being polled in real-time by the Phoronix Test Suite with a WattsUp Pro power meter interfacing over USB for being able to generate accurate performance-per-Watt metrics on a per-test basis. Enjoy these results as you wish for just some interesting Intel performance figures from the 990X to the 9900K. See my launch day Core i9 9900K Linux benchmarks for the 15-way AMD/Intel CPU comparison against more modern CPU targets.

Source

MongoDB basics — Create, Show and Drop Collections

MongoDB basics — Create, Show and Drop Collections

MongoDB is a NoSQL database. This means that unlike relational databases there’s no set in stone schema with various row and columns or fields with well-defined data types. Analogue to traditional SQL database tables, MongoDB has collections. Where there were once rows in a SQL table, MongoDB has documents. Data is queried across all collections and documents using key-value pairs, which you will soon see.

The utility of MongoDB is its ease of use, scalability and the JSON like syntax with which the stored data is represented. On the other hand, if you wish to do crazy operations on your datasets like JOINs you may find MongoDB cumbersome and traditional SQL databases are better suited for that.

In any case, this article would not presume any familiarity with databases whatsoever. We will just assume that you have MongoDB installed on your server/desktop (it is available on Windows, Mac and Linux). With that installed we will create our sample database and see MongoDB in action.

Prerequisites

  1. MongoDB installation. You can follow the official documentation to install your current Operating System. OR
  2. Optionally, you can sign up for MongoDB atlas. They offer a free tier with 512MB of persistent storage. Perfect environment for experimentation or small projects.
  3. If you wish to not install any software whatsoever, you can visit Katacoda and use their web-based interface as an ephemeral sandboxed environment.

Getting Started

Assuming you have MongoDB server installed and a shell connected to the server we can start exploring a few features of it. But first a few terminologies — A mongodb server has a list of databases dbs in it. Each database can have multiple collections in it.

So for example, a University can have a personnel database which can then have various collections for different departments like one collection for Mathematics, one for Biology and so on.

Source

how to convert rpm to deb and deb to rpm using alien command on linux ?

You can use alien command to convert *.deb to *.rpm file. Also, if you have a *.rpm file that you want to install on a Debian or Ubuntu, you can convert the *.rpm to *.deb file using alien command as explained in this article.

Install alien command on Debian / Ubuntu

Install alien command on Ubuntu as shown below.

# sudo apt-get install alien

Install alien command on RHEL

#rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

# yum update && yum install alien

1. Convert RPM to DEB

Use alien command to convert rpm to deb file

The following example converts the linuxconf-devel rpm file to linuxconf-devel deb file. Once you generate the deb file, you can install it on Ubuntu or Debian.

ravi@linuxforfreshers.com:~$ sudo alien -d –script -k anydesk-2.9.1-2.x86_64.rpm

anydesk_2.9.1-2_amd64.deb generated

Note: You’ll also notice that alien has counted up the version number. If you want to keep the original version number, you must use the -k switch:

Use alien to convert deb to rpm file

Use alient -r option to convert a deb file to rpm file. The following example converts libsox deb file to libsox rpm file. Once you generate the rpm file, you can install it on Red Hat, or CentOS.

ravi@linuxforfreshers.com:~/Downloads$ sudo alien -r anydesk_2.9.1-1_amd64.deb

Warning: Skipping conversion of scripts in package anydesk: postinst postrm

Warning: Use the –scripts parameter to include the scripts.

anydesk-2.9.1-2.x86_64.rpm generated

In above example i am not used -k so it will update the version automatically.

ravi@linuxforfreshers.com:~$sudo alien -r –scripts -k anydesk_2.9.1-3_amd64.deb

anydesk-2.9.1-3.x86_64.rpm generated

Where -r, –to-rpm Generate a Red Hat rpm package

–scripts Include scripts in package.

-d, –to-deb Generate a Debian deb package (default).

-k, –keep-version Do not change version of generated package.

If u want more help check man alien.

 

Source

FFMpeg Install On CentOS 7

FFmpeg is a video editing software that can be used to convert audio and video streams in linux. Compiling ffmpeg from source can be quite complex, so there are a couple alternatives, either installing from yum or a static build already created. If you are looking for a more recent release than you should follow the static built as opposed to installing from a repository. More information can be found about ffmpeg on their site

Installing FFmpeg from a repository

First install the epel-release

yum -y install epel-release

Install the nux repository

rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Install ffmpeg and ffmpeg -devel packages

yum install ffmpeg ffmpeg-devel -y

Make sure it works:

# ffmpeg -version
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: –prefix=/usr –bindir=/usr/bin –datadir=/usr/share/ffmpeg –incdir=/usr/include/ffmpeg –libdir=/usr/lib64 –mandir=/usr/share/man –arch=x86_64 –optflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ –enable-bzlib –disable-crystalhd –enable-gnutls –enable-ladspa –enable-libass –enable-libcdio –enable-libdc1394 –enable-libfaac –enable-nonfree –enable-libfdk-aac –enable-nonfree –disable-indev=jack –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-openal –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvorbis –enable-libv4l2 –enable-libx264 –enable-libx265 –enable-libxvid –enable-x11grab –enable-avfilter –enable-avresample –enable-postproc –enable-pthreads –disable-static –enable-shared –enable-gpl –disable-debug –disable-stripping –shlibdir=/usr/lib64 –enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

That is it for installing with a repository.

Installing a static prebuilt version of FFmpeg

Get the installer script:

wget https://raw.githubusercontent.com/q3aql/ffmpeg-install/master/ffmpeg-install

Make it executable

chmod a+x ffmpeg-install

Install a release version

./ffmpeg-install –install release

Make sure it works:

# ffmpeg -version
ffmpeg version 3.3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-11) 20170519
configuration: –enable-gpl –enable-version3 –enable-static –disable-debug –disable-ffplay –disable-indev=sndio –disable-outdev=sndio –cc=gcc-5 –enable-fontconfig –enable-frei0r –enable-gnutls –enable-gray –enable-libass –enable-libfreetype –enable-libfribidi –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libopenjpeg –enable-libopus –enable-librtmp –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvidstab –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libwebp –enable-libx264 –enable-libx265 –enable-libxvid –enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Thats it for installing a static build.

Jun 21, 2017LinuxAdmin.io

Source

Shutter Removed From Ubuntu 18.10 And Debian Unstable, New PPA Available

Shutter screenshot tool

Shutter screenshot tool was removed from Debian Unstable and Ubuntu 18.10 (to be released tomorrow) recently.
The popular screenshot tool, which uses Gtk2 and Perl, was one of the very few packages that blocked Debian (and Ubuntu) from removing the obsolete libgnome2-perl and libgnome2-vfs-perl from the repository archive. Since Shutter doesn’t work without these packages, it was removed from the Debian Unstable and Ubuntu 18.10 repositories.

This comes after some of its optional dependencies were removed from Ubuntu 18.04 and Debian Buster 6 months ago, which caused the application editing / annotation features to stop working unless the users manually installed these packages from an older Ubuntu or Debian version.

While Shutter is still under development, getting a new developer back in 2017, it doesn’t seem there’s been any progress to porting it to use non-deprecated Perl modules and/or Gtk3. Until this happens, Shutter won’t make it back into Debian and Ubuntu. If you can help with this, check out the project page on Launchpad.

Another way you could help is by creating Snap and/or Flatpak packages for Shutter. Since such packages include the libraries required to run an application, this would be ideal for Shutter, which uses old libraries. There are currently no Snap or Flatpak packages for Shutter.

There are some alternatives out there to Shutter, like Ksnip and Flamshot which you may want to check out.

How to continue using Shutter in Ubuntu, Linux Mint or Debian

So what can you do if you still want to use Shutter? Since I use Shutter daily, I created a PPA for it and its dependencies, so others who prefer it to other screenshot tools can continue to use it. I would have built a Snap or Flatpak but I don’t have the time right now to look into how to create such packages.

The PPA includes the latest version of Shutter (newer than the one available in Ubuntu 18.04), its required dependencies for Ubuntu 18.10, and its optional dependencies.

You can use this PPA not only in Ubuntu 18.10, but also in Ubuntu 18.04 / Linux Mint 19 or 19.x, not only because there’s a newer Shutter version in the PPA with some bug fixes, but because it provides the missing optional Shutter dependencies. These dependencies add support for editing / annotating images in Shutter, as well a AppIndicator support, which allows the Shutter tray icon to be visible in Ubuntu 18.04 without having to enable the tray, thanks to the built-in AppIndicator support.

You can add the PPA and install Shutter in Ubuntu 18.04 or 18.10 / Linux Mint 19 / 19.x by using these commands:

sudo add-apt-repository ppa:linuxuprising/shutter
sudo apt-get update
sudo apt install shutterUpdate: I also added the gnome-web-photo package to the PPA. This package allows Shutter to take full website screenshots, and it’s missing from Ubuntu 18.04 and newer / Linux Mint 19 and newer. You can install it after adding the PPA using:

sudo apt install gnome-web-photo
After it’s installed restart Shutter and click on the website screenshot button (or select Web from the indicator / tray icon), then enter the URL of the website and Shutter will take a screenshot in a couple of seconds.

In Debian Unstable you’ll need to download Shutter from an older version, along with its optional libgoo-canvas-perl and libgoocanvas3 (and libgoocanvas-common) dependencies.

Source

Looks like the downhill freeriding game ‘Descenders’ is going to get multiplayer and more tricks

Descenders, the rather good extreme downhill freeriding game from RageSquid looks to be getting some fun updates soon.

Firstly, the developers teased out this new image:

That seems to have quite a different style to the current maps available, considering the game has traditionally been about downhill freeriding while doing tricks. This design looks much more flat, with it resembling a skatepark with the ramp design. It’s going to be interesting to see what becomes of this, although they’re not giving out too many details they only said “Might even be an upcoming map for Descenders with new tricks incoming? Who knows?”.

Additionally, they recently held a “Descenders community day” where they had community members join them, to test some recent features. The biggest surprise was seeing multiplayer, which would make it seriously fun! You can see some snippets in the below video:

It also shows a few new tricks being done as well, which was one of my major requests so it’s great to see them do it.

It’s already a really fun game, but with new tricks coming, new maps and multiplayer at some point it’s going to be pretty amazing.

If you’re interested, you can pick it up from Humble Store and Steam.

Source

WP2Social Auto Publish Powered By : XYZScripts.com