CyberKeeda In Social Media
Showing posts with label UBUNTU. Show all posts
Showing posts with label UBUNTU. Show all posts

Ubuntu 18.04 Error : We cannot detect a running copy of GNOME on this system.

You might be trying to install GNOME-Shell Extension from browser and got an error like "We cannot detect a running copy of GNOME on this system, so some parts of the interface may be disabled"

Fix : Install GNOME Shell Integration plugin

How to install it, lets follow the below steps.

For Chrome :


  • Chrome Web Store --> Search for "Gnome shell integration" --> Add to Chrome
  • Open Terminal and install chrome-gnome-shell


sudo apt-get install chrome-gnome-shell
  • Restart Browser and try to install additional Gnome extensions.














For Firefox :
  • Firefox Add On --> Search for "Gnome shell integration" --> Add to Firefox --> Followup the instructions asked by Firefox to add it.

  • Restart Browser and try to install additional Gnome extensions.















Read more ...

How to install latest version of docker-compose on Ubuntu 18.04



Docker Compose requirements:

  • Pre-installed docker engine.


One liner command to install docker compose.

$  sudo curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

    Verify the installation by checking installed docker compose version.

    $  docker-compose --version
       
      Do let me know your installed version in comments, mine is 

      docker-compose version 1.24.0, build 0aa59064

      Read more ...

      How to install Jenkins on Ubuntu 18.04 Bionic


      Here we go, proceed with the below steps.


      • Mandatory requirement : Jave aka OpenJDK.
      $  sudo apt install openjdk-8-jdk
      Once installed verify the installation using the below command.
      $  java -version

      • Installing Jenkins.

      Official Ubuntu ships with older versions of jenkins, why lag behind let's add the new sources to install the latest version.

      • Add repository key first.
      $  wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
      • Once you got an OK confirmation, let's proceed to add debian package repository address to the our server's source list.
      $  sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
      • Now we are almost ready to install jenkins, lets make an update now
      $  wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
      • Here we go, install jenins now
      $  sudo apt install jenkins

      • Start Jenkins

      $  sudo systemctl start jenkins

        Access Admin Password to login to Jenkins UI.
        Open CLI, hit below cat command and grab the initial login password.

        $  sudo cat /var/lib/jenkins/secrets/initialAdminPassword

        Login to UI.

        $  http://<Your Jenkins Server IP>:8080/

          Further steps are self explanatory, install suggested plugins and change the initial admin password with your. 







          Read more ...

          Ubuntu Fix : Could not open lock file /var/lib/dpkg/lock-frontend - open (2: No such file or directory)


          Full Error :

          E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

          Fix :

          $ ps aux | grep -i apt
          : Find the corresponding PIDs, Kill using ( kill -9 <PID> and check if error went.

          An alternate for the above is to run below command.

          sudo killall apt apt-get
          
          Read more ...

          How to install and configure Docker-CE on Ubuntu



          Installation.

          • Begin with updating your system packages and remove other versions of docker and it's dependencies.
          $  sudo apt-get remove docker docker-engine docker.io containerd runc
          $  sudo apt-get update
          • Prepare system to download and install docker-ce from official repositories over https.
          $  sudo apt-get install \
              apt-transport-https \
              ca-certificates \
              curl \
              gnupg-agent \
              software-properties-common
          $  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          $  sudo apt-key fingerprint 0EBFCD88

          $  sudo add-apt-repository \
             "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
             $(lsb_release -cs) \
             stable"

          • Once docker repository is enabled, proceed ahead to install Docker-CE ( Community Edition.
          $  sudo apt-get update
          $  sudo apt-get install docker-ce docker-ce-cli containerd.io

          Now docker-ce has been installed, lets start the docker daemon and enable it on boot.
          $  sudo systemctl start docker
          $  sudo systemctl enable docker
          • To verify the status of  docker, run the below command.
          $  sudo systemctl status docker











            • In case, if you want to check your installed docker version.
            $  sudo docker -v

            Run Docker commands without sudo

            By default managing Docker requires administrator privileges. If you want to run Docker commands as a non-root user without adding sudo within yoir command you need to add your user to the docker group which is created during the installation of the Docker CE package. Add your user to docker group by below command.

            $  sudo usermod -aG docker $USER

            Logout- Login to reflect the changes.

            Read more ...

            How to Create Windows 10 Bootable USB on Ubuntu or any Linux desktop



            Are you looking for any desktop application on Ubuntu to create a bootable pendrive/flash drive with Windows.

            WoeUSB is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD.


            WoeUSB  package contains two programs:
            • woeusb: A command-line utility that enables you to create your own bootable Windows installation USB storage device from an existing Windows Installation disc or disk image
            • woeusbgui: A GUI wrapper of woeusb based on WxWidgets


            So, lets know how install the WoeUSB on Ubuntu 
            Official & updated Installation and Github link : Here
            #    sudo add-apt-repository ppa:nilarimogard/webupd8
            #    sudo apt update
            #    sudo apt install woeusb
            In case if you wish to remove that woeusb PPA, remove it from the bellow command.
            #    sudo add-apt-repository --remove ppa:nilarimogard/webupd8
            #    sudo apt-update
            Now, WoeUSB has installed on my Ubuntu, though the interface is self explanatory still let's move ahead and know how to use it.

            Open WoeUSB application and choose the USB drive and your windows iso kept within your Ubuntu.
            Once you are done click install and you are done, you can monitor the progress on screen.


            In case you receive a error dialogue like below, follow the below steps

            Find your USB drive's mounted file system and block by running lsblk on terminal and find your device their.
            To filter, look for size of your USB or name of the USB drive, below screen shot gives the picture of my USB drive ( 8 GB ) size, and named as /dev/sdc
            #    lsblk

            So we will unmount that partition out of the system.
            Notice there  /dev/sdc is the full size of my USB disk, but the data is witten on it's /dev/sdc1 partition.
            My USB disk is  /dev/sdc, ensure your USB is unmounted with the following command. Replace /dev/sdc1 with your own partition name.
            #    sudo umount /dev/sdc1
            Now try again from the   WoeUSB desktop application.
            In case if you are willing to do the same through woeusb CLI utility, here is the way.
            #    sudo woeusb -v --device /home/kunal/windows-10.iso /dev/sdc
            /home/kunal/windows-10.iso  :  Replace it with your iso location.
            /dev/sdc : replace it with your USB drive ( check it from lsblk )
            Read more ...

            How to install Sublime text editor on Ubuntu


            Sublime text editor is one of the popular text editor for code, markup and prose that's the line it says on it's official website  and most of the users believe the same.
            So let's know how to install it on your Ubuntu Box.

            I'm using Ubuntu 18.04  while writing this blog during installation.

            Install the GPG key


              #  wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

            Make apt work using https also


              #  sudo apt-get install apt-transport-https

            Select the channel to use ( Recommended Stable )
            For Stable release use the below command.
              #  echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list 

            For Development release use the below command.
              #  echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

            Update apt sources and install Sublime Text


              #  sudo apt-get update #  
              #  sudo apt-get install sublime-text

            To remove/uninstall sublime text editor  use the below command


              #  sudo apt-get remove sublime-text && sudo apt-get autoremove #  


            Meanwhile you can anytime install it from Ubuntu Software Center,  it's also enlisted there.

            Official Installation Link : Here


            Read more ...

            How to send emails from Linux terminal and shell scripts using GMAIL



            GMAIL SMTP Configuration on Linux Box.


            Video Tutorial.



            ###########  Use GMAIL SMTP server to send mails ##################


            # yum install -y mailx

            Lets tell google we gonna send emails from other devices also.

            https://myaccount.google.com/lesssecureapps

            Edit

            # vim /etc/mail.rc

            #----------- add the below lines and append as per your credentials.


            set smtp=smtps://smtp.gmail.com:465
            set smtp-auth=login
            set smtp-auth-user=USERNAME@YOURDOMAIN.COM
            set smtp-auth-password=YOURPASSWORD
            set ssl-verify=ignore
            set nss-config-dir=/etc/pki/nssdb/

            Update the gmail account credentails over here and save

            # Now we are all done , we will be using gmail to send email from our linux box.

            echo "Relay Test" | mail -v -s "Relay test" anyworkingemailid@anydomain.com

            anyways...  you send it to multiple domains now..

            Rememeber ... From email id will be the same that you have configured within /et/mail.rc file

            # Thanks


            Read more ...

            How to install MS Paint alternative Pinta on Ubuntu 18.04



            Missing MS Paint and it's user friendly featues on Ubuntu, Pinta can address almost all your needs.

            Pinta is a Open Source, easy-to-use open-source drawing and image editing program designed for entry-level users. It provides users with a simple yet powerful way to draw and edit images on Linux, Mac, and Windows.

            Features:

            Drawing Tools
            Effects (Blur, Glow, Warp etc)
            Image Adjustments (Auto Level, Black, and White, Sepia etc)
            Layers
            Unlimited undo/redo

            And much more...


            Here is the video tutorial for the installation.




            Read more ...

            How to create WiFi Hotspot on Ubuntu 18.04




            You might be looking to turn your Ubuntu 18.04 Laptop into to WiFi Hotspot to share your Broadband Connection/Internet Connection across you for your other devices ( Mobile, Ipads, etc ).

            So you are just a few clicks away to achieve it, believe me it's as easy as you do within your smartphone.

            Steps.

            Click on the top right buttons and click on the WiFi option. in the dropdown select Wifi-settings.





            Click on 'Turn On Wi-Fi ' option from the button.




            Click on the extra options ( 3 dots ), now Click on 'Turn On Wi-Fi Hotspot'





            The Hotspot is now active!!

            you can find the password and details.

            Now any of your devices can discover this Hotspot and connect to it with the given password.



            Video Tutorial:



            Read more ...

            How to Change Ubuntu 18.04 Lock Screen look like MacOS




            Here is the Video tutorial for the same.







            Read more ...

            How to Upgrade Ubuntu 16.04 to Ubuntu 18.04


            For Linux Desktop users, this is the trending stuff all going into the Linux World.
            Of Course there are a hundreds of Linux distros, but Ubuntu is one of the popular one as per distrowatch.

            Ubuntu provids two types of releases

            • Standard release. 
            • Long Term Support (LTS) release. 


            So what's the difference between these two ?
            All it's support provided by Ubuntu aka Canonical
            Standard releases for approx 1 year while Long Term Support is useful for approx 5 years.

            Ubuntu 18.04 is an LTS release will be supported till 2023. 

            If you are also a Ubuntu Desktop Fan and running Ubuntu 16.04, why wait let's upgrade.

            But if you are running ubuntu 16.04 within your server, i recommend you to wait for a minimum of two months from release date.

            Backup your data first.

            We strongly recommended to backup all your important data from your Desktop to a remote location or into some external storage.

            Update all your system packages.

            sudo apt-get update
            sudo apt-get upgrade

            Install Update Manager 

            sudo apt-get get install update-manager-core
            
            Once the update-core-manager package has been installed, let's ensure it's config file is set to LTS
            Open the file /etc/update-manager/release-upgrades file and make sure Prompt value is set to lts like below.
            Prompt=lts

            Upgrade your  Ubuntu from 16.04 to 18.04

            Once you are done with the updation of file /etc/update-manager/release-upgrades updation , you are all set to upgrade your UBuntu to newer version of LTS that is 18.04.
            sudo do-release-upgrade -d 
            Once you have executed the upgrade command, you must stick to your computer for some more few minutes.
            It will ask for few inputs from your side,  follow the prompts and choose the default ones, the entire upgrade time duration is totally dependent on your internet connectivity speed.

            Once completed,  reboot your System and verify your Ubuntu Version.

            lsb_release -a
            You must see something like below


            Distributor ID: Ubuntu
            Description: Ubuntu 18.04 LTS
            Release: 18.04
            Codename: bionic
            

            Read more ...

            Installation of Apache Tomcat on Ubuntu





            Steps.
            • Download and install OpenJDK package for java ( Mandatory )
            • Download Tomcat tarball from Official Tomcat Webpage
            • Untar / Unzip the tarball.
            • Make a directory specific for tomcat and it's relevant files
            • Move tomcat files to specific tomcat directory
            • Locate the startup.sh and shutdown.sh file in order to start/stop

            Here we are about to download and install Tomcat 8 on CentOS 6.8

            Install OpenJDK to fulfill java requirement.
            ## sudo apt-get instal openjdk*
            Make a directory specific for Tomcat.
            ## sudo mkdir /opt/tomcat
            Download Apache Tomcat from here official website 

            Move the downloaded tarball apache-tomcat-x.xx.x.tar.gz into /opt/tomcat

            ## sudo mv  apache-tomcat-8.5.13.tar.gz /opt/tomcat/
            Unzip the tarball
            ## tar -xvf apache-tomcat-8.5.13.tar.gz
            After unzipping the tarball there would be something folder named as apache-tomcat-8.xx.xx

            Toggle into unzipped directory

            ## cd /opt/tomcat/apache-tomcat-8.xx.xx/bin/
            Look for file startup.sh and shutdown.sh

            # Start tomcat using the startup script

            ## ./startup.sh
            Stop the same from.

            ## ./shutdown.sh

             Once you toggle into unzipped tomcat parent directory below are the sub directories that has a significance value and it's is responsibility.
             Lets go through the Apache Tomcat Directory and know why they exists,


            bin  ==> It contains all binary and script files for running tomcat
            lib  ==> Contains shared library files used by tomcat
            conf ==> Contains configuration files such as port, directories etc
            logs ==> Contains various log files related to tomcat, ex -- catalina.out
            temp ==> Conatins temp files associated with tomcat 
            webapps ==> Important folder,application war files are dumped over here only
            work ==> If application contain any jsp then jsp is translated and converted into servlet its stores here.

            Tomcat looks for multiple environment variables to be defined in order to run, these are enlisted below.
            • CATALINA_HOME
            • CATALINA_BASE
            • CATALINA_TMPDIR
            • JRE_HOME/JAVA_HOME
            • CLASSPATH
            The mandatory environment variable that are supposed to defined in order to run Tomcat.


            CATALINA_HOME
            1. This one is the most important Environment variable that needs to be defined in order to run multiple instances of tomcat within same host.
            2. This directory defined must point to the main tomcat instance which contains all extracted binary data including the bin and lib directory
            3. So based on CATALINA_HOME we will get lib and bin directory
            CATALINA_BASE
            Based on above variable, server uses conf, logs, webapps, work folder





            Read more ...

            How to use Rsync behind proxy



            Usually one needs to export proxies url/ip in order to upload/download content while running behing proxy with shell or any terminal sessions.

            Please keep in mind even exporting  http_proxy and https_proxy , rsync will not work.



            cybeerkeeda@Linux-Maniac:~ export rsync_proxy=xxx.xxx.xx.xx:yyyy

            Do replace rsync_proxy=with_your_proxy_url:port
            Read more ...

            Ubuntu: Stop pdf to open with default ImageMagick

            Surprisingly after migrating from Unity to Cinnamon DE, i found a very annoying and strange behaviour or my default  application  for PDF .

            Instead of Document Viewer, it's using ImageMagick to open each PDF document, though i have adobe reader within my Ununtu 16.04, but it's not ready to leave ImageMagick at all.

            So now , as always our friend is Terminal, follow the below steps to get rid of ImageMagick.


            • edit the file   ~/.config/mimeapps.list

            Now remove the lines that associates PDF to imagemagick in the file:

            • image/pdf=display-im6.desktop
            • image/pdf=display-im6.q16.desktop;display-im6.desktop;
            I have performed these steps within my Ubuntu 16.04, hope this gonna work for you too.

            Read more ...

            Ubuntu : Touchpad and right click not working on Lenovo ideapad 320-15ISK


            So these are the problems I encountered after a fresh Ubuntu 16.04 installation on my new Lenovo ideapad 320-15ISK.

            • Strange confusion between right and left click ( functioning opposite ).
            • Couldn't drag any window from touchpad.
            • Right click not working..seems to be disabled.


            So below is the code snippet that work like a charm for me.

            Do open the below file from terminal.

            cyberkeeda@Linux-Maniac:~$ gedit /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf 

             Copy paste the below snippet at the top of the file.

            Section "InputClass"
                Identifier "touchpad catchall"
                Driver "synaptics"
                MatchIsTouchpad "on"
                MatchDevicePath "/dev/input/event*"
                Option "TapButton1" "1"
                Option "TapButton2" "2"
                Option "TapButton3" "3"
                Option "ClickPad" "true"
                Option "EmulateMidButtonTime" "0"
                Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
            EndSection



            Save and restart your system, hopefully everything must work now.

            Thanks to the mint forum


            Read more ...
            Designed By Jackuna