Language Selection

English French German Italian Portuguese Spanish

It's FOSS

Syndicate content It's FOSS
A Linux and Open Source Web Portal
Updated: 1 hour 39 min ago

How to Install Ubuntu Desktop on Raspberry Pi 4

8 hours 19 min ago

Brief: This thorough tutorial shows you how to install Ubuntu Desktop on Raspberry Pi 4 device.

The revolutionary Raspberry Pi is the most popular single board computer. It has its very own Debian based operating system called Raspbian.

There are several other operating systems available for Raspberry Pi but almost all of them are lightweight. This was appropriate for the small factor and low end hardware of the Pi devices.

This changes with the introduction of Raspberry Pi 4B that flaunts 8 GB RAM and supports 4K display. The aim is to use Raspberry Pi as a regular desktop and it succeeds in doing so to a larger extent.

Before the 4B model, you could install the Ubuntu server on Raspberry Pi but the desktop version was not available. However, Ubuntu now provides official desktop image for Pi 4 models.

In this tutorial, I am going to show the steps for installing Ubuntu desktop on Raspberry Pi 4.

First, a quick look at the prerequisites.

Prerequisites for running Ubuntu on Raspberry Pi 4

Here’s what you need:

  1. A Linux or Windows system with active internet connection.
  2. Raspberry Pi Imager : The official open source tool from Raspberry that gets you the distro image on your SD card.
  3. Micro SD Card: Consider using at least a 16 GB storage for your card, albeit a 32 GB version is recommended.
  4. A USB based Micro SD Card Reader (if your computer does not have a card reader).
  5. Essential Raspberry Pi 4 accessories such as an HDMI compatible display, Micro HDMI to Standard HDMI (A/M) Cable, Power Supply (Official Adapter Recommended), USB Wired/Wireless Keyboard and Mouse/Touchpad.

It is good practice to read in detail about the Pi requirements beforehand.

Now, without further delay, let me quickly walk you through the image preparation for the SD Card.

Preparing the Ubuntu Desktop image for Raspberry Pi

Raspberry Pi provides a GUI application for writing the ISO image to the SD Card. This tool can also download compatible operating systems like Ubuntu, Raspbian etc automatically.

Official tool to download and put operating system on SD card

You can download this tool for Ubuntu, Windows and macOS from the official website:

Download Raspberry Pi Imager

On Ubuntu and other Linux distributions, you can also install it with Snap:

sudo snap install rpi-imager

Once installed, run the imager tool. When you see the screen below, select “CHOOSE OS”:

Pi imager: choose the preferred operating system

Under “Operating System”, select “Other general purpose OS”:

Pi imager: other general purpose operating systems

Now, select “Ubuntu”:

Pi imager distro: Ubuntu

Next, select “Ubuntu Desktop 21.04 (RPI 4/400)” as shown below:

Pi imager distro version: Ubuntu 21.04

Note

If you do not have a good, consistent internet collection, you can download the Ubuntu for Raspberry Pi image separately from Ubuntu’s website. In the Imager tool, while choosing the OS, go to the bottom and select “Use custom” option. You can also use Etcher for writing the image to the SD card.

Insert the micro SD card inside your Card reader and wait for it to mount. Select “CHOOSE STORAGE” under “Storage”:

Pi imager – choose storage (SD card)

You should be seeing only your micro SD card storage and you’d recognize it instantly based on the size. Here, I’ve used a 32 GB card:

Pi imager – choose SD card

Now click on “WRITE”:

Pi imager image write

I’ll assume you have the contents of the SD card backed up. If it’s a new card, you can just proceed:

Pi imager image write confirmation query

Since this is a sudo privilege, you must enter your password. If you run sudo rpi-imager from a terminal, this would not appear:

Pi imager image write authentication asking for password

If your SD card is a bit old, it would take some time. But if it is a recent one with high speeds, it wouldn’t take long:

Pi imager writing image

I also wouldn’t recommend skipping verification. Make sure the image write went successful:

Pi imager verifying changes

Once it is over, you will get the following confirmation:

Pi imager write successful

Now, safely-remove the SD card from your system.

Using the micro SD card with Ubuntu on Raspberry Pi

Half of the battle is won. Unlike the regular Ubuntu install, you have not created a live environment. Ubuntu is already installed on the SD card and is almost read to use. Let’s see what remains here.

Step 1: Insert the SD card into Pi

For first time users, it can take a bit confusing sometimes to figure out where on earth is that card slot! Not to worry. It is located below the board on the left-hand side. Here’s an inverted view with a card inserted:

Pi 4B board inverted and micro SD card inserted

Keep sliding the card in this orientation slowly into the slot below the board, gently until it no longer goes any further. You may also hear a little clicking sound for confirmation. This means it has just fit in perfectly:

Raspberry Pi SD slot left side middle and below the pi board

You might notice two little pins adjusting themselves in the slot (shown above) as you put it inside, but that’s ok. Once inserted, the card would look like a bit protruded. That’s how it is supposed to look like:

Pi SD card inserted with a little portion visible Step 2: Setting Up the Raspberry Pi

I do not need to go in detail here, I presume.

Ensure that the power cable connector, micro HDMI cable connector, keyboard and mouse connectors (wired/non-wired) are securely connected to the Pi board in the relevant ports.

Make sure the display and power plug are properly connected as well, before you go ahead and turn on the power socket. I wouldn’t recommend plugging in the adapter to a live electrical socket. Look up electrical arcing.

Once you’ve ensured the above two steps, you can power on the Raspberry Pi device.

Step 3: The first run of Ubuntu desktop on Raspberry Pi

Once you power on the Raspberry Pi, you’ll be asked to some basic configuration on your first run. You just have to follow the onscreen instructions.

Select your language, keyboard layout, connect to WiFi etc.

You’ll be asked to select the time zone:

Select time zone

And then create the user and password:

Enter desired username and password

It will configure a couple of things and may take some time in doing so.

It may take some time after this, your system will reboot and you’ll find yourself at the Ubuntu login screen:

You can start enjoying Ubuntu desktop on Raspberry Pi now.

Ubuntu desktop on Raspberry Pi Conclusion

I noticed a temporary anomaly: A red flickering border on the left-hand side of my display while doing the installation. This flickering (also of different colors) was noticeable on random parts of the screen as well. But it went away after restarting and the first boot.

It was much needed that Ubuntu to start providing support for popular ARM devices like Raspberry Pi and I am happy to see it running on a Raspberry Pi.

I hope you find this tutorial helpful. If you have questions or suggestions, please let me know in the comments.

Screen Recording in Linux With OBS and Wayland

Tuesday 14th of September 2021 03:21:31 AM

There are tons of screen recorders available for Linux. But when it comes to supporting Wayland, almost all of them do not work.

This is problematic because many new distribution releases are switching to Wayland display manager by default once again. And if something as basic as a screen recorder does not work, it leaves a bad experience.

GNOME’s built-in screen recorder works but it is hidden, has no GUI and no way to configure and control the recordings. There is another tool called Kooha but it keeps on displaying a timer on the screen.

Switching between Xorg and Wayland just for screen recording is not very convenient.

Amidst all this, I was happy to learn that Wayland support landed in OBS Studio with version 27 release thanks to Pipewire. But even there, it’s not straightforward and hence I am going to show you the steps for screen recording on Wayland using OBS Studio.

Using OBS to screen record on Wayland

Let’s see how it is done.

Step 1: Install OBS Studio

You should install OBS Studio version 27 first. It is already included in Ubuntu 21.10 which I am using in this tutorial.

sudo apt install obs-studio

To install OBS Studio 27 on Ubuntu 18.04, 20.04, Linux Mint 20 etc, use the official OBS Studio PPA.

Open a terminal and use the following commands one by one:

sudo add-apt-repository ppa:obsproject/obs-studio sudo apt update sudo apt install obs-studio

If there is an older version of OBS Studio installed already, it will be upgraded to the newer version.

For Fedora, Arch and other distributions, please check your package manager or unofficial repositories for installing the latest version of OBS Studio.

Step 2: Check if Wayland capture is working

Please make sure that you are using Wayland. Now start OBS Studio and go through all the stuff it shows on the first run. I am not going to show that.

The main step is to add Pipewire as a screen capture source. Click on the + symbol under the Sources list.

Add screen capture source in OBS Studio

Do you see anything that reads Screen Capture (PipeWire)?

Do you see PipeWire option in the screen sources?

If the answer is no, quit OBS Studio. This is normal. OBS Studio does not switch to use Wayland automatically in Ubuntu at least. There is a fix for that.

Open a terminal and use the following command:

export QT_QPA_PLATFORM=wayland

In the same terminal, run the following command to start OBS Studio:

obs

It will show some message on the terminal. Ignore them. Your focus should be on the OBS Studio GUI. Try to add screen capture once again. You should see the PipeWire option now.

You explicitly asked OBS Studio to use Wayland this time with the QT_QPA_PLATFORM variable.

Select PipeWire as the source and then it asks you to choose a display screen. Select it and click on the Share button.

Now it should show your screen recursively infinite number of times. If you see that, you could start recording the screen in Wayland now.

Step 3: Make changes permanent

That was good. You just verified that you can record your screen on Wayland. But setting the environment variable and starting OBS from the terminal each time is not convenient.

What you can do is to export the variable to your ~/.bash_profile (for you) or /etc/profile (for all users on the system).

export QT_QPA_PLATFORM=wayland

Log out and log back in. Now OBS will automatically start using this parameter and you can use it to record your screen in Wayland.

Note: I noticed that MEGA cloud service stopped working after this change. If you notice some applications stopped working after this change, revert it please.

I hope you find this quick tip helpful. If you still have questions or suggestions, please let me know in the comment section.

Revolt: An Open-Source Alternative to Discord

Monday 13th of September 2021 01:10:08 PM

Brief: Revolt is a promising free and open-source choice to replace Discord. Here, we take a look at what it offers along with its initial impressions.

Discord is a feature-rich collaboration platform primarily tailored for gamers. Even though you can use Discord on Linux with no issues, it is still a proprietary solution.

You can choose to use Element as an open-source solution collaboration platform, but it is not a replacement.

But, Revolt is an impressive Discord alternative that is open-source.

Note

Revolt is in the public beta testing phase and does not offer any mobile applications. It may lack some essential features that you find on Discord.

Let me highlight what you can expect with Revolt and if it can be a replacement for Discord on Linux.

An Open Source Discord Alternative That You Can Self-Host

Revolt is not just a simple open-source replacement, but you also get the ability to self-host.

It does lack a variety of features that Discord offers, but you get a lot of basic functionalities to get a head start to start experimenting.

Even without some features, you could mention it as a feature-rich open-source client. Let us look at the features available right now.

Features of Revolt

