Minggu, 11 Oktober 2020

Linux Jargon Buster: What is Display Manager in Linux?

In this chapter of the Linux Jargon Buster, you’ll learn about display manager in Linux. Is it part of the desktop environment? What does it do?

What is display manager in Linux?

In simple words, a display manager is a program that provides graphical login capabilities for your Linux distribution. It controls the user sessions and manages user authentication. Display manager starts the display server and loads the desktop environment right after you enter your username and password.

The display manager is often synonymous to the login screen. It is the visible part of it after all. However, the visible login screen, also called greeter, is only a part of the display manager.

login screen opensuse
Login screen is the visible part of a display manager

Like various desktop environments and display servers, there are various display managers available as well. Let’s have a look at them.

Different display managers

Some people think of the display manager as part of the desktop environment but that’s not true. It is a separate program.

A desktop environment may recommend a certain display manager but it doesn’t mean that it won’t work with some other display manager. If you ever installed more than one desktop environment in the same system, you would remember that a login screen (i.e. the display manager) allows you to switch the desktop environment.

Deepin Session Ubuntu
A display manager can be used with various desktop environments

Though display manager is not part of the desktop environment itself, it is often developed by the same development team as the desktop environment. It also becomes identity of the desktop environment.

For example, the GNOME desktop environment develops GDM (GNOME Display Manager) and just by looking at the login screen, you would think of GNOME desktop environment.

Login Screen 1
GNOME Login Screen with GDM

Some popular display managers are:

  • GDM (GNOME Display Manager): preferred by GNOME
  • SDDM (Simple Desktop Display Manager): preferred by KDE
  • LightDM: Developed by Ubuntu for Unity desktop

Display managers can be customized

There are so many desktop environments available. Do they all have their own display managers? No. That’s not the case.

As I mentioned previously, the visible login screen is called greeter. This greeter can be customized to change the looks of the login screen.

In fact, many distributions and/or desktop environments have written their own greeter to give users a login screen that resembles their brand.

For example, Mint’s Cinnamon desktop uses LightDM but has its own greeter to give it more Minty (or should I say Cinnamon) looks.

Linux Mint Login Screen
Linux Mint login screen based on LightDM

Take a look at Kali Linux’s login screen:

Kali Linux Login Screen
Kali Linux Login Screen

If you are into coding and tweaking, you may modify or code your own greeter as per your liking.

Changing display manager

You may change the display manager if you want. You need to install the display manager first. You’ll see the option to switch the display manager while installing.

Switch between gdm and lightdm

If you didn’t do it at that time, then you can change the display manager by manually configuring it later. The method to reconfigure the display manager is slightly different for different distributions and not in the scope of this article.

Conclusion

I hope you have a slight better understanding of the term display manager in Linux. The aim of this jargon buster series is to explain common Linux colloquial and technical terms in non-technical language without going into too much detail.

I welcome your comments and suggestion.



from It's FOSS https://ift.tt/3jOOkxR
via IFTTT

Kamis, 08 Oktober 2020

6 Essential Things To Do After Installing Manjaro Linux

So, you just did a fresh installation of Manjaro Linux. Now what?

Here are a few essential post installation steps I recommend you to follow.

Quite honestly, these are the things I prefer to do after installing Manjaro. Yours could differ depending on your need.

Recommended Things To Do After Installing Manjaro Linux

Things To Do After Installing Manjaro

I am using Manjaro Xfce edition but the steps are applicable to other desktop variants of Manjaro as well.

1. Set the fastest mirror

Before even updating your system, I suggest to sort out your mirror list first. When refreshing the Manjaro system and downloading software from repositories, an optimized mirror list can have noticeable performance impact to the system.

Open the Terminal emulator and type the following command:

sudo pacman-mirrors --fasttrack
Manjaro set fastest mirror

2. Update your system

Keeping your system up-to-date reduces the chances of security vulnerabilities. Refreshing your system repository is also a recommended thing to do before installing new software.

You can update your Manjaro system by running the following command.

sudo pacman -Syu
Update Manjaro Linux using command line

