Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

Working with Windows Programs

Although Linux offers an increasingly compelling platform for the desktop, some situations arise when there is just no alternative other than an application written for Windows. This is generally the case with specific business applications, some educational tools, and many games. Luckily, there is a way you can run many of these applications on your Ubuntu desktop.

For more than fifteen years, the Wine project team members have been working to create a free way to run Windows applications on Linux. While not every application works perfectly, and some don’t work at all, the number of programs that do work in Wine has dramatically increased and continues to do so. However, it is recommended that you thoroughly test the applications you want to run in Wine before you use them for important work, and if you run into trouble, try consulting help resources, use virtualization to run Windows on top of Ubuntu, or search for a different application to use.

Install the Wine package from the Ubuntu Software Center or simply double-click an .exe file, and you will be prompted to install the package. You can configure Wine by searching for Wine Applications in the Applications Dash after clicking the Applications icon in the Launcher. Your C:\ drive will appear in your Places menu for easy access, and you will be able to uninstall Wine from the Ubuntu Software Center.

Running Applications

To run an application, simply double-click on the install .exe file. Once installed, the program should appear in your menu under Applications > Wine.

Installing Software from PPAs

Sometimes software is not available in the Ubuntu repositories; perhaps it is too new, perhaps there is a new version available, or perhaps it is software that no one has had the opportunity to build and get approved for inclusion in the Ubuntu repositories. You can often find this software in a Personal Package Archive, or PPA. The main Launchpad page for PPAs says, “Personal Package Archives (PPA) allow you to upload Ubuntu source packages to be built and published as an apt repository by Launchpad” (see https://launchpad.net/ubuntu/+ppas).

In short, a PPA is a small repository that contains software that is not found in the main Ubuntu repositories, perhaps for one of the reasons listed earlier or for other reasons. If a software package or version you want to install is not available from the main Ubuntu repositories, use your Web browser to search the main Launchpad site for the software and see if a PPA exists.

For our example, we install a bleeding-edge testing version of LibreOffice. Unless you absolutely need something offered from a PPA, we suggest you stick with packages from the Ubuntu repositories.

To add the PPA to your system, make a note of its location from the specific PPA’s Web page in Launchpad. In this case, the PPA is at ppa:libreoffice/ppa, as seen in Figure 4-10..

Figure 4-10. You can find technical details and installation instructions on all PPA pages.

The easiest way to add the PPA is to use the Terminal. Enter the following at the command line to add the LibreOffice PPA and to update your package manager’s listing.

$ sudo add-apt-repository ppa:libreoffice/ppa
$ sudo apt-get update

Then, you can access the contents of the PPA from your preferred package manager: Ubuntu Software Center, Synaptic, the command line, and so on.

Compiling Software from Source

Some software cannot be found in any repository. The traditional way of installing software on Linux works just as well on Ubuntu. Download your software and put it in an otherwise empty directory. Sometimes, it will include installation instructions. If so, follow them. Most instructions will be the same as those listed here.

Before you can install a source code package, it must be compiled into a binary that your computer can run. For that, you need to install some packages that are not included by default. All you should need is included as a dependency of one package. Install it, and you should be all set.

$ sudo apt-get install build-essential

Next, browse to the directory where you placed the downloaded source code. It was most likely provided as a compressed archive, with a filename extension like tar.gz or tar.bz2. Decompress the archive with the appropriate command, depending on the filename extension:

$ tar -xvf file.tar.gz
$ tar -xvf file.tar.bz2

Next, make the package. This step checks to ensure you have the required dependencies installed and will tell you if you don’t—if not, you need to install them separately, hopefully using Synaptic or via the command line with apt. It will also build the package from source code into something installable.

$ make

Next, install the package. The traditional way is to use:

$ sudo make install

And although this works, there is a better method. Using make install will install the package, but it will not use your package manager. If you ever want to remove the package from your system, it can be quite a chore to figure out how. Instead, install the following:

$ sudo apt-get install checkinstall

and use it to install the software, which, like any software installed from an official repository, cannot be removed using your package manager.

$ sudo checkinstall

Summary

In this chapter we looked at a variety of advanced subjects related to running and managing your Ubuntu system. Installation, removal, and upgrade of software using the Ubuntu Software Center and other options were discussed. We also looked at the installation and use of several different types of hardware devices. We perused some of the methods of accessing remote files and mentioned the powerful Ubuntu terminal and the need for learning how to back up your data regularly. Finally, we looked at a possibility of running certain programs written for Microsoft Windows under Ubuntu and even compiling software from source code.

  • + Share This
  • 🔖 Save To Your Account