While it looks and feels a lot like Discord already, here are some of the key highlights:

  • Ability to create your own server
  • Create text channels and voice channels
  • Assign user roles in a server
  • Tweak the theme (dark/light)
  • Change the accent color
  • Manage the font and emoji packs from available options
  • Custom CSS support
  • Ability to add bots
  • Easy to manage permissions for text/voice channels
  • Send friend requests to other users
  • Saved notes section
  • Ability to control notifications
  • Hardware acceleration support
  • Dedicated desktop settings
  • Self-hosting using Docker
  • User status and custom status support

So, as something in the public beta testing phase, it sounds excellent for starters. You already get most of the core functionalities, but you may want to wait to see it as a full-fledged Discord replacement.

Initial Impressions of Using Revolt

If you have used Discord, the user experience will feel familiar. And that is a good thing here.

For this quick app highlight, I did not compare the resource usage of Discord and Revolt because it is still in beta and won’t be an apples-to-apples comparison.

However, in my brief testing, it felt snappy, except the case when you load up a text channel for the first time. When publishing this, it did not have the Two-Factor Authentication (2FA) feature but was supposed to be added in their first milestone (Version 1) release.

Some features like user status, permission management, and appearance tweaks looked useful. But, when it comes to the voice channels, it is not the same way as Discord works, at least for now.

I have no idea if they plan to do it the same way, but Discord’s voice channel feature is intuitive, fast, and with better controls.

Not to forget, Discord also offers “Discord Stage,” which is a Clubhouse-like audio room feature.

Some other features that I couldn’t find included:

  • Ability to react to messages
  • Noise suppression feature
  • Change server
  • Server logs
  • Variety of useful bots

Of course, it will take a significant amount of time to catch up with the features offered by Discord, but at least we now have an open-source solution to Discord.

You can explore their project roadmap/release tracker to see what you can expect in its final/future releases.

Install Revolt in Linux

Revolt is available for Linux and Windows. You can choose to use it on your web browser without needing a separate application.

But, if you need to have it on your desktop, they offer an AppImage file and a deb package that you can grab from its GitHub releases section.

If you’re new to Linux, refer to our resources on using an AppImage file and installing deb packages to get started.

Feel free to head to its Feedback section if you want to help them improve with your bug reports and suggestions. Also, you can explore their GitHub page for more information.

Revolt

What do you think about Revolt? Do you believe that it has the potential to become a good open-source replacement to Discord on Linux?

Let me know your thoughts in the comments down below!

How to Set JAVA_HOME Variable in Ubuntu Linux Correctly

Friday 10th of September 2021 07:30:48 AM

If you are running Java programs on Ubuntu using Eclipse, Maven or Netbeans etc, you’ll need to set JAVA_HOME to your path. Otherwise, your system will complain that “java_home environment variable is not set”.

In this beginner’s tutorial, I’ll show the steps to correctly set Java Home variable on Ubuntu. The steps should be valid for most other Linux distributions as well.

The process consists of these steps:

  • Making sure Java Development Kit (JDK) is installed.
  • Finding the correct location of JDK executable.
  • Setting the JAVA_HOME variable and making the change permanent.
Step 1: Check if JDK is installed

The simplest way to check if Java Development Kit (JDK) is installed on your Linux system is by running this command:

javac --version

The above command checks the version of Java compiler. If it is installed, it will show the Java version.

Java Compiler is installed

If the command shows an error like javac command not found, you’ll have to install JDK.

Java Compiler is not installed

If Java Compiler is not installed on your system, install Java Development Kit using this command:

sudo apt install default-jdk

This will install the default Java version in your current Ubuntu version. If you need some other specific Java version, you’ll have to specify it while installing Java on Ubuntu.

Once you have made sure that Java Compiler is present on your system, it’s time to find its location.

Step 2: Get the location of JDK executable (Java Compiler)

The executable is usually located in the /usr/lib/jvm directory. I won’t left you on your own for a guessing game. Instead, let’s find out the path of the Java executable.

Use the which command to get the location of Java Compiler executable:

which javac

The problem here is that the location it gives is actually a symbolic link. You’ll have to follow it a couple of times:

And when you find a path like /usr/lib/jvm/java-11-openjdk-amd64/bin/javac, you remove the /bin/javac from it to get something like /usr/lib/jvm/java-11-openjdk-amd64

An easier method is to follow the symbolic link and get to the actual executable file directly using this command:

readlink -f `which javac` | sed "s:/bin/javac::"