3. Enable AUR, Snap or Flatpak support

Arch User Repository (AUR) is one of the main reasons that a user chooses an Arch-based system. It gives you access to a huge number of additional software.

Optionally, you can also enable support for Snaps and Flatpaks directly from Pamac GUI package manager.

Enable Snap, Flatpak and AUR in Manjaro

4. Enable TRIM (SSD only)

If your root partition has been installed on SSD, enabling TRIM is one thing you need to do after installing Manjaro. TRIM helps to clean blocks in your SSD and extend the lifespan of your SSD.

To enable TRIM on Manjaro, run the following command in a terminal:

sudo systemctl enable fstrim.timer
Trim SSD in Manjaro

5. Installing a kernel of your choice (advanced users)

One of the topics that I covered in my Manjaro Linux review, is how easily you can switch kernels through a graphical interface.

Do you prefer to use the command line? You can list the installed kernel(s) on your system and install a kernel using your terminal.

To list the installed kernels:

mhwd-kernel -li

To install a new kernel (the latest to date 5.8 kernel for example):

sudo mhwd-kernel -i linux58
Install new Linux kernel in Manjaro

6. Install Microsoft true type fonts (if you need it)

I have to often edit the work documents on my personal computer and hence I need the Microsoft fonts like Times New Roman or Arial.

If you also need to use Microsoft fonts, you can access the package from AUR. If you want to use the command line for AUR packages, you can install an AUR helper.

Ttf Ms Fonts

Conclusion

Manjaro is a great distribution if you want to use the benefits of Arch Linux on a pre-configured, desktop optimized distribution. Though it comes pre-configured with many essentials, there are a few steps that cannot be done in advance, as everyone has a different setup and different needs.

Please let us know in the comments below, which step apart from the already mentioned is the essential for you.



from It's FOSS https://ift.tt/33FBk81
via IFTTT

How to Install Deepin Desktop on Ubuntu 20.04 LTS

This tutorial shows you the proper steps to install the Deepin desktop environment on Ubuntu. Removal steps are also mentioned.

Deepin is undoubtedly a beautiful Linux distribution. The recently released Deepin version 20 makes it even more beautiful.

Now, Deepin Linux is based on Debian and the default repository mirrors are too slow. If you would rather stay with Ubuntu, you have the Deepin variant of Ubuntu in the form UbuntuDDE Linux distribution. It is not one of the official Ubuntu flavors yet.

Reinstalling a new distribution is a bit of annoyances for you would lose the data and you’ll have to reinstall your applications on the newly installed UbuntuDDE.

A simpler option is to install Deepin desktop environment on your existing Ubuntu system. After all you can easily install more than one desktop environment in one system.

Fret not, it is easy to do it and you can also revert the changes if you do not like it. Let me show you how to do that.

Installing Deepin Desktop on Ubuntu 20.04

Ubuntu 20 With Deepin

The UbuntuDDE team has created a PPA for their distribution and you can use the same PPA to install Deepin desktop on Ubuntu 20.04. Keep in mind that this PPA is only available for Ubuntu 20.04. Please read about using PPA in Ubuntu.

No Deepin version 20

The Deepin desktop you’ll be installing using the PPA here is NOT the new Deepin desktop version 20 yet. It will probably be there after Ubuntu 20.10 release but we cannot promise anything.

Here are the steps that you need to follow:

Step 1: You need to first add the official PPA by Ubuntu DDE Remix team by typing this on the terminal:

sudo add-apt-repository ppa:ubuntudde-dev/stable

Step 2: Once you have added the repository, proceed with installing the Deepin desktop.

sudo apt install ubuntudde-dde
Deepin Desktop Install

Now, the installation will start and after a while, you will be asked to choose the display manager.

Deepin Display Manager

You need to select “lightdm” if you want Deepin desktop themed lock screen. If not, you can set it as “gdm3“.

In case you don’t see this option, you can get it by typing the following command and then select your preferred display manager:

sudo dpkg-reconfigure lightdm

