Parents :Operating Systems

Date and time note was created$= dv.current().file.ctime
Date and time note was modified$= dv.current().file.mtime

Concepts

What is X and Wayland? Which is better?

In order to have a Graphical User Interface (GUI) in a system, you need a way to talk to the screen in your computer. That is done though a display protocol.

The classic protocol that we have been using is the X protocol, which was developed in the mid 80’s, long before even Linux existed. X is often referred as X11 or Xorg as we are currently using the eleventh version of the X protocol, and the implementation used by all Linux distributions is the one done by the X.org foundation.

X has worked fine for decades and became the backbone of pretty much all the user interfaces in Linux. But X is starting to show it’s age as many aspects of it were designed in a time where computers worked differently on how they are today.

In the 2010’s Wayland began it’s development; a new display protocol written from the ground up that aims to replace X by solving it’s core problems. Development on it has been slow but steady, making it a viable alternative for many users nowdays.

At the time of writing this (Mid 2020’s) we are on the transition period. Pretty much all the desktop environments still use X, but works on migrating to Wayland are ongoing. GNOME and KDE Plasma are at the forefront by making the Wayland version their primary, but also considering dropping support for X in the near future. Other smaller desktops like Cinnamon or Xfce have Wayland support on the roadmap, but for the moment only the X version is available.

There is no clear saying on which one is better in the current scheme. As X has been around for ages, many things have been developed around it, which makes it quite compatible with many existing programs like screen casting. In the other hand Wayland offers more modern features like fractional scaling and better multi-monitor support.

App Images

App Images are software packages that contain the dependencies already stored in them for use case by any of the Linux distributions.

They serve the same purpose as does binary (.bin) and executable (.exe) packages that are provided by many other operating systems such as Windows.

