Trying to install a file (xf86-input-mtrack) downloaded from Github

I'm quite new to Ubuntu/Linux in general, I'm a mac user and have been able to double click/drag applications to install them.

I've recently been trying to set up some functionality on my Ubunutu 18.04 installed on my mac, and what a saga.

Read the readme, which says, use ./configure and make && makefile. I've just extracted it on my download folder... I searched on how to install something from Github, and there's no generic answer.

  1. My question is, how can I install this thing and get it onto my computer? https://github.com/p2rkw/xf86-input-mtrack#TapDragEnable

  2. which file am I supposed to make and makefile? Am I supposed to use a variable after make or just type make when I'm in the directory?

----------additional details---------

I have gone into ./configure and ./configure --help. The readme file says, the next step is to use make && makefile. I've type those commands in and a few more, but nothing happens.

I tried other ./configure commands e.g. ./configure install-sh, install-sh and this appears:

configure: WARNING: you should use --build, --host, --target
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... Invalid configuration `CC': machine `CC' not recognized
configure: error: /bin/bash ./config.sub CC failed

Solution 1:

If you'd like to save some effort and have the convenience of the APT package manager supporting you, xf86-input-mtrack is provided in Ubuntu's standard universe repository through the package xserver-xorg-input-mtrack.

Note that, except for Ubuntu 14.04, version 0.3.1 is provided, which is somewhat older than 0.5.0 at your Github link. Here's the Github readme for version 0.3.1, where you can see that TapDragEnable is still included, if you needed that in particular.

To install it:

  1. Open a terminal (press Ctrl+Alt+T).
  2. Run the following:

    sudo apt-get update
    sudo apt-get install xserver-xorg-input-mtrack
    
  3. Reboot.

Solution 2:

As pointed out by other answers: If you are solely interested in getting the software installed, using a package manager like apt is the easiest way to go.

But as this does not answer the question of how to get the software installed from a Github download, I want to clarify a possible misunderstanding and outline the most common steps to install software from Github.

It is important to note that Github is primarily hosting source code repositories. This means that what you get by clicking on the download button of a Github repository is not an executable program or installer, but the source code of the program. Some repositories provide pre-built executables at the "releases" page of the repository. You can reach this page by clicking on the "releases" label of the respective Github repository page. Pre-built executables of xf86-input-mtrack for example can be found here: https://github.com/p2rkw/xf86-input-mtrack/releases

As Github can host any kind of software (and even non-software), the ways to install applications hosted on Github vary wildly. This is the reason why there are no generic instructions on how to install software from Github.

The program you want to install is written in the programming language C. C source code is almost always intended to be compiled into an executable binary file before it can be installed. The README document refers to this procedure with the term "Building". This is why this document gives you instructions on how to build as well as how to install your program.

The commands .configure, make, make install are common steps to build and install a program written in C. Most installation guides implicitly assume that you know where and under what circumstances you need to enter these commands, which sadly is discouraging for beginners. These are the steps you have to take before you can follow the instructions in the README:

  1. Open the terminal. It will provide you with a command line where you can enter commands
  2. Type in cd /path/to/your/download, but substitute /path/to/your/download with the actual path to the folder with the source code you downloaded. Hit enter to execute the command. By pointing your computer to this directory you let it know, that the following commands to build and install shall be applied there.
  3. Now follow the instructions outlined in the README.