Step 3: Once done, you have to log out and log in again by choosing the “Deepin” session or just reboot the system.

Deepin Session Ubuntu

And, that is it. Enjoy the Deepin experience on your Ubuntu 20.04 LTS system in no time!

Ubuntu 20 With Deepin 1

Removing Deepin desktop from Ubuntu 20.04

In case, you don’t like the experience or of it is buggy for some reason, you can remove it by following the steps below.

Step 1: If you’ve set “lightdm” as your display manager, you need to set the display manager as “gdm3” before uninstalling Deepin. To do that, type in the following command:

sudo dpkg-reconfigure lightdm
Deepin Display Manager
Select gdm3 on this screen

And, select gdm3 to proceed.

Once you’re done with that, you can simply enter the following command to remove Deepin completely:

sudo apt remove startdde ubuntudde-dde

You can just reboot to get back to your original Ubuntu desktop. In case the icons become unresponsive, you just open the terminal (CTRL + ALT + T) and type in:

reboot

Wrapping Up

It is good to have different choices of desktop environments. If you really like Deepin desktop interface, this could be a way to experience Deepin on Ubuntu.

If you have questions or if you face any issues, please let me know in the comments.



from It's FOSS https://ift.tt/2I09FGq
via IFTTT

Selasa, 06 Oktober 2020

How to Clear Apt Cache and Reclaim Precious Disk Space

How do you clear the apt cache? You simply use this apt-get command option:

sudo apt-get clean

But there is more to cleaning apt cache than just running the above command.

In this tutorial, I’ll explain what is apt cache, why is it used, why you would want to clean it and what other things you should know about purging apt cache.

I am going to use Ubuntu here for reference but since this is about apt, it is applicable to Debian and other Debian and Ubuntu-based distributions like Linux Mint, Deepin and more.

What is apt cache? Why is it used?

When you install a package using apt-get or apt command (or DEB packages in the software center), the apt package manager downloads the package and its dependencies in .deb format and keeps it in /var/cache/apt/archives folder.

Apt Get Clean Cache

While downloading, apt keeps the deb package in /var/cache/apt/archives/partial directory. When the deb package is downloaded completely, it is moved out to /var/cache/apt/archives directory.

Once the deb files for the package and its dependencies are downloaded, your system installs the package from these deb files.

Now you see the use of cache? The system needs a place to keep the package files somewhere before installing them. If you are aware of the Linux directory structure, you would understand that /var/cache is the appropriate here.

Why keep the cache after installing the package?

The downloaded deb files are not removed from the directory immediately after the installation is completed. If you remove a package and reinstall it, your system will look for the package in the cache and get it from here instead of downloading it again (as long as the package version in the cache is the same as the version in remote repository).

This is much quicker. You can try this on your own and see how long a program takes to install the first time, remove it and install it again. You can use the time command to find out how long does it take to complete a command: time sudo apt install package_name.

I couldn’t find anything concrete on the cache retention policy so I cannot say how long does Ubuntu keep the downloaded packages in the cache.

Should you clean apt cache?

It depends on you. If you are running out of disk space on root, you could clean apt cache and reclaim the disk space. It is one of the several ways to free up disk space on Ubuntu.

Check how much space the cache takes with the du command:

Apt Cache Archive Size

Sometime this could go in 100s of MB and this space could be crucial if you are running a server.

How to clean apt cache?

If you want to clear the apt cache, there is a dedicated command to do that. So don’t go about manually deleting the cache directory. Simply use this command:

sudo apt-get clean

This will remove the content of the /var/cache/apt/archives directory (except the lock file). Here’s a dry run (simulation) of what the apt-get clean command deletes:

Apt Get Clean Ubuntu

There is another command that deals with cleaning the apt cache:

sudo apt-get autoclean

Unlike clean, autoclean only removes the packages that are not possible to download from the repositories.

Suppose you installed package xyz. Its deb files remain in the cache. If there is now a new version of xyz package available in the repository, this existing xyz package in the cache is now outdated and useless. The autoclean option will delete such useless packages that cannot be downloaded anymore.

