Category: ubuntu

Google meet(Gmeet) displays blank or black screen when sharing in the meet

This issue can be solved by following simple commands. All you need is editor and sudo permission(usually your same password as user).

Open the file /etc/gdm3/custom.conf is this does not exist in your machine open /etc/gdm3/daemon.conf.

Then uncomment the line WaylandEnable=false that is remove the # at the start of the line, save it and then do a reboot.

More information can be found from here and here.

Fix ubuntu freezning or hard disk switching to read mode due to bad sector or file system error

This is one of the most common problems that one might encounter these days. This can be due to hardware of software.

If the issue is because of software we can fix it using below mentioned ways..

First print out the output of the command dmesg and see if there are any errors printed in red color which does symbolize that you have a file system error.

Note: sda5 means the disk that you want to check for errors. You can see the name of your disk by using the command df -h

Install smartctl a tool to check your hard disk for errors.

After installing smartctl run the following command.

smartctl -t long /dev/sda5

Then carefully see the output of above command it displays the time it will take to complete the test you have just started. To view the test run the below command.

smartctl -l selftest /dev/sda5

Now run below commands to check the health of your hard disk.

smartctl -a /dev/sda5
smartctl -H /dev/sda5

You can also add a line to your grub file located at /etc/default/grub or modify the line if it already exists.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

This will make sure that while rebooting you run a force check for errors in your file system. Be careful because you might need to back up your data as you may lose some of it.

Another way to go into recovery mode is to press ESC while rebooting and choose recovery mode. This will make sure to fix file system errors also you can choose to run fsck/resume normal boot in the options provided.

Setting Reverse Proxy in Apache Ubuntu

Suppose we have a web app running on a port. For example nodejs runs server on a port. For accepting incoming connections on this port without actually exposing the port number is what we look for.

To solve this we can add few lines in our apache configuration to tell our web server to accept connections on a port.

Lets assume we are trying to access this url

http://127.0.0.1:8080/mybankapp

Open the file /etc/apache2/sites-available/000-default.conf using any editor and paste the below lines. You may take a backup of the above file before doing so.

<VirtualHost *:80>
    ProxyPreserveHost On

    ProxyPass /mybankapp http://127.0.0.1:8080/mybankapp
    ProxyPassReverse /mybankapp http://127.0.0.1:8080/mybankapp
</VirtualHost>

Before we restart apache we may enable some modules.

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests

After we execute above command now we may restart apache.

sudo systemctl restart apache2

Now we can access our web app without the port number.

View Difference between Files and Folders Graphically in Linux With Meld

There are terminal utilities like ‘diff’ and ‘vimdiff’ in Linux to visualise the differences in two files. But sometimes this visual presentation can be difficult to be viewed and understanding it might take some time as it can be confusing to analyse.

Using meld we can visually the differences in a less confusing way and understand it more easily. Here is a screenshot of the same.

Bonus advantage is that we can view the graphical difference of two folders also.

To install Meld you can install from command line using the following command

sudo apt install meld

Creating a backup of installed Ubuntu (ISO image)

1. Download Relinux 0.2 from
http://sourceforge.net/projects/re-linux/?source=directory
OR
http://nchc.dl.sourceforge.net/project/re-linux/relinux_0.2.1b1.tar.gz

2. Create a folder “relinux” on Desktop and extract the content from the above link to this folder.

3. To install, simply type this into a Terminal window( Read file relinux/INSTALL on Desktop for instructions):

  sudo cp -R usr etc /

4. After you have installed it, look at Desktop/relinux/usr/share/doc/relinux/README.
   Type this into a Terminal window to generate the configuration file:

  cp /etc/relinux/relinux.conf ./relinux.conf
  sed -i 's:EXCLUDES="\(.*\)":EXCLUDES="\1 '`readlink -f ./relinux.conf`'":g' ./relinux.conf

5. Install Dependencies for Relinux :

sudo apt-get install libdebian-installer4 casper ubiquity ubiquity-frontend-gtk discover-config xresprobe tree dialog

6. Copy  the file Desktop/relinux/etc/relinux/relinux/splash/splash.png to Desktop

Edit relinux.conf for customisation from Desktop/relinux/

Replace the following line

SPLASHIMAGE=/etc/relinux/relinux/splash/splash.png

 with

SPLASHIMAGE=/home/ebs/Desktop/splash.png

7. Type the following command in terminal:

 sudo relinux squashfs ./relinux.conf

8. Type the following command to prepare an iso file.

sudo relinux onlyiso ./relinux.conf

Reference Video link : http://ubuntutes.com/wp/index.php/2016/12/31/create-backup-of-installed-ubuntu-12-04-12-10-13-04-as-install-iso-using-relinux/

Make a bootable USB DRIVE(pendrive) in Linux

After Ubuntu 12 making a bootable USB drive using startup disk creator has not been smooth and has been difficult to do. So let us now see how are we going to make bootable USB drive in Ubuntu14 or later versions. Of course this can be used in other Linux platforms too.

There is a new software “Etcher” that is cross platform, open source tool in the market to burn images to SD card and USB. It’s called Etcher.

Download Etcher AppImage from the link below:
 
Once downloaded, you need to make it executable. Right click on the downloaded file and go to Properties.

And in here, check the “Allow executing file as program” option.Then double click Etcher, Click on Select image and browse to the location where you have downloaded the ISO. Etcher automatically recognizes the USB drive. You can change it if you have multiple USBs plugged in. Once it has selected the ISO and USB drive, it’ll give you the option to flash the ISO to USB drive. Click on Flash do start flashing the drive with the selected ISO.

By the end of this process you will have a bootable USB drive with your selected ISO. 

Reference and Credits: https://itsfoss.com/create-fedora-live-usb-ubuntu/

Creating a backup of installed Ubuntu(ISO image)

1. Download Relinux 0.2 from

http://sourceforge.net/projects/re-linux/?source=directory

OR

http://nchc.dl.sourceforge.net/project/re-linux/relinux_0.2.1b1.tar.gz

2. Create a folder “relinux” on Desktop and extract the content from the above link to this folder.

3. To install, simply type this into a Terminal window (Read the file relinux/INSTALL on Desktop for instructions):

$ sudo cp -R usr etc /

4. After you have installed it, look at Desktop/relinux/usr/share/doc/relinux/README.

Type this into a Terminal window to generate the configuration file:

$ cp /etc/relinux/relinux.conf ./relinux.conf

$ sed -i 's:EXCLUDES="(.*)":EXCLUDES="1 '`readlink -f ./relinux.conf`'":g' ./relinux.conf

5. Install Dependencies for Relinux :

$ sudo apt-get install libdebian-installer4 casper ubiquity ubiquity-frontend-gtk discover-config xresprobe tree dialog

6. Copy the file

Desktop/relinux/etc/relinux/relinux/splash/splash.png to Desktop

Edit relinux.conf for customisation from Desktop/relinux/

Replace the following line

SPLASHIMAGE=/etc/relinux/relinux/splash/splash.png

with

SPLASHIMAGE=/home/ebs/Desktop/splash.png

7. Type the following command in terminal:

$ sudo relinux squashfs ./relinux.conf

8. Type the following command to prepare an iso file.

$ sudo relinux onlyiso ./relinux.conf

Reference Video link : http://ubuntutes.com/wp/index.php/2016/12/31/create-backup-of-installed-ubuntu-12-04-12-10-13-04-as-install-iso-using-relinux/