Googling or Duckduckgoing AppImages, we would come to know that AppImages are bundles/packages of the software that contain all the dependencies already stored in them for use case by any linux distributions or so called self-contained applications forsay.Also that they are build by keeping in mind older versions of linux distributions which make them more compatible.(Read more here : https://appimage.org/ )

They serve the same purpose as executable (.exe) packages that are provided by operating system such as Windows.

So we can say that they solve the problem of installing dependencies that are required while building each application against different distros of linux.

A single file with extension .AppImage has to be built by the developer according to the AppImage specifications and user can download only that single file without any build dependencies threshold or knowledge as a pre-requisite from user end hence making it easier to work with them.

Why?

So we can say that they solve the problem of installing dependencies that are required while building each application against different distros of linux. A single file with extension .AppImage has to be built by the developer and user have to download only that single file and no build threshold or knowledge is required from user end hence making it easier to work with them.

Not only does it solve the problem of dependencies dependence but also we can manage to run different versions packaged into different AppImages.

How

In order to learn to use them we need to learn to deal with app images to setup up them correctly in Linux.

Linux Guides

  • Convert a proper list containing all the links to Linux Guides and Issues
  • Should link to other guides on internet

Guides

How to set an appimage as default application (example is of browser)

If the browser you want to add is distributed as an AppImage, it doesn’t follow the traditional installation paths used by package managers, but you can still register it with update-alternatives by creating a symbolic link to the AppImage. Here’s how you can add an AppImage browser to update-alternatives:

  1. Place the AppImage in a Directory: Make sure your AppImage browser is executable and placed in a directory where you want to keep it. For example, let’s assume your AppImage browser is my-browser.AppImage and it’s located in /home/yourusername/Applications/.

  2. Create a Symlink: Create a symbolic link to the AppImage in a standard location like /usr/local/bin so that it can be used as a regular executable.

    sudo ln -s /home/yourusername/Applications/my-browser.AppImage /usr/local/bin/my-browser

    Adjust the paths as necessary for your system and AppImage.

  3. Add the New Browser to update-alternatives: Register the new browser with update-alternatives.

    sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/local/bin/my-browser 50

    In this command:

    • /usr/bin/x-www-browser is the link group.
    • x-www-browser is the name of the link group.
    • /usr/local/bin/my-browser is the path to the symbolic link.
    • 50 is the priority (you can adjust this number as needed).
  4. Configure the Default Browser: After adding the new browser, configure the default browser.

    sudo update-alternatives --config x-www-browser

    You will be prompted to select from the list of available browsers.

  5. Verify: Check that your changes have taken effect.

    xdg-settings get default-web-browser

    You can also test by opening a web page to see if the selected browser launches.

This approach works because update-alternatives doesn’t require the executable to be installed via traditional means, as long as it’s accessible through a symbolic link.

How to switch kernels in Linux??

learn

How to work with checksum

To work with checksum first know what is a checksum.

To generate a checksum of a file we need to pass it to the algorithm we choose to produce checksum with

For example if the algorithm used is SHA256 and we need to generate checksum for Linux iso file then

sha256sum  linux.tar.gz  
#Generates a sha256 checksum for a file with checksum and file name seperated by 2 spaces.
 
#To copy the checksum to a file directly
sha256sum linux.tar.gz genrated_checksum.sha256
 
#now to check the contents of the checksum extract the checksum from the file using the following 
cat generated_checksum.sha256
 
#To difference between original and genrated checksum 
diff generated_checksum.sha256 original_checksum.sha256

If the diff command gives no output then the checksum has resulted without any differences ,the data integrity is maintained and file is not corrupt or mishandled.

References

How to manage the app images with the help of software ??

  1. Install the GitHub - TheAssassin/AppImageLauncher: Helper application for Linux distributions serving as a kind of “entry point” for running and integrating AppImages according to your distro.
  2. After installation of ApplmageLauncher , double click the [software_name].AppImage you want to run.
  3. Now the AppImageLauncher would ask you if you want to run or run and integrate the software into your system.
  4. To make things simpler for me I just run and integrate it to my system for enabling future use as it creates the desktop entry and integrates the software with my system globally.
  5. Current installation of application directory would be ~/applications and current desktop entries would be located inside ~/.local/share/applications (found out by searching : which and whereis command proved futile as files were not located in the default paths)
  6. Now comes the last step and probably the most important step to symlink the application and its desktop file to the default paths

I would be choosing /usr/bin for symlinking the application image stored in ~/applications. Symlink as follows :
ln -s 'path_of_application_image''path_where_to_store_the_shortcut'

I would be choosing /usr/share/applications for symlinking the application desktop stored in ~/.local/share/applications as sometimes the shortcuts don’t fully integrate with this path. Symlink as follows :
ln -s 'path_of_application_image''path_where_to_store_the_shortcut'

  1. Now you can access the software through the search bar if not so check for another default paths or check for the relative search menu’s you are using for further investigation.

This helps with installation of App Images in Linux

How to take Screenshot in Linux

In Cinnamon flavour of Linux mint,

  • press and hold Shift and then tap the Print Screen key very briefly.
  • your cursor turns into a cross-hair(X) .
  • this allows you to select the portion of the screen that you want a picture of.

Or In some linux distros you can directly use prnt screen button to take the part of screen as screenshot instead of taking entire screen screenshot at once.

i3 window manager

Steps to install new fonts from google fonts in Linux

  1. Download the new font-family from google fonts or in case of tools like Neovim you can use Nerd Fonts

  2. Now if you want to install the fonts globally for all the users in the system put the extracted fonts folder into /usr/share/fonts.

  3. Now to re-sync the fonts cache in the system :

    fc-cache -f -v fc-cache : font cache -f : forcefully scan all the directories -v : verbose (display information)

  4. To verify that your font is installed use grep command.

    fc-list | grep "font_name" fc-list:list available fonts

  5. Remove the archive files and extraneous folders that were downloaded.

References

External Guides

Linux Commands

	cat file_name | wc -l

Current Setup