Is it safe to delete apt cache?

Clear Apt Cache

Yes. It is completely safe to clear the cache created by apt. It won’t negatively impact the performance of the system. Maybe if you reinstall the package it will take a bit longer to download but that’s about it.

Again, use the apt-get clean command. It is quicker and easier than manually deleting cache directory.

You may also use graphical tools like Stacer or Bleachbit for this purpose.

Conclusion

At the time of writing this article, there is no built-in option with the newer apt command. However, keeping backward compatibility, apt clean can still be run (which should be running apt-get clean underneath it). Please refer to this article to know the difference between apt and apt-get.

I hope you find this explanation about apt cache interesting. It is not something essential but knowing this little things make you more knowledgeable about your Linux system.

I welcome your feedback and suggestions in the comment section.



from It's FOSS https://ift.tt/2F5CwZ1
via IFTTT

Minggu, 04 Oktober 2020

KeenWrite: An Open Source Text Editor for Data Scientists and Mathematicians

Brief: An interesting text editor that supports R markdown. With codes in R, you can add string interpolation, graphs and other mathematical expressions to your text document.

KeenWrite: A Useful Open Source Markdown Editor With R Code Support

Keenwrite Equations
Image Credit: KeenWrite

There are several open-source Markdown editors available for Linux but KeenWrite is a bit interesting with the string interpolation and R markdown support.

Not just limited to that, it also supports real-time preview and a bunch of other features particularly helpful for academics in mathematics, statistics and other related fields.

Features of KeenWrite

Keenwrite

To give you an overview, let me go through the features it offers. You can also watch the official video below to get a better idea:

  • Real-time preview with variable substitution
  • R Markdown support
  • Uses String interpolation
  • Mathematical expression support
  • Auto-complete variable names
  • Write mathematical formulas using a subset of TeX
  • Spellcheck feature
  • Inline Code support
  • Code block
  • Essential formatting options that include superscript, subscript
  • Gives you the ability to add pictures, quotes, links
  • Export options include Markdown, HTML/SVG, and HTML/Tex
  • Available on Windows and Linux

This video by its developer describes the features in detail:

Installing KeenWrite on Linux

Unfortunately, there’s no .deb or Flatpak package to get it installed on Linux distributions. But, there is a binary file available that you can download and run to get started.

You need to head to its GitHub page, download the .bin file and the follow the instructions mentioned there or type in the following commands (assuming Downloads is the directory where the file gets stored):

cd Downloads
chmod +x keenwrite.bin
./keenwrite.bin

My Thoughts on KeenWrite

Keenwrite Preferences

Even though I miss a dark mode on KeenWrite, the feature set seems useful enough. You get to tweak the font size, image file format support, definitions, and the configuration for using R Markdown.

In either case, we have a lot of Markdown editors available for Linux. So, if this does not suit your needs, feel free to explore our list of best Markdown editors as well.

What do you think about KeenWrite? Isn’t this an interesting text editor? Let me know your thoughts in the comments below.



from It's FOSS https://ift.tt/3ldPT8W
via IFTTT

Linux Jargon Buster: What is a Package Manager in Linux? How Does it Work?

One of the main points how Linux distributions differ from each other is the package management. In this part of the Linux jargon buster series, you’ll learn about packaging and package managers in Linux. You’ll learn what are packages, what are package managers and how do they work and what kind of package managers available.

What is a package manager in Linux?

In simpler words, a package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command line tool like apt-get or pacman.

You’ll often find me using the term ‘package’ in tutorials and articles on It’s FOSS. To understand package manager, you must understand what a package is.

What is a package?

A package is usually referred to an application but it could be a GUI application, command line tool or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file and sometimes information about the dependencies.

In older days, software used to installed from its source code. You would refer to a file (usually named readme) and see what software components it needs, location of binaries. A configure script or makefile is often included. You will have to compile the software or on your own along with handling all the dependencies (some software require installation of other software) on your own.