The readlink command follows a symbolic link. I have used ` around which java. This is called command substitution and it replaces the command with its output. Sed is then used to replace /bin/javac by nothing and thus removing it altogether.

In my example, the location of the executable file is /usr/lib/jvm/java-11-openjdk-amd64. It could be different for you. Copy the correct path you got from the above command in your system. You know, you can copy paste in the Ubuntu terminal.

Step 3: Setting JAVA_HOME variable

Now that you have got the location, use it to set the JAVA_HOME environment variable:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin/java

Check the value of JAVA_HOME directory:

echo $JAVA_HOME set java home ubuntu linux

Try to run your program or project in the SAME TERMINAL and see if it works.

This is not over yet. The JAVA_HOME variable you just declared is temporary. If you close the terminal or start a new session, it will be empty again.

To set JAVA_HOME variable ‘permanently’, you should add it to the bashrc file in your home directory.

You can use the Nano editor for editing files in the Linux terminal. If you do not want that and take a simple copy-paste approach, use the following commands:

Back up your bashrc file (in case you mess it, you can get it back):

cp ~/.bashrc ~/.bashrc.bak

Next, use the echo command to append the export command you used at the beginning of this section. Change the command below to use the correct path as displayed by your system in.

echo "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" >> ~/.bashrc

Verify that it has been correctly added to the end of the file:

tail -3 ~/.bashrc

The above tail command will show the last 3 lines of the specified file.

Here’s the entire output of the above three commands.

Now, even if you exit the session or restart the system, the JAVA_HOME variable will still be set to the value you specified. That’s what you want, right?

Do note that if you change the default Java version in the future, you’ll have to change the value of JAVA_HOME and point it to the correct executable path.

I hope this tutorial not only helped you to set Java Home, it also taught you how you are doing it.

If you are still facing issues or have any questions or suggestions, please let me know in the comments.

How to Use the dd Command to Create a Live USB Drive in Linux Terminal [For Experts and Adventurers]

Tuesday 7th of September 2021 05:35:56 AM

There are several graphical tools available for creating live USB. Etcher on Linux is probably the most popular. Ubuntu has its own Startup Disk Creator tool for this purpose.

However, advanced Linux users swear by the comfort and swiftness of creating live USBs in Linux terminal using the dd command.

The dd command is a CLI tool that gives you powerful features for copying and converting files.

A common use case that people use dd for is to write ISO files to an external storage device such as a USB drive, which can be used to do things like install a new Linux distribution onto a computer or laptop.

That’s what I am going to show in this tutorial. I’ll go over the commands you will need to run, finding our USB drive from the terminal, and then finally doing the actual flashing of the ISO file.

Creating live USB from ISO with dd command

Before I show you the steps, let me quickly go over the command which you’ll be using and explain what it does.

Here’s the example command for flashing of the ISO:

dd if="./filename.iso" of="/dev/sdb" status="progress" conv="fsync"

Let’s go over what exactly that dd command is doing.

Understanding the above dd command Explanation of the dd command for live USB creation

First, you enter dd. As expected, this is just the name of the program you are going to run.

Next, you specify if="./filename.iso". if stands for input file, which tells dd what file you are going to be writing to the external storage drive.

After that, you enter of="/dev/sdb". As was with if, of simply stands for output file.

The thing to remember is that the output file doesn’t technically have to be a file on your system. You can also specify things like the path to an external device (as shown in the example), which just looks like a normal file on your system, but actually points to a device connected to your machine.

status can be set to three options: none, noxfer and progress.

The progress option that you set will cause dd to show periodic statistics on how much of the ISO has been transferred to the storage drive, as well as an estimation on how much longer it will be until dd is finished.

If you were to have set the none option instead, dd would only print error messages during the writing of the ISO, thus removing things like the progress bar.

The noxfer option hides some information that’s printed after a transfer is complete, such as how long it took from start to finish.

Lastly, you set the conv option to fsync. This causes dd to not report a successful write until the entire ISO has been written to the USB drive.

If you omit this option, dd will still write just fine (and might actually appear to run quicker), but you might find your system taking quite a while before it tells you it’s safe to remove the USB drive as it will finish writing the ISO’s content in the background, thus allowing you to do other things in the meantime.

Now that you understand what you have to do, let’s see how to do it.

Warning

The command line is a double-edged sword. Be extra careful when you are running a command like dd. You must make sure that you are using the correct device for the output file destination. One wrong step and you may format your main system disk and lose your operating system.

Step 0: Download the desired ISO

This goes without saying that you need to have an ISO image file in order to flash it on a USB.

I am going to use Ubuntu 20.04 ISO (downloadable here) to test the dd command I showed earlier.

Step 1: Get the USB disk label

Plug in your USB disk.

The specific path I entered for of was /dev/sdb. The USB disks are usually labelled /dev/sdb but that’s not a hard and fast rule.

This path may differ on your system, but you can confirm the path of the drive with the lsblk command. Just look for a listing that looks like the size of your USB drive, and that’ll be it.

If you are more comfortable with GUI programs, you can also find the drive’s path with tools like GNOME Disks.

Now that you have established the path to our external drive, let’s create the live USB.

Step 2: Writing the ISO file to the USB disk

Open up a terminal at the directory where the ISO file is downloaded, and run the following (remember to replace /dev/sdb with the name of your storage device if it’s something different):

sudo dd if="./ubuntu-20.04.2.0-desktop-amd64.iso" of="/dev/sdb" status="progress" conv="fsync"

After that, just let dd do it’s thing, and it’ll print a completion message once it’s done:

And just like that, you’ve flashed an ISO with dd command in the Linux terminal!

Wrapping Up

Now you’re on your way to doing even more things through the terminal, allowing you to do things faster and quicker than you might have been able to do before.

Got any remaining questions about the dd command, or something just not working right? Feel free to leave any of it in the comment section below.

How to Run Java Programs in Ubuntu

Tuesday 7th of September 2021 02:27:29 AM

So, you have started learning Java programming? That’s good.

And you want to run the java programs on your Linux system? Even better.

Let me show how to run Java in terminal in Ubuntu and other Linux distributions.

Running Java programs in Ubuntu

Let’s go in proper steps here.

Step 1: Install Java compiler

To run a Java program, you need to compile the program first. You need Java compiler for this purpose.

The Java compiler is part of JDK (Java Development Kit). You need to install JDK in order to compile and run Java programs.

First, check if you already have Java Compiler installed on your system:

javac --version

If you see an error like “Command ‘javac’ not found, but can be installed with”, this means you need to install Java Development Kit.

Check if Java compiler is already installed or not

The simplest way to install JDK on Ubuntu is to go with the default offering from Ubuntu:

sudo apt install default-jdk

You’ll be asked to enter your account’s password. When you type the password, nothing is seen on the screen. That is normal. Just enter your password blindly. When asked, press the enter key or Y key.

Installing JDK that also contains the Java compiler

The above command should work for other Debian and Ubuntu based distributions like Linux Mint, elementary OS etc. For other distributions, use your distribution’s package manager. The package name could also be different.

Once installed, verify that javac is available now.

Verify that Java compiler can be used now Step 2: Compile Java program in Linux

You need to have a Java program file for this reason. Let’s say you create a new Java program file named HelloWorld.java and it has the following content:

class HelloWorld{ public static void main(String args[]){ System.out.println("Hello World"); } }

You can use Nano editor in terminal or Gedit graphical text editor for writing your Java programs.

javac HelloWorld.java

If there is no error, the above command produces no output.

When you compile the Java program, it generates a .class file with the class name you used in your program. You have to run this class file.

Step 3: Run the Java class file

You do not need to specify the class extension here. Just the name of the class. And this time, you use the command java, not javac.

java HelloWorld

This will print Hello World on the screen for my program.

Running java programs in the Linux terminal

And that’s how you run a Java program in the Linux terminal.

This was the simplest of the example. The sample program had just one class. The Java compiler creates a class file for each class in your program. Things get complicated for bigger programs and projects.

This is why I advise installing Eclipse on Ubuntu for proper Java programming. It is easier to program in an IDE.

I hope you find this tutorial helpful. Questions or suggestions? The comment section is all yours.

Run Web Applications in Linux Using Tangram Browser

Monday 6th of September 2021 01:31:37 PM

Brief: Tangram is a browser that aims to help you run and manage web applications in Linux. Let’s take a look at how it works.

Even if we have native Linux applications available for several tools, many end up using web applications.

Maybe in the form of an electron app or directly through a web browser, native experiences are becoming an old-school thing.

Of course, running web applications, no matter the platform, needs more system resources. And, considering every service is going for a web-based approach instead of a native experience, we need solutions to manage the web apps efficiently.

An open-source Linux app, Tangram, could be the solution.

Tangram: A Browser Tailored to Run Web Applications

You can choose to use some of the best Linux web browsers to run web applications. But, if you want something that entirely focuses on web application experience, Tangram is an exciting option.

The developer took inspiration from GNOME Web, Franz, and Rambox.

You do not get any fancy features but just the ability to change the user agent and manage the web applications you have logged in to.

It can be used to access multiple social media platforms, chat messengers, work collaboration applications, and more.

Features of Tangram

Considering it is a minimal browser based on WebKitGTK, not much you can do here. To list some of the essentials, here’s what you can do:

  • Re-order tabs in the sidebar
  • Easily add any web service as a web app
  • Ability to tweak the user agent (Desktop/mobile)
  • Keyboard shortcuts
  • Change position of the sidebar (tab bar)

All you need to do is load up a web service, log in, and click on “Done” to add it as a web application.

Installing Tangram in Linux

Tangram is available as a Flatpak for every Linux distribution, and you can also find it in AUR.

If you want to install it via the terminal, type in the following command:

flatpak install flathub re.sonny.Tangram

You may refer to our Flatpak guide if you do not have it enabled on your system.

To explore more about it, you can check out its GitHub page.

Tangram Browser

Have you tried this yet? Do you prefer web applications or native applications? Feel free to share your thoughts in the comments below.

Getting the Top Indicator Panel Back in GNOME

Sunday 5th of September 2021 10:48:13 AM

GNOME is the popular desktop environment that thrives to give Linux a modern desktop experience.

While it works for the most part, some of their decisions has left the user fuming and questioning.

You cannot have icons and files on the desktop, new document option has been removed from the right click context menu. In addition to that, GNOME has also removed the applet indicator functionality.

You know what indicator applets are, don’t you? Those little icons that let you access additional features of the given application. I have plenty of them in my Ubuntu system.

Indicator applets

And this creates a problem, specially for applications that rely completely on these applet indicators to function. Take Dropbox for example. The only way to access Dropbox settings is through the app-indicator and you won’t find it in GNOME.

That’s a problem, but thankfully, there is a workaround for that.

Enabling applet indicator in GNOME via extension

If you are using GNOME, you probably already know what GNOME Extension is. These are basically small add-ons developed by enthusiastic, independent developers.

If not done already, enable GNOME extensions. It’s actually quite simple. Go to any GNOME extension’s page using Firefox or Chrome and it will suggest downloading a browser extension. Install it and you are good to go.

Enabling GNOME Extension browser add-on

Now, there are several GNOME extensions available that allow adding applet indicators in the top panel. At the time of writing this tutorial, AppIndicator and KStatusNotifierItem Support extension is well developed and supported for the recent GNOME versions.

Go to its webpage:

AppIndicator Extension

On the page, you should see a toggle button. Click it to install it.

There will be a pop-up. Hit install when you see it.

Install the extension

The results won’t be seen immediately. You’ll have to restart GNOME. On Xorg, you could just use Alt+F2 and enter r but that does not work in Wayland.

Log out of the system and log back in. Applet indicator should be activated now. If you have any applications installed that provides an indicator applet, you should see it on the top panel.

In my case, I had Dropbox already installed and hence it started showing the icon in the top panel.

Dropbox indicator working in GNOME

I hope this little tip help you gain access to the app indicators in the top panel of GNOME again.

I do not know why the GNOME developers though that dropping this essential feature was a good idea. Anyway, if one door closes, another opens (usually). Enjoy GNOME to your liking.

Neither Windows, nor Linux! Shrine is ‘God’s Operating System’

Saturday 4th of September 2021 03:58:02 AM

We’ve all used multiple operating systems in our lives. Some were good and some were bad. But can you say that you’ve ever used an operating system designed by God? Today, I’d like to introduce you to Shrine.

What is Shrine? Shrine interface

From that introduction, you’re probably wondering what the heck is going on. Well, it all started with a guy named Terry Davis. Before we go any further, I’d better warn you that Terry suffered from schizophrenia during his life and often didn’t take his medication. Because of this, he said or did things during his life that were not quite socially acceptable.

Anyway, back to the story line. In the early 2000s, Terry released a simple operating system. Over the years, it went through several names, including J Operating System, LoseThos, and SparrowOS. He finally settled on the name TempleOS. He chose that name because this operating system would be God’s temple. As such. God gave Terry the following specifications for the operating system:

  • It would have 640×480 16 color graphics
  • It would use “a single-voice 8-bit signed MIDI-like sample for sound”.
  • It would follow the Commodore 64, i.e. “a non-networked, simple machine where programming was the goal, not just a means to an end”.
  • It would only support one file system (named “Red Sea”).
  • It would be limited to 100,000 lines of code to make it “easy to learn the whole thing”.
  • “Ring-0-only. Everything runs in kernel mode, including user applications”
  • The font would be limited to “one 8×8 fixed-width font”.
  • The use would have “full access to everything. All memory, I/O ports, instructions, and similar things must never be off limits. All functions, variables and class members will be accessible.”
  • It would only support one platform, 64-bit PCs.

Terry wrote this operating system using in a programming language that he called HolyC. TechRepublic called it a “modified version of C++ (“more than C, less than C++”)”. If you are interested in getting a flavor of HolyC, I would recommend, this article and the HolyC entry on RosettaCode.

In 2013, Terry announced on his website that TempleOS was complete. Tragically, Terry died a few years later in August of 2018 when he was hit by a train. He was homeless at the time. Over the years, many people followed Terry through his work on the operating system. Most were impressed at his ability to write an operating system in such a small package.

Now, you are probably wondering what all this talk of TempleOS has to do with Shrine. Well, as the GitHub page for Shrine states, it is “A TempleOS distro for heretics”. GitHub user minexew created Shrine to add features to TempleOS that Terry had neglected. These features include:

  • 99% compatibility with TempleOS programs
  • Ships with Lambda Shell, which feels a bit like a classic Unix command interpreter
  • TCP/IP stack & internet access out of the box
  • Includes a package downloader

minexew is planning to add more features in the future, but hasn’t announced what exactly will be included. He has plans to make a full TempleOS environment for Linux.

Experience

It’s fairly easy to get Shrine virtualized. All you need to do is install your virtualizing software of choice. (Mine is VirtualBox.) When you create a virtual machine for Shrine, make sure that it is 64-bit and has at least 512 MB of RAM.

Once you boot into Shrine, you will be asked if you want to install to your (virtual) hard drive. Once that is finished (or not, if you choose), you will be offered a tour of the operating system. From there you can explore.

Final Thoughts

Temple OS and (Shrine) is obviously not intended to be a replacement for Windows or Linux. Even though Terry referred to it as “God’s temple”, I’m sure in his more lucid moments, he would have acknowledged that it was more of a hobby operating system. With that in mind, the finished product is fairly impressive. Over a twelve-year period, Terry created an operating system in a little over 100,000 lines of code, using a language that he had created himself. He also wrote his own compiler, graphics library and several games. All this while fighting his own personal demons.

How to Install Dropbox on Ubuntu Linux

Friday 3rd of September 2021 11:44:40 AM

Dropbox is one of the most popular cloud storage services available for Linux and other operating systems.

In fact, Dropbox is one of the earliest services to provide a native Linux application. It still supports 32-bit Linux systems that is also a commendable job.

In this beginner’s tutorial, I’ll show the steps for installing Dropbox on Ubuntu. The steps are really simple but some websites make it unnecessarily complicated.

Install Dropbox on Ubuntu desktop

Let’s see the installation procedure, step by step.

Step 1: Get Dropbox installer for Ubuntu

Dropbox offers DEB files for its installer. Go to the download section of its website:

Dropbox Download

And download the appropriate DEB file. Considering that you are using 64 bit Ubuntu, get the deb file for 64-bit version.

Download the Dropbox installer Step 2: Install Dropbox installer

The deb file you downloaded is just an installer for Dropbox. Actual Dropbox installation starts later, similar to installing Steam on Ubuntu.

To install the downloaded deb file, either double click on it or right click and select open with Software Install.

Installing the downloaded Dropbox deb file

It will open the software center and you can click the install button.

Installing Dropbox deb file

Wait for the installation to finish.

Step 3: Start Dropbox installation

Dropbox installer is now installed. Press the Windows key (also known as super key) and search for Dropbox and click on it.

Start Dropbox for installation

On the first launch, it shows two popups. One about restarting Nautilus (the file explorer in Ubuntu) and the other about Dropbox installation.

Starting Dropbox installation

Clicking either Restart Nautilus/Close (on the Nautilus popup) or OK (on the installation popup) starts the actual Dropbox client download and installation. If the ‘Nautilus Restart’ does not close on clicking Close button, click the x button.

Wait for the Dropbox installation to finish.

Installing Dropbox

Oh! Nautilus restart is required because Dropbox adds some extra features like showing the synchronization status in the file explorer.

Once Dropbox is installed, it should either take you to the Dropbox login page automatically or you can hit the Dropbox icon at the top and select sign in option.

Sign in to Dropbox after installation

In fact, this is how you would be accessing Dropbox settings in the future.

Step 4: Start using Dropbox on Ubuntu Sign in into Dropbox

Note: Dropbox won’t work until you successfully sign in. Here’s a catch. The free version of Dropbox limits the number of devices you can link to your account. If you already have 3 linked devices, you should remove some of the older ones that you do not use.

Once you are successfully signed in, you should see a Dropbox folder created in your home directory and your files from the cloud starts appearing here.

Dropbox folder is created under home directory

If you want to save disk space or bandwidth, you can go to the Preferences and choose the Selective Sync option. The selective sync option allows you only sync selected folders from Dropbox cloud on your local system.

Using selective sync in Dropbox

Dropbox automatically starts at each boot. This is the behavior you should expect from any cloud service, I believe.

That’s all you need to get started with Dropbox on Ubuntu. I hope you find this tutorial helpful.

Best Web Browsers for Ubuntu and Other Linux Distributions

Wednesday 1st of September 2021 04:04:59 AM

There is no such thing as the perfect web browser. It all depends on what you prefer and what you use it for.

But, what are your best options when it comes to web browsers for Linux?

In this article, I try to highlight the best web browsers that you can pick for Ubuntu and other Linux.

Note: We have tried and tested these browsers on Ubuntu. But, you should be able to install it on any Linux distribution of your choice.

Top Web Browsers for Linux Illustration for web browser running in Ubuntu Linux

Every browser offers something unique. And, when it comes to the Linux platform, there are some interesting exclusive choices as well.

Before you see this list, please note that it is not a ranking list. The browser listed at number 1 should not be considered better than the ones at 2, 3 or 10.

Non-FOSS alert!

Some applications mentioned here are not open source. They are listed here because they are available on Linux and the article’s focus is on Linux. We have a separate dedicated list of open source web browsers as well.

1. Vivaldi

Pros

  • Sidebar for quick web application access
  • Calendar and Email integration
  • Unique tab management
  • Pomodoro (clock timer) feature
  • Mobile app available

Cons

  • Resource-heavy when using a variety of features
  • Not 100% open-source

Vivaldi is an impressive browser that has been getting more attention from Linux users more than ever.

While it is not 100% open-source, you can find most of its source code (except for its UI) online.

With Vivaldi 4.0 release, they have been focusing more on improving the experience for Linux users. You can set clock timers to increase your work productivity, use the built-in translation for web pages, track your calendar, add shortcuts to web applications, and multi-task at its peak with this browser.

Even though it is a fast web browser, I wouldn’t bet on it as the “fastest” or lightest. You need a good amount of memory (RAM) to make use of all the features while you work on stuff.

Overall, it is a feature-rich web browser. So, if you need something with as many as features possible to multi-task, Vivaldi can be your choice.

Vivaldi How to Install Vivaldi on Linux?

Vivaldi offers both .deb and .rpm packages to let you directly install it in your Linux system.

You can refer to our resources to install Deb files and install RPM files in case you are new to Linux.

2. Mozilla Firefox

Pros

  • Privacy protection
  • Not based on Chrome engine
  • Open Source
  • Firefox Account services

Cons

  • User Experience changes with major updates

Firefox is the default web browser for most Linux distributions. Hence, it is an obvious choice to start with.

In addition to being open-source, it offers some of the best privacy protection features. And, with the right settings, you can turn it into one of the most secure browsers similar to Tor Browser (which is also based on Firefox).

Not just limited to its security, but Firefox also offers useful integrated features like Pocket (to save web pages and read later), VPN, email alias, breach monitor, and more when you sign in with your Firefox account.

Firefox How to Install Firefox on Linux?

It should already come pre-installed in your Linux distribution. But, if it is not present, you can search for it in the software center or install it using the terminal with the following command:

sudo apt install firefox 3. Chromium

Pros

  • Open Source Chrome alternative
  • Similar features to Google Chrome

Cons

  • Lacks certain features that Google Chrome offers

Chromium is the open-source alternative and the base for Google Chrome and many other chrome-based browsers.

If you do not want to use Google Chrome, chromium’s your best bet to get the same experience on Linux.

Even though Google controls Chromium and has been locking down Chrome, it is a good option for Linux systems.

Chromium How to Install Chromium on Linux?

You should be able to find it easily in the software center. But, if you need help, refer to our installation guide for Chromium.

4. Google Chrome

Pros

  • Seamless integration with Google services

Cons

  • Not open-source

Google Chrome is an excellent web browser unless you do not want to opt for a proprietary solution or products by Google.

You get all the essential features and the ability to integrate all Google services. If you prefer using Google Chrome on Android and want to sync across multiple platforms, it is an obvious choice for desktop Linux.

If you were looking for a simple and capable web browser while using Google services, Google Chrome can be a great pick.

Google Chrome How to Install Google Chrome on Linux?

Google Chrome offers both Deb and RPM packages to let you install on any Ubuntu-based or Fedora/openSUSE distribution.

If you need help with the installation, I should point you to our guide on installing Google Chrome on Linux.

5. Brave Browser

Pros

  • Privacy protection features
  • Performance

Cons

  • No account-based (cloud) sync

Brave browser is one of the most popular Linux browsers.

It is an open-source project and is based on chromium. It offers several useful privacy protection features and is known for its blazing-fast performance.

Unlike any other browser, you can get rewards even if you block advertisements on websites. The rewards you collect can only be used to give back to your favorite websites. This way, you get to block ads and also support the website.

You can expect a faster user experience with minimum resource usage.  

It offers sync capabilities, but you need to have one of the connected devices, considering it lacks a cloud-based sync feature.

We also have a detailed comparison article on Brave vs Firefox, if you need to decide between the two.

Brave How to Install Brave on Linux?

Unlike some other web browsers, you cannot directly find a package or in the software center. You need to enter some commands in the terminal to install the browser.

Fret not, you can follow our instructions to install brave browser to proceed.

6. Opera

Pros

  • Free VPN in-built
  • Extra features

Cons

  • Not open source

While Opera is not the most popular choice, it is definitely a useful browser for Linux users.

It comes with a built-in VPN and adblocker. So, you should have the basic privacy protection sorted with the help of the Opera web browser.

You can quickly access popular chat messengers right from the sidebar without needing to launch a separate app or window. This is similar to Vivaldi considering the side chat messenger web apps but the user experience is significantly different.

Overall, it is a good pick if you want a free VPN as an added bonus to other essential browsing features.

It is worth noting that Opera offers a unique Opera GX browser that lets you tweak/enforce limits on system resources when using a browser along with gaming activities. This was still in development for Linux at the time of writing, if it is available by the time you read it, that could be a fantastic option!

Opera How to Install Opera?

Opera provides Deb package for Linux. You just head to its official website to download and install it.

7. Microsoft Edge

Pros

  • Convenient option for Windows users who also use Linux

Cons

  • Not open-source
  • Still in Beta

Microsoft Edge has surpassed Mozilla Firefox in terms of its popularity. Not just because it’s the default Windows browser, but it also offers a promising web experience while based on Chrome.

At the time of writing this article, Microsoft Edge is available as a beta release for Linux. It works fine at the moment but lacks quite a few features normally available for Windows.

Overall, you should find most of the essential features available.

If you use Windows and Linux as your desktop platforms, Microsoft Edge can come in handy as the preferred web browser.

Microsoft Edge How to install Microsoft Edge on Linux?

It is currently available through the Microsoft Insiders channel as a beta. So, this could change once the stable release is out.

For now, you can get the Deb/RPM file through the Microsoft Edge insiders web page and install it.

You can also have a look at our how-to article on installing Microsoft Edge on Linux.

Unique Web Browsers for Linux

Most of the users prefer to stick with the mainstream options because of security updates and future upgrades, but there are some different options as well. And, some exclusive to Linux users.

8. GNOME Web or Epiphany

Pros

  • Minimal
  • Open Source

Cons

  • Lacks many features
  • No cross-platform support

Epiphany browser is the default GNOME browser. elementary OS utilizes it as its default web browser.

It is a minimal browser that offers a clean and elegant user experience. You cannot sync your bookmarks or history, so you need to manually export them if you want to back them up or transfer to another browser.

GNOME Web How to Install GNOME Web?

You may find it pre-installed in some Linux distros. If not, you can check out its Flatpak package to install the latest version on any Linux distro.

9. Falkon

Pros

  • Uses lightweight QtWebEngine rendering engine

Cons

  • Lacks many features

Falkon is a QtWebEngine based browser with privacy in mind. It should be good enough for basic web browsing, but it may not be a solution for your daily driver.

It is available for Windows and Linux.

You can explore more about it and get the installation instructions in our dedicated article on Falkon browser.

Falkon 10. Nyxt

Pros

  • Highly customizable
  • Keyboard use focused

Cons

  • Suitable for certain users
  • Lack of cross-platform support

Nyxt is an interesting web browser built for power keyboard users. You can browse and navigate the web using keyboard shortcuts.

To know more about it and the installation instructions, go through our detailed article on Nyxt browser.

Nyxt Wrapping Up

When it comes to Linux, you get a variety of choices available to pick. I have deliberately skipped command line based web browsers like Lynx here.

So, what would be your selection for the best web browser?

Moreover, I’d be curious to know what do you look for when installing a web browser for your system?

Feel free to share your thoughts in the comments below.

Ubuntu Server vs Desktop: What’s the Difference?

Tuesday 31st of August 2021 12:21:30 PM

When you click on the download button on the Ubuntu website, it gives you a few options. Two of them are Ubuntu Desktop and Ubuntu Server.

This could confuse new users. Why are there two (actually 4 of them)? Which one should be downloaded? Ubuntu desktop or server? Are they the same? What is the difference?

Ubuntu website gives you multiple options

I am going to explain the difference between the desktop and server editions of Ubuntu. I’ll also explain which variant you should be using.

Ubuntu desktop vs Ubuntu server Ubuntu desktop and server illustartion

To understand the difference between Ubuntu desktop and server, you should understand the difference between a desktop and a server operating system.

Desktop

A desktop is referred to a personal computer. A desktop operating system comes with a graphical user interface so that the users can use their mouse and keyboard. The primary purpose of a desktop is to give you a system that can be used for web browsing, document editing, viewing/editing pictures and videos, coding and gaming. Basically, a general purpose computer for individuals, end users, or family members.

I am using the term desktop here, but this does not mean that it cannot be used on a laptop. Desktop is the generic term for a personal computer.

Server

On the other hand, a server operating system is specifically created for hosting web services like websites, apps, media servers, databases etc.

Usually, a server operating system does not come with a graphical interface. If it is Linux based operating system, you’ll have to use the system entirely via commands in terminal.

The advantage here is that the server OS do not need a lot of RAM and computational power because they do not use graphical desktop environment. Apart from that, the server operating system has packages configured differently as well.

Now that you understand the difference between server and desktop a little, let’s see the difference between Ubuntu server and desktop.

The user interface

The most visible difference between Ubuntu server and desktop is the user interface.

Ubuntu desktop features a graphical user interface with GNOME desktop environment. This makes it easier to use with the help of mouse clicks.

User interface of Ubuntu GNOME edition

Ubuntu server edition runs headless. You will only see a terminal interface when you are logged in to it. You’ll often manage it remotely from other computers overs SSH.

Connecting to remote Ubuntu server via SSH Installation

Installing Ubuntu as a desktop is easy thanks to the graphical installer. You can create a live USB and experience the desktop version without installing. If you like it, you can install it in minutes following the on-screen instructions.

Installing Ubuntu desktop via graphical installer

Installing Ubuntu as a server is not as easy as the desktop edition. You are stuck with terminal interface. Even the simplest tasks like connecting to Wi-Fi could be a difficult task if you are not familiar with the procedure.

Ubuntu server installation Applications

The default set of applications in Ubuntu desktop is focused on regular computer users. So, you’ll find web browsers, office suite, media players, games etc.

Applications in Ubuntu

Ubuntu server has applications that are more tailored for running web services. And that’s not it. Some applications are also configured differently. Take SSH for example. Ubuntu server has SSH preconfigured so that you can easily connect to it from remote systems. You have to explicitly enable SSH on Ubuntu desktop.

Hardware requirement

Since the desktop edition features a graphical user interface, you need at least 4 GB of RAM to run Ubuntu desktop. Disk space should be 20 GB at least.

This is where it gets interesting for Ubuntu server. It does not have a graphical interface. The command line interface does not consume a lot of system resources. As a result, you can easily run Ubuntu server on a machine with 512 MB and 5 GB of disk space.

The RAM and disk space on the server is subjected to the web service you run. If a web application requires at least 2 GB of RAM, you should have that much of RAM. But in the simplest of scenario, even 512 MB or 1 GB of RAM could work.

Usage

This is the main differentiator between Ubuntu desktop and server. Ask yourself, for what purpose you want to use Ubuntu?

If it is specifically for deploying web services, go for Ubuntu server. Keep in mind that you need to have basic Linux command line knowledge to navigate through the terminal.

If you want to use Ubuntu as a regular computer like Windows, go with Ubuntu desktop. If you want to use it for learning Linux commands, Docker or even simple (but local) LAMP server installation for learning, stay with Ubuntu desktop.

For a server, Ubuntu server is better than Ubuntu desktop. For regular computing usage, Ubuntu desktop is the better choice.

Should you use Ubuntu desktop for server or install GUI on server?

Here’s the thing. Both Ubuntu desktop and server are Linux. You can use Ubuntu desktop as server for hosting web services. That works.

Similarly, you can install GUI on Ubuntu server and use it graphically. That also works.

GUI login on an Ubuntu server

But just because it works, doesn’t mean you should do it. It defies the entire purpose of creating different editions for server and desktop.

You have to put extra effort in converting a server to desktop and vice versa. Why take that pain?

If your purpose of using Ubuntu is clear, download and install the appropriate Ubuntu edition.

I hope this makes things around Ubuntu desktop and server editions a bit more clear now. If you have questions or suggestions, please utilize the comment section.

Zulip: An Interesting Open-Source Alternative to Slack

Monday 30th of August 2021 11:24:48 AM

Brief: Zulip is an open-source collaboration platform that pitches itself as a better replacement to Slack. Let us take a closer look.

Messaging and collaboration platforms make a big difference when it comes to your work.

While there are several options available, Slack is a popular one used by many organizations. But, what about an open-source alternative to Slack that you can self-host?

Zulip is one such software.

Zulip: Open Source Collaboration Messaging App

If you want to explore, I must mention that there are more open-source alternatives to Slack out there.

Here, I focus on Zulip.

Zulip is a free and open-source messaging application with paid hosted options and the ability to self-host.

It aims to provide a similar experience to Slack while striving to help you improve the effectiveness of conversations using topics.

In contrast to channels in Slack, Zulip chat adds topics (which are like tags) to quickly filter through the conversations that matter to you.

Features of Zulip

You get most of the essential features with Zulip. To list the key highlights, you can find:

  • Markdown support
  • Topics for channels
  • Drag and drop file support
  • Code blocks
  • GitHub integration to track issues
  • Email notification support
  • Self-host option
  • Message editing
  • GIPHY integration
  • Video calls with Zoom, Jitsi, or BigBlueButton

In addition to the features mentioned, you should expect the basic options that you usually get with Slack and others.

Also, you can integrate it with Matrix and IRC if you want.

In my brief test usage, the user interface is good enough for effective communication. However, I failed to find any dark mode or the ability to change a theme.

It looks more straightforward than Slack so that it can improve the user experience side of things.

Install Zulip in Linux

Zulip is available as an AppImage file from its official website. You may refer to our guide on using AppImage in Linux in case you need help.

It is also available as a snap package. So, you can utilize either of them for any Linux distro.

You can also install it through the terminal for Ubuntu/Debian-based distros using APT. Take a look at its official instructions if you want that.

Zulip is available for Windows, Mac, and Linux. You should also find it available for Android and iOS mobile phones.

Zulip

Considering that you can use Zulip on the web, desktop, and smartphones, it is a suitable replacement for Slack.

Have you tried it yet? What messaging platform do you use to collaborate for work? Feel free to share your thoughts in the comments.

Linux Jargon Buster: What is sudo rm -rf? Why is it Dangerous?

Sunday 29th of August 2021 06:38:18 AM

When you are new to Linux, you’ll often come across advice to never run sudo rm -rf /. There are so many memes in the Linux world around sudo rm -rf.

But it seems that there are some confusions around it. In the tutorial on cleaning Ubuntu to make free space, I advised running some command that involved sudo and rm -rf. An It’s FOSS reader asked me why I am advising that if sudo rm -rf is a dangerous Linux command that should not be run.

And thus I thought of writing this chapter of Linux jargon buster and clear the misconceptions.

sudo rm -rf: what does it do?

Let’s learn things in steps.

The rm command is used for removing files and directories in Linux command line.

abhishek@its-foss:$ rm agatha abhishek@its-foss:$

But some files will not be removed immediate because of read only file permissions. They have to be forced delete with the option -f.

abhishek@its-foss:$ rm books rm: remove write-protected regular file 'books'? y abhishek@its-foss:$ rm -f christie abhishek@its-foss:$

However, rm command cannot be used to delete directories (folders) directly. You have to use the recursive option -r with the rm command.

abhishek@its-foss:$ rm new_dir rm: cannot remove 'new_dir': Is a directory

And thus ultimately, rm -rf command means recursively force delete the given directory.

abhishek@its-foss:~$ rm -r new_dir rm: remove write-protected regular file 'new_dir/books'? ^C abhishek@its-foss:$ rm -rf new_dir abhishek@its-foss:$

Here’s a screenshot of all the above commands:

Example explaining rm command

If you add sudo to the rm -rf command, you are deleting files with root power. That means you could delete system files owned by root user.

So, sudo rm -rf is a dangerous Linux command?

Well, any command that deletes something could be dangerous if you are not sure of what you are deleting.

Consider rm -rf command as a knife. Is knife a dangerous thing? Possibly. If you cut vegetables with the knife, it’s good. If you cut your fingers with the knife, it is bad, of course.

The same goes for rm -rf command. It is not dangerous in itself. It is used for deleting files after all. But if you use it to delete important files unknowingly, then it is a problem.

Now coming to ‘sudo rm -rf /’.

You know that with sudo, you run a command as root, which allows you to make any changes to the system.

/ is the symbol for the root directory. /var means the var directory under root. /var/log/apt means apt directory under log, under root.

Linux directory hierarchy representation

As per Linux directory hierarchy, everything in a Linux file system starts at root. If you delete root, you are basically removing all the files of your system.

And this is why it is advised to not run sudo rm -rf / command because you’ll wipe out your entire Linux system.

Please note that in some cases, you could be running a command like ‘sudo rm -rf /var/log/apt’ which could be fine. Again, you have to pay attention on what you are deleting, the same as you have to pay attention on what you are cutting with a knife.

I play with danger: what if I run sudo rm -rf / to see what happens?

Most Linux distributions provide a failsafe protection against accidentally deleting the root directory.

abhishek@test-vm:~$ sudo rm -rf / [sudo] password for abhishek: rm: it is dangerous to operate recursively on '/' rm: use --no-preserve-root to override this failsafe

I mean it is human to make typos and if you accidentally typed “/ var/log/apt” instead of “/var/log/apt” (a space between / and var meaning that you are providing / and var directories to for deletion), you’ll be deleting the root directory.

Pay attention when using sudo rm -rf

That’s quite good. Your Linux system takes care of such accidents.

Now, what if you are hell-bent on destroying your system with sudo rm -rf /? You’ll have to use It will ask you to use –no-preserve-root with it.

No, please do not do that on your own. Let me show it to you.

So, I have elementary OS running in a virtual machine. I run sudo rm -rf / --no-preserve-root and you can see the lights going out literally in the video below (around 1 minute).

Subscribe to our YouTube channel for more Linux videos Clear or still confused?

Linux has an active community where most people try to help new users. Most people because there are some evil trolls lurking to mess with the new users. They will often suggest running rm -rf / for the simplest of the problems faced by beginners. These idiots get some sort of supremacist satisfaction I think for such evil acts. I ban them immediately from the forums and groups I administer.

I hope this article made things clearer for you. It’s possible that you still have some confusion, specially because it involves root, file permissions and other things new users might not be familiar with. If that’s the case, please let me know your doubts in the comment section and I’ll try to clear them.

In the end, remember. Don’t drink and root. Stay safe while running your Linux system :)

How to Change and Manage Background Wallpapers in Ubuntu [Beginner’s Tip]

Friday 27th of August 2021 08:42:37 AM

The simplest way to customize Ubuntu is to change the wallpaper. A good wallpaper changes the looks of the desktop drastically.

Changing desktop background in Ubuntu is just a matter of a right click. However, I am writing this tutorial to share a few behind-the-scene tips and information which you might miss or never know even after using Ubuntu for years.

Change desktop background from Ubuntu settings

If you are using Ubuntu with the default GNOME desktop, you should find a dedicated background option in the system settings.

Press the Windows/Super key and look for Settings (or background).

Go to Settings

Go to the Background tab and you’ll see a bunch of wallpapers. These are the default Ubuntu wallpapers that come pre-installed with the operating system.

The current wallpaper is displayed at the top. You’ll also notice that some wallpapers have a clock icon. These wallpapers change throughout the day at a regular time interval. I’ll explain about them later in this article.

Background Settings ubuntu

To change the wallpaper, just select one of the available images. The change takes place immediately.

You are not restricted to just the handful of pre-installed wallpapers. You can download beautiful Ubuntu wallpapers from the internet. The ‘Add Picture’ option at the top lets you add additional pictures.

Add the pictures of your choice and select the one you what to set as the desktop background. You can remove the additional wallpapers by clicking the x icon on the images.

Adding additional wallpapers

This is fine but there is an even easier way to set custom desktop backgrounds.

Set any image as desktop background in Ubuntu

You have got some images that you can use as wallpaper. Select the image, right click and select “Set as Wallpaper” option. It immediately changes the desktop background.

Set an image as wallpaper

When you use this method of setting the wallpaper, your selected image is copied and stored in the Wallpapers folder under the Pictures. This way, even if you accidentally delete the original image file from the Downloads folder (or other location), it keeps on displaying the wallpaper.

Some additional wallpapers are stored in ~/Pictures/Wallpapers folder

Another way of setting an image as wallpaper is to open the image by double click it. Now right click on it and select “Set as Wallpaper”.

Open an image, right click and set it as wallpaper

When you use this method of setting wallpaper, the original image is not copied to the Wallpapers folder under Pictures.

Tip: Personally, when I download a new wallpaper, I use right click to set it first. When it is saved in the Wallpapers folder, I double click on the saved images and then set them as wallpaper. This way, the same image is not copied more than once in the Wallpaper directory.

Also note that only standard image types like JPEG, PNG can be used as wallpaper. Images in newer formats like WebP cannot be used as wallpaper for the moment.

Making a wallpaper slideshow

By default, Ubuntu provides a few set of wallpapers that could be rotated. You identify them with the small clock icon. But what if you want to rotate your chosen set of images?

Things are not that simple when it comes to the slideshow. Ubuntu keeps the default wallpapers in /usr/share/backgrounds directory. The rotating wallpaper slideshow is controlled via xml files in /usr/share/gnome-background-properties directory.

The default wallpaper slideshow in Ubuntu is governed by an XML file

With a little knowledge and care, you may edit this XML file and add your custom images, but this is not something everyone will be comfortable with.

As an alternative, you may use dedicated wallpaper applications in Ubuntu. These applications allow you to create a slideshow of wallpapers with your selected images or download and rotate images from selected sources from the internet.

Wallch is one such tool. You may also use Variety or BingWall.

Creating a wallpaper slideshow with Wallch

If you are using a multi-monitor setup and want to set a different wallpaper on different screens, you’ll have to use a tool like HydraPaper.

Setting different wallpaper on different screen

I know you might wonder if changing wallpaper in Ubuntu required a dedicated tutorial. But I think that it may help the absolute beginner and even teach something new to regular Ubuntu users.

Did you learn something new from this tutorial?

How to Easily Install Debian Linux

Thursday 26th of August 2021 03:13:30 PM

Installing Debian could be easy or complicated depending upon the ISO you choose.

If you go with the default ISO provided by the Debian website, you’ll have a hard time installing Debian. You’ll be stuck at a screen that asks for network drivers to be installed from external removable media.

Installing Debian from default ISO is problematic for new users

You may, of course, troubleshoot that, but it makes things unnecessarily complicated.

Don’t worry. Let me show the steps for installing Debian comfortably and easily.

The easy way of installing Debian as a desktop

Before you see the steps, please have a look at things you need.

  • A USB key (pen drive) with at least 4 GB in size.
  • A system with internet connection (could be the same system where it will be installed).
  • A system where you’ll be installing Debian. It will wipe out everything on this system so please copy your important data on some other external disk.

What kind of system specification you should have for Debian? It depends on the desktop environment you are going to use. For example, GNOME desktop environment could work on 4 GB RAM but it will work a lot better on an 8 GB RAM. If you have 4 GB or less, try using KDE, Cinnamon or Xfce desktops.

Debian also has both 32-bit and 64-bit architecture support. You’ll have to get the Debian ISO according to your processor architecture.

Your system should have at least 25 GB of disk space to function. The more, the merrier.

Warning!

This method removes all the other operating systems along with the data present on the disk.

You may save your personal files, documents, pictures etc on an external USB disk or cloud storage if you want to use it later.

In this tutorial, I am going to show the steps for installing Debian 11 Bullseye with GNOME desktop environment. The steps should be the same even if you choose some other desktop environment.

This tutorial is tested on a UEFI system with GPT partitioning. If you have MBR instead of GPT or legacy BIOS instead of UEFI, the live USB creation step will be different.

Step 1: Getting the correct Debian ISO

Half of the battle in installing Debian is choosing the correct ISO. Surprisingly, it is really difficult to navigate through its website and find that ISO which is the easiest for a new Debian user.

If you click the Download button on the homepage of Debian website, it downloads a minimal net install file which will be super complicate for a regular user. Please DO NOT use this.

Instead, you should go for the live ISO. But here is a catch, there are separate live versions with non-free software (includes drivers for your networking hardware).

You should download this non-free live ISO. Another problem here is that you won’t get it mentioned prominently on the website and there are various URLs for torrents or direct downloads for various architecture.

Let me link them here.

Main repo for 32 and 64 bit Debian 11 Direct Debian 11 Torrent

You’ll see several files with the of desktop environment mentioned in the filename. Choose the one with desktop environment of your choice. For direct downloads, click on the links that end with .iso.

Downloading the Debian Live Non-free ISO

Once you have the appropriate ISO downloaded, the rest is standard procedure that you may have experienced with other Linux distributions.

Step 2: Creating live USB of Debian

Plug in the USB into your system. It will be wise to format it just for the sake of it. It will be formatted anyway.

You can use any live USB creation tool of your choice. If you are using Windows, go with Rufus. I am going to use Etcher here because it is available for both Windows and Linux.

Download Etcher from its website.

Download Etcher

I have a dedicated tutorial on using Etcher in Linux and thus I am not going to go in detail here. Just run the downloaded executable file, browse to the Debian ISO, make sure that correct USB is selected and then hit the Flash button.

Creating Live Debian USB with Etcher

It may take a couple of minutes to create the live USB. Once that is ready, it is time to boot from it.

Step 3: Boot from the live USB

Restart the system where you want to install Debian. When it is showing the manufacturer’s logo, press F2/F10 or F12 key to access the boot settings. You may also access the UEFI firmware settings from Windows.

Some systems do not allow booting from live USB if secure boot is enabled. If that is the case, please disable secure boot from the BIOS settings.

The screen may look different for different manufacturers.

Once you make the change, press F10 to save and exit. Your system will boot once again.

Again, press F2/F10 or F12 to access the boot settings when it shows the manufacturer’s logo. You should see the option to boot from the USB. Select it.

It takes a little bit of time and then you should see a screen like this. Go with the first option here.

Debian live boot screen Step 4: Start Debian installation

When you enter the live Debian session, it may show some welcome screen with option to choose your keyboard and language if you are using GNOME desktop. Just hit next when you see those screens.

Debian live welcome screen

Once you are past the welcome screen, press the Windows/Super key to bring the activity area. You should see the Debian install button here.

Start Debian Installation

It opens the friendly Calamares graphical installer. Things are pretty straightforward from here.

Debian 11 Calamares graphical installer

It asks you to select your geographical location and time zone.

Select your location and time zone

On the next screen, you’ll be asked to select the keyboard. Please pay attention here. Your keyboard is automatically selected based on your location. For example, I had used India as my location and it automatically set the default Indian keyboard with Hindi language. I had to change it to English India.

Choosing keyboard layout

The next screen is about the disk partition and where you would like to install Debian. In this case, you are going to install Debian as the only operating system on your computer.

The easiest option would to go with ‘Erase disk’ option. Debian will put everything under root except the mandatory ESP partition and Swap space. In fact, it shows what your disk would like after your chosen installation method.

Disk partitioning

If you want to take matter in your hands, you may also opt for manual partitioning and choose how much you want to allot to root, home, boot or swap. Only do that when you know what you are doing.

On the next screen, you have to provide the username and password. It does not set root password and keeps it empty.

Set Username and password

This also means that you can use sudo with the newly created user. In the ‘complicated Debian install’, you could also set root password but then you’ll have to add the normal user to sudoer list manually. See, this installation method is easier for beginners, right?

Before it goes on with the actual installation, it presents you with a summary of the choices you have made. If things look good, hit the install button.

Summary of your installation choices

Now it is just a matter of waiting for the installation to finish.

Installing Debian

It takes a few minutes to complete the installation. When the installation finishes, it asks for a restart.

Finished Debian installation

Restart your system and if everything goes well, you should see the grub screen with Debian.

Debian boot screen Troubleshooting tip (if your system does not boot into Debian)

In my case, my Dell system did not recognize any operating system to boot. This was weird because I had see Debian creating an ESP partition.

If it is the same case with you, go to BIOS settings. Check the boot sequence. If you do not see anything, click on the Add boot option.

Add new boot option

It should give you an option to add an EFI file.

Browse to EFi file

Since Debian created ESP partition during installation, there is an EFI directory created with necessary files.

Select EFI directory

It should show a Debian folder along with some other folders. Select Debian folder.

Select Debian

In this Debian folder, you’ll find files like grubx64.efi, shimx64.efi. Select shimx64.efi.

Select shim.efi

You may give this file an appropriate name. The final screen may look like this.

Adding the new boot option with efi file

Now, you should have this boot option. Since I named it Debian, it shows two Debian boot options (one of them coming from the efi file I guess). Press F10 to save and exit the BIOS settings.

New boot option added

When your system boots now, you should see the grub screen with Debian boot option. You can start enjoying Debian now.

Were you able to install Debian?

I hope I made things simpler here. It is not that you cannot install Debian from the default net installer ISO. It just takes (a lot) more effort.

Was this tutorial helpful for you in installing Debian? Are you still facing issues? Please let me know in the comment section and I’ll try to help you out.

Icons Look too Small? Enable Fractional Scaling to Enjoy Your HiDPI 4K Screen in Ubuntu Linux

Tuesday 24th of August 2021 06:49:16 AM

A few months ago, I bought a Dell XPS laptop with a 4K UHD screen. The screen resolution is 3840×2400 resolution with a 16:10 aspect ratio.

When I was installing Ubuntu on it, everything looked so small. The desktop icons, applications, menus, items in the top panel, everything.

It’s because the screen has too many pixels but the desktop icons and rest of the elements remain the same in size (as on a regular screen of 1920×1080). Hence, they look too small on the HiDPI screen.

Icons and other elements look too small on a HiDPI screen in Ubuntu

This is not pretty and makes it very difficult to use your Linux system. Thankfully, there is a solution for GNOME desktop users.

If you too have a 2K or 4K screen where the desktop icons and other elements look too small, here’s what you need to do.

Scale-up display if the screen looks too small

If you have a 4K screen, you can scale the display to 200%. This means that you are making every element twice its size.

Press the Windows key and search for Settings:

Go to Settings

In Settings, go to Display settings.

Access the Display Settings and look for Scaling

Here, select 200% as the scale factor and click on Apply button.

Scaling the display in Ubuntu

It will change the display settings and ask you to confirm whether you want to keep the changed settings or revert to the original. If things look good to you, select “Keep Changes.”

Your display settings will be changed and remain the same even after reboots until you change it again.

Enable fractional scaling (suitable for 2K screens)

200% scaling is good for 4K screens however if you have a 2K screen, the 200% scaling will make the icons look too big for the screen.

Now you are in the soup. You have the screen looking too small or too big. What about a mid-point?

Thankfully, GNOME has a fractional scaling feature that allows you to set the scaling to 125%, 150%, and 175%.

Using fractional scaling on Ubuntu 20.04 and newer versions

Ubuntu 20.04 and the new versions have newer versions of GNOME desktop environment and it allows you to enable or disable fractional scaling from Display settings itself.

Just go to the Display settings and look for the Fractional Scaling switch. Toggle it to enable or disable it.

When you enable the fractional scaling, you’ll see new scaling factors between 100% to 200%. You can choose the one which is suitable for your screen.

Enable fractional scaling Using fractional scaling on Ubuntu 18.04

You’ll have to make some additional efforts to make it work on the older Ubuntu 18.04 LTS version.

First, switch to Wayland from Xorg.

Second, enable fractional scaling as an experimental feature using this command:

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

Third, restart your system and then go to the Display settings and you should see the fractional scaling toggle button now.

Disabling fractional scaling on Ubuntu 18.04

If you are experiencing issues with fractional scaling, like increased power consumption and mouse lagging, you may want to disable it. Wayland could also be troublesome for some applications.

First, toggle the fractional scaling switch in the display settings. Now use the following command to disable the experimental feature.

gsettings reset org.gnome.mutter experimental-features

Switch back to Xorg from Wayland again.

Multi-monitor setup and fractional scaling

4K screen is good but I prefer a multi-monitor setup for work. The problem here is that I have two Full HD (1080p) monitors. Pairing them with my 4K laptop screen requires little settings change.

What I do here is to keep the 4K screen at 200% scaling at 3840×2400 resolution. At the same time, I keep the full-HD monitors at 100% scaling with 1920×1080 resolution.

To ensure a smooth experience, you should take care of the following:

  • Use Wayland display server: It is a lot better at handling multi-screens and HiDPI screens than the legacy Xorg.
  • Even if you use only 100% and 200% scaling, enabling fractional scaling is a must, otherwise, it doesn’t work properly. I know it sounds weird but that’s what I have experienced.
Did it help?

HiDPI support in Linux is far from perfect but it is certainly improving. Newer desktop environment versions of GNOME and KDE keep on improving on this front.

Fractional scaling with Wayland works quite well. It is improving with Xorg as well but it struggles especially on a multi-monitor set up.

I hope this quick tip helped you to enable fractional scaling in Ubuntu and enjoy your Linux desktop on a UHD screen.

Please leave your questions and suggestions in the comment section.

Ulauncher: A Super Useful Application Launcher for Linux

Monday 23rd of August 2021 02:04:54 PM

Brief: Ulauncher is a fast application launcher with extension and shortcut support to help you quickly access application and files in Linux.

An application launcher lets you quickly access or open an app without hovering over the application menu icons.

By default, I found the application launcher with Pop!_OS super handy. But, not every Linux distribution offers an application launcher out-of-the-box.

Fortunately, there is a solution with which you can add the application launcher to most of the popular distros out there.

Ulauncher: Open Source Application Launcher

Ulauncher is a quick application launcher built using Python while utilizing GTK+.

It gives a decent amount of customization and control options to tweak. Overall, you can adjust its behavior and experience to suit your taste.

Let me highlight some of the features that you can expect with it.

Ulauncher Features

The options that you get with Ulauncher are super accessible and easy to customize. Some key highlights include:

  • Fuzzy search algorithm, which lets you find applications even if you misspell them
  • Remembers your last searched application in the same session
  • Frequently used apps display (optional)
  • Custom color themes
  • Preset color themes that include a dark theme
  • Shortcut to summon the launcher can be easily customized
  • Browse files and directories
  • Support for extensions to get extra functionality (emoji, weather, speed test, notes, password manager, etc.)
  • Shortcuts for browsing sites like Google, Wikipedia, and Stack Overflow

It provides almost every helpful ability that you may expect in an application launcher, and even better.

How to Use Ulauncher in Linux?

By default, you need to press Ctrl + Space to get the application launcher after you open it from the application menu for the first time.

Start typing in to search for an application. And, if you are looking for a file or directory, start typing with “~” or “/” (ignoring the quotes).

There are default shortcuts like “g XYZ” where XYZ is the search term you want to search for in Google.

Similarly, you can search for something directly taking you to Wikipedia or Stack Overflow, with “wiki” and “so” shortcuts, respectively.

Without any extensions, you can also calculate things on the go and copy the results directly to the keyboard.

This should come in handy for quick calculations without needing to launch the calculator app separately.

You can head to its extensions page and browse for useful extensions along with screenshots that should instruct you how to use it.

To change how it works, enable frequent applications display, and adjust the theme — click on the gear icon on the right side of the launcher.

You can set it to auto-start. But, if it does not work on your Systemd enabled distro, you can refer to its GitHub page to add it to the service manager.

The options are self-explanatory and are easy to customize, as shown in the screenshot below.

Installing Ulauncher in Linux

Ulauncher provides a .deb package for Debian or Ubuntu-based distributions. You can explore how to install Deb files if you’re new to Linux.

In either case, you can also add its PPA and install it via terminal by following the commands below:

sudo add-apt-repository ppa:agornostal/ulauncher sudo apt update sudo apt install ulauncher

You can also find it available in the AUR for Arch and Fedora’s default repositories.

For more information, you can head to its official website or the GitHub page.

Ulauncher

Ulauncher should be an impressive addition to any Linux distro. Especially, if you want the functionality of a quick launcher like Pop!_OS offers, this is a fantastic option to consider.

Have you tried Ulauncher yet? You are welcome to share your thoughts on how this might help you get things done quickly.

Linux Phones: Here are Your Options

Saturday 21st of August 2021 06:07:49 AM

Brief: Linux phones could be the future to replace Android or iOS, but what are some of your options to give it a try?

While Android is based on a Linux kernel, it has been heavily modified. So, that does not make it a full-fledged Linux-based operating system.

Google is trying to get the Android kernel close to the mainline Linux kernel, but that is still a distant dream.

So, in that case, what are some of the options if you are looking for a Linux phone? A smartphone powered by a Linux operating system.

It is not an easy decision to make because the options are super limited. Hence, I try to highlight some of the best Linux phones and a few different options from the mainstream choices.

Top Linux phones you can use today

It is worth noting that the Linux phones mentioned here may not be able to replace your Android or iOS devices. So, make sure that you do some background research before making a purchase decision.

Note: You need to carefully check the availability, expected shipping date, and risks of using a Linux phone. Most of the options are only suitable for enthusiasts or early adopters.

1. PinePhone

PinePhone is one of the most affordable and popular choices to consider as a promising Linux phone.

It is not limited to a single operating system. You can try it with Manjaro with Plasma mobile OS, UBports, Sailfish OS, and others. PinePhone packs in some decent specifications that include a Quad-core processor and 2/3 Gigs of RAM. It does support a bootable microSD card to help you with installation, along with 16/32 GB eMMC storage options.

The display is a basic 1440×720p IPS screen. You also get special privacy protection tweaks like kill switches for Bluetooth, microphones, and cameras.

PinePhone also gives you an option to add custom hardware extensions using the six pogo pins available.

The base edition (2 GB RAM and 16 GB storage) comes loaded with Manjaro by default and costs $149. And, the convergence edition (3 GB RAM / 32 GB storage) costs $199.

PinePhone 2. Fairphone

Compared to others on the list, Fairphone is a commercial success. It is not a Linux smartphone, but it features a customized version of Android, i.e., Fairphone OS, and the option to opt for /e/ OS, one of the open-source Android alternatives. Some community ports are available if you want to use the Linux operating system, but it could be a hit and miss.

The Fairphone offers some decent specs, considering there are two different variants. You will find a 48 MP camera sensor for Fairphone 3+ and a full-HD display. Not to forget, you will also find decent Qualcomm processors powering the device.

They focus on making smartphones that are sustainable and have been built using some amount of recycled plastic. Fairphone is also meant to be easily repairable.

So, it is not just an option away from mainstream smartphones, but you will also be helping with protecting the environment if you opt for it.

Fairphone 3. Librem 5

Librem 5 is a smartphone that focuses heavily on user privacy while featuring an open-source operating system, i.e., PureOS, not based on Android.

The specifications offered are decent, with 3 Gigs of RAM and a quad-core Cortex A53 chipset. But, this is not something geared to compete with mainstream options. Hence, you may not find it as a value for money offering.

It is aimed at enthusiasts who are interested in testing privacy-respecting smartphones in the process.

Similar to others, Librem 5 also focuses on making the phone easily repairable by offering user-replaceable batteries.

For privacy, you will notice kill switches for Bluetooth, Cameras, and microphones. They also promise security updates for years to come.

Librem 5 4. Pro 1X

An interesting smartphone that supports Ubuntu Touch, Lineage OS, and Android as well.

It is not just a Linux smartphone but a mobile phone with a separate QWERTY keypad, which is rare to find these days.

The Pro 1 X features a decent specification, including a Snapdragon 662 processor coupled with 6 GB of RAM. You also get a respectable AMOLED Full HD display with the Pro 1 X.

The camera does not pack in anything crazy, but should be good enough for the most part.

Pro 1X 5. Volla Phone

An attractive offering that runs on Ubuntu Touch by UBports.

It comes with a pre-built VPN and focuses on making the user experience easy. The operating system has been customized so that everything essential should be accessible quickly without organizing anything yourself.

It packs in some impressive specifications that include an Octa-core MediaTek processor along with a 4700 mAh battery. You get a notch design resembling some of the latest smartphones available.

Volla Phone Wrapping Up

Linux smartphones are not readily available and certainly not yet suitable for the masses.

So, if you are an enthusiast or want to support the development of such phones, you can consider getting one of the devices.

Do you already own one of these smartphones? Please don’t hesitate to share your experiences in the comments below.

How to Download Audio Only Using youtube-dl

Thursday 19th of August 2021 06:53:04 AM

youtube-dl is a versatile command line tool for downloading videos from YouTube and many other websites. I use it for making back up of my own YouTube videos.

By default, you use youtube-dl for downloading videos. How about extracting only the audio with youtubde-dl? That’s very simple actually. Let me show you the steps.

Attention

Downloading videos from websites could be against their policies. It’s up to you if you choose to download videos or audio.

Download only audio with youtube-dl

Please make sure that you have installed youtube-dl on your Linux distribution first.

sudo snap install youtube-dl

If you only want to download audio from a YouTube video, you can use the -x option with youtube-dl. This extract-audio option converts the video files to audio-only files.

youtube-dl -x video_URL

The file is saved in the same directory from where you ran the youtube-dl command.

Here’s an example where I downloaded the voice-over of our Zorin OS 16 review video.

youtube-dl -x https://www.youtube.com/watch?v=m_PmLG7HqbQ [youtube] m_PmLG7HqbQ: Downloading webpage [download] Destination: Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a [download] 100% of 4.26MiB in 00:03 [ffmpeg] Correcting container in "Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a" [ffmpeg] Post-process file Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a exists, skipping

Did you notice the audio format? It is in .m4a format. You may specify the audio format to something of your choice.

Say you want to extract the audio in MP3 format. You can use it like this:

youtube-dl -x --audio-format mp3 video_URL

Here’s the same example I showed previously. You can see that it uses ffmpeg to convert the m4a file into mp3.

youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=m_PmLG7HqbQ [youtube] m_PmLG7HqbQ: Downloading webpage [download] Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a has already been downloaded [download] 100% of 4.26MiB [ffmpeg] Correcting container in "Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a" [ffmpeg] Destination: Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.mp3 Deleting original file Zorin OS 16 Review - It's a Visual Masterpiece-m_PmLG7HqbQ.m4a (pass -k to keep) Download entire YouTube playlist in MP3 format

Yes, you can totally do that. The main thing is to get the URL of the playlist here. It is typically in the following format:

https://www.youtube.com/playlist?list=XXXXXXXXXXXXXXXXXXX

To get the URL of a playlist, click on its name when the playlist is being displayed in the right sidebar.

Click on the playlist title

It will take you to the playlist page and you can copy the URL here.

Grab the playlist URL

Now that you have the playlist URL, you can use it to download the audio files in MP3 format in the following fashion:

youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" playlist_URL

That scary looking -o "%(title)s.%(ext)s" specifies the output file (with option -o) and instructs it to use the title of the video and the extension (mp3 in this case) for naming the audio files.

I hope you find this quick tip helpful. Enjoy the audio files :)

More in Tux Machines

Programming Leftovers

  • Announcement : An AArch64 (Arm64) Darwin port is planned for GCC12

    As many of you know, Apple has now released an AArch64-based version of macOS and desktop/laptop platforms using the ‘M1’ chip to support it. This is in addition to the existing iOS mobile platforms (but shares some of their constraints). There is considerable interest in the user-base for a GCC port (starting with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168) - and, of great kudos to the gfortran team, one of the main drivers is folks using Fortran. Fortunately, I was able to obtain access to one of the DTKs, courtesy of the OSS folks, and using that managed to draft an initial attempt at the port last year (however, nowhere near ready for presentation in GCC11). Nevertheless (as an aside) despite being a prototype, the port is in use with many via hombrew, macports or self-builds - which has shaken out some of the fixable bugs. The work done in the prototype identified three issues that could not be coded around without work on generic parts of the compiler. I am very happy to say that two of our colleagues, Andrew Burgess and Maxim Blinov (both from embecosm) have joined me in drafting a postable version of the port and we are seeking sponsorship to finish this in the GCC12 timeframe. Maxim has a lightning talk on the GNU tools track at LPC (right after the steering committee session) that will focus on the two generic issues that we’re tackling (1 and 2 below). Here is a short summary of the issues and proposed solutions (detailed discussion of any of the parts below would better be in new threads).

  • Apple Silicon / M1 Port Planned For GCC 12 - Phoronix

    Developers are hoping for next year's GCC 12 release they will have Apple AArch64 support on Darwin in place for being able to support Apple Silicon -- initially the M1 SoC -- on macOS with GCC. LLVM/Clang has long been supporting AArch64 on macOS given that Apple leverages LLVM/Clang as part of their official Xcode toolchain as the basis for their compiler across macOS to iOS and other products. While the GNU Compiler Collection (GCC) supports AArch64 and macOS/Darwin, it hasn't supported the two of them together but there is a port in progress to change it.

  • Dirk Eddelbuettel: tidyCpp 0.0.5 on CRAN: More Protect’ion

    Another small release of the tidyCpp package arrived on CRAN overnight. The packages offers a clean C++ layer (as well as one small C++ helper class) on top of the C API for R which aims to make use of this robust (if awkward) C API a little easier and more consistent. See the vignette for motivating examples. The Protect class now uses the default methods for copy and move constructors and assignment allowing for wide use of the class. The small NumVec class now uses it for its data member.

  • QML Modules in Qt 6.2

    With Qt 6.2 there is, for the first time, a comprehensive build system API that allows you to specify a QML module as a complete, encapsulated unit. This is a significant improvement, but as the concept of QML modules was rather under-developed in Qt 5, even seasoned QML developers might now ask "What exactly is a QML module". In our previous post we have scratched the surface by introducing the CMake API used to define them. We'll take a closer look in this post.

  • Santiago Zarate: So you want to recover and old git branch because it has been overwritten?
  • Start using YAML now | Opensource.com

    YAML (YAML Ain't Markup Language) is a human-readable data serialization language. Its syntax is simple and human-readable. It does not contain quotation marks, opening and closing tags, or braces. It does not contain anything which might make it harder for humans to parse nesting rules. You can scan your YAML document and immediately know what's going on. [...] At this point, you know enough YAML to get started. You can play around with the online YAML parser to test yourself. If you work with YAML daily, then this handy cheatsheet will be helpful.

  • 40 C programming examples

    C programming language is one of the popular programming languages for novice programmers. It is a structured programming language that was mainly developed for UNIX operating system. It supports different types of operating systems, and it is very easy to learn. 40 useful C programming examples have been shown in this tutorial for the users who want to learn C programming from the beginning.

Devices/Embedded: Asus Tinker Board 2 and More

  • Asus Tinker Board 2 single-board computer now available for $94 and up - Liliputing

    The Asus Tinker Board 2 is a Raspberry Pi-shaped single-board computer powered by a Rockchip RK3399 hexa-core processor and featuring 2GB to 4GB of RAM. First announced almost a year ago, the Tinker Board 2 is finally available for $99 and up. Asus also offers a Tinker Board 2S model that’s pretty similar except that it has 16GB of eMMC storage. Prices for that model start at about $120.

  • Raspberry Pi Weekly Issue #371 - Sir Clive Sinclair, 1940 – 2021

    This week ended with the incredibly sad news of the passing of Sir Clive Sinclair. He was one of the founding fathers of home computing and got many of us at Raspberry Pi hooked on programming as kids. Join us in sharing your Sinclair computing memories with us on Twitter and our blog, and we’ll see you next week.

  • cuplTag battery-powered NFC tag logs temperature and humidity (Crowdfunding) - CNX Software

    Temperature and humidity sensors would normally connect to a gateway sending data to the cloud, the coin-cell battery-powered cuplTag NFC tag instead sends data to your smartphone after a tap. CulpTag is controlled by an MSP430 16-bit microcontroller from Texas Instruments which reads and stores sensor data regularly into an EEPROM, and the data can then be read over NFC with the tag returning an URL with the data from the sensor and battery, then display everything on the phone’s web browser (no app needed).

  • A first look at Microchip PolarFire SoC FPGA Icicle RISC-V development board - CNX Software

    Formally launched on Crowd Supply a little over a year ago, Microchip PolarFire SoC FPGA Icicle (codenamed MPFS-ICICLE-KIT-ES) was one of the first Linux & FreeBSD capable RISC-V development boards. The system is equipped with PolarFire SoC FPGA comprised a RISC-V CPU subsystem with four 64-bit RISC-V (RV64GC) application cores, one 64-bit RISC-V real-time core (RV64IMAC), as well as FPGA fabric. Backers of the board have been able to play with it for several months ago, but Microchip is now sending the board to more people for evaluation/review, and I got one of my own to experiment with. That’s good to have a higher-end development board instead of the usual hobbyist-grade board. Today, I’ll just have a look at the kit content and main components on the board before playing with Linux and FPGA development tools in an upcoming or two posts.

  • What is IoT device management?

    Smart devices are everywhere around us. We carry one in our pocket, watch movies on another while a third cooks us dinner. Every day there are thousands of new devices connecting to the Internet. Research shows that by 2025, more than 150,000 IoT devices will come online every minute. With such vast numbers it is impossible to keep everything in working order just on your own. This brings the need for IoT device management. But what is IoT device management? To answer this question we first need to understand what the Internet of Things (IoT) is.

  • Beelink U59 mini PC with Intel Celeron N5095 Jasper Lake coming soon - Liliputing

    Beelink says the system ships with Windows 10, but it should also supports Linux.

  • Beelink U59 Celeron N5095 Jasper Lake mini PC to ship with 16GB RAM, 512GB SSD - CNX Software

    Beelink U59 is an upcoming Jasper Lake mini PC based on the Intel Celeron N5095 15W quad-core processor that will ship with up to 16GB RAM, and 512 GB M.2 SSD storage. The mini PC will also offer two 4K HDMI 2.0 ports, a Gigabit Ethernet port, WiFi 5, as well as four USB 3.0 ports, and support for 2.5-inch SATA drives up to 7mm thick.

Graphics: Mesa, KWinFT, and RADV

  • Experimenting Is Underway For Rust Code Within Mesa - Phoronix

    Longtime Mesa developer Karol Herbst who has worked extensively on the open-source NVIDIA "Nouveau" driver as well as the OpenCL/compute stack while being employed by Red Hat is now toying with the idea of Rust code inside Mesa.  Karol Herbst has begun investigating how Rust code, which is known for its memory safety and concurrency benefits, could be used within Mesa. Ultimately he's evaluating how Rust could be used inside Mesa as an API implementation as well as for leveraging existing Mesa code by Rust. 

  •     
  • KWinFT Continues Working On WLROOTS Render, Library Split

    KWinFT as a fork of KDE's KWin X11/Wayland compositor code continues making progress on driving fundamental display improvements and ironing out the Wayland support.  KWinFT has been transitioning to use WLROOTS for its Wayland heavy-lifting and that process remains ongoing. KWinFT has also been working on splitting up its library code to make it more manageable and robust.  Among the features still desired by KWinFT and to be worked on include input methods, graphical tablet support, and PipeWire video stream integration. Currently there are two full-time developers working on the project but they hope to scale up to four to five full-time developers. 

  • Raytracing Starting to Come Together – Bas Nieuwenhuizen – Open Source GPU Drivers

    I am back with another status update on raytracing in RADV. And the good news is that things are finally starting to come together. After ~9 months of on and off work we’re now having games working with raytracing.

  • Multiple Games Are Now Working With RADV's Ray-Tracing Code - Phoronix

    Not only is Intel progressing with its open-source ray-tracing driver support but the Mesa Radeon Vulkan driver "RADV" has been rounding out its RT code too and now has multiple games correctly rendering. Bas Nieuwenhuizen has been spearheading the RADV work on Vulkan ray-tracing support and after more than a half-year tackling it things are starting to fall into place nicely.Games such as Quake II RTX with native Vulkan ray-tracing are working along with the game control via VKD3D-Proton for going from Direct3D 12 DXR to Vulkan RT. Metro Exodus is also working while Ghostrunner and Doom Eternal are two games tested that are not yet working.

Audiocasts/Shows: Full Circle Weekly News, Juno Computers, Kali Linux 2021.3