To get rid of this complexity, Linux distributions created their own packaging format to provide the end users ready-to-use binary files (precompiled software) for installing software along with some metadata (version number, description) and dependencies.

It is like baking a cake versus buying a cake.

Source Code Compilation Vs Packaging in Linux

Around mid 90s, Debian created .deb or DEB packaging format and Red Hat Linux created .rpm or RPM (short for Red Hat Package Manager) packaging system. Compiling source code still exists but it is optional now.

To interact with or use the packaging systems, you need a package manager.

How does the package manager work?

Please keep in mind that package manager is a generic concept and it’s not exclusive to Linux. You’ll often find package manager for different software or programming languages. There is PIP package manager just for Python packages. Even Atom editor has its own package manager.

Since the focus in this article is on Linux, I’ll take things from Linux’s perspective. However, most of the explanation here could be applied to package manager in general as well.

I have created this diagram (based on SUSE Wiki) so that you can easily understand how a package manager works.

Linux Package Manager Explanation

Almost all Linux distributions have software repositories which is basically collection of software packages. Yes, there could be more than one repository. The repositories contain software packages of different kind.

Repositories also have metadata files that contain information about the packages such as the name of the package, version number, description of package and the repository name etc. This is what you see if you use the apt show command in Ubuntu/Debian.

Your system’s package manager first interacts with the metadata. The package manager creates a local cache of metadata on your system. When you run the update option of the package manager (for example apt update), it updates this local cache of metadata by referring to metadata from the repository.

When you run the installation command of your package manager (for example apt install package_name), the package manager refers to this cache. If it finds the package information in the cache, it uses the internet connection to connect to the appropriate repository and downloads the package first before installing on your system.

A package may have dependencies. Meaning that it may require other packages to be installed. The package manager often takes care of the dependencies and installs it automatically along with the package you are installing.

Package Manager Handling Dependencies In Linux
Package Manager Handling Dependencies In Linux

Similarly, when you remove a package using the package manager, it either automatically removes or informs you that your system has unused packages that can be cleaned.

Apart from the obvious tasks of installing, removing, you can use the package manager to configure the packages and manage them as per your need. For example, you can prevent the upgrade of a package version from the regular system updates. There are many more things your package manager might be capable of.

Different kinds of package managers

Package Managers differ based on packaging system but same packaging system may have more than one package manager.

For example, RPM has Yum and DNF package managers. For DEB, you have apt-get, aptitude command line based package managers.

See Packages By Repositories Synaptic
Synaptic package manager

Package managers are not necessarily command line based. You have graphical package managing tools like Synaptic. Your distribution’s software center is also a package manager even if it runs apt-get or DNF underneath.

Conclusion

I don’t want to go in further detail on this topic because I can go on and on. But it will deviate from the objective of the topic which is to give you a basic understanding of package manager in Linux.

I have omitted the new universal packaging formats like Snap and Flatpak for now.

I do hope that you have a bit better understanding of the package management system in Linux. If you are still confused or if you have some questions on this topic, please use the comment system. I’ll try to answer your questions and if required, update this article with new points.



from It's FOSS https://ift.tt/34rxluS
via IFTTT

Kamis, 01 Oktober 2020

How to Free Up Space in /boot Partition on Ubuntu Linux?

The other day, I got a warning that boot partition is almost full or has no space left. Yes, I have a separate boot partition, not many people do that these days, I believe.

This was the first time I saw such an error and it left me confused. Now, there are several ways to free up space on Ubuntu (or Ubuntu-based distros) but not all of them are useful in this case.

This is why I decided to write about the steps I followed to free some space in the /boot partition.

Free up space in /boot partition on Ubuntu (if your boot partition is running out of space)

Free Boot Space Ubuntu Linux

I’d advise you to carefully read through the solutions and follow the one best suited for your situation. It’s easy but you need to be cautious about performing some of these on your production systems.

Method 1: Using apt autoremove

You don’t have to be a terminal expert to do this, it’s just one command and you will be removing unused kernels to free up space in the /boot partition.

All you have to do is, type in:

sudo apt autoremove

This will not just remove unused kernels but also get rid of the dependencies that you don’t need or isn’t needed by any of the tools installed.

Once you enter the command, it will list the things that will be removed and you just have to confirm the action. If you’re curious, you can go through it carefully and see what it actually removes.

Here’s how it will look like:

Apt Autoremove Screenshot

You have to press Y to proceed.

It’s worth noting that this method will only work if you’ve a tiny bit of space left and you get the warning. But, if your /boot partition is full, APT may not even work.

In the next method, I’ll highlight two different ways by which you can remove old kernels to free up space using a GUI and also the terminal.

Method 2: Remove Unused Kernel Manually (if apt autoremove didn’t work)

Before you try to remove any older kernels to free up space, you need to identify the current active kernel and make sure that you don’t delete that.

To check your kernel version, type in the following command in the terminal:

uname -r

The uname command is generally used to get Linux system information. Here, this command displays the current Linux kernel being used. It should look like this:

Uname R Screenshot

Now, that you know what your current Linux Kernel is, you just have to remove the ones that do not match this version. You should note it down somewhere so that you ensure you do not remove it accidentally.

Next, to remove it, you can either utilize the terminal or the GUI.

Warning!

Be extra careful while deleting kernels. Identify and delete old kernels only, not the current one you are using otherwise you’ll have a broken system.

Using a GUI tool to remove old Linux kernels

You can use the Synaptic Package Manager or a tool like Stacer to get started. Personally, when I encountered a full /boot partition with apt broken, I used Stacer to get rid of older kernels. So, let me show you how that looks.

First, you need to launch “Stacer” and then navigate your way to the package uninstaller as shown in the screenshot below.

Stacer Remove Kernel

Here, search for “image” and you will find the images for the Linux Kernels you have. You just have to delete the old kernel versions and not your current kernel image.

I’ve pointed out my current kernel and old kernels in my case in the screenshot above, so you have to be careful with your kernel version on your system.

You don’t have to delete anything else, just the ones that are the older kernel versions.

Similarly, just search for “headers” in the list of packages and delete the old ones as shown below.

Stacer Remove Kernel Header

Just to warn you, you don’t want to remove “linux-headers-generic”. Only focus on the ones that have version numbers with them.

And, that’s it, you’ll be done and apt will be working again and you have successfully freed up some space from your /boot partition. Similarly, you can do this using any other package manager you’re comfortable with.

Using the command-line to remove old kernels

It’s the same thing but just using the terminal. So, if you don’t have the option to use a GUI (if it’s a remote machine/server) or if you’re just comfortable with the terminal, you can follow the steps below.

First, list all your kernels installed using the command below:

ls -l /boot

It should look something like this:

Command Kernel List

The ones that are mentioned as “old” or the ones that do not match your current kernel version are the unused kernels that you can delete.

Now, you can use the rm command to remove the specific kernels from the boot partition using the command below (a single command for each):

sudo rm /boot/vmlinuz-5.4.0-7634-generic

Make sure to check the version for your system — it may be different for your system.

If you have a lot of unused kernels, this will take time. So, you can also get rid of multiple kernels using the following command:

sudo rm /boot/*-5.4.0-{7634}-*

To clarify, you need to write the last part/code of the Kernel versions separated by commas to delete them all at once.

Suppose, I have two old kernels 5.4.0-7634-generic and 5.4.0-7624, the command will be:

sudo rm /boot/*-5.4.0-{7634,7624}-*

If you don’t want to see the old kernel version in the grub boot menu, you can simply update grub using the following command:

sudo update-grub

That’s it. You’re done. You’ve freed up space and also potentially fixed the broken APT if it was an issue after your /boot partition filled up.

In some cases, you may need to enter these commands to fix the broken apt (as I’ve noticed in the forums):

sudo dpkg --configure -a
sudo apt install -f

Do note that you don’t need to enter the above commands unless you find APT broken. Personally, I didn’t need these commands but I found them handy for some on the forums.



from It's FOSS https://ift.tt/2Sm07Y9
via IFTTT