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

The Official Ubuntu Book, 3e: Support and Typical Problems

Although bugs in Ubuntu are typically fixed quickly, there is still the case of user error. Even if a piece of software is completely bug-free, it can be used incorrectly, be misconfigured, or otherwise not work as expected. This is perfectly normal, and the aim of this chapter is to discuss some of the most common problems faced by users and to explore how to fix or otherwise resolve these issues.
This chapter is from the book
  • The System
  • Applications
  • Multimedia
  • Networking
  • Hardware
  • System Administration
  • Other
  • Summary

DESPITE THE FACT that the Ubuntu developers work tirelessly to make the Ubuntu user experience as fluid and problem-free as possible, there are always going to be bugs, glitches, and errors in software. This is nothing unique to Ubuntu; it is a characteristic that applies to all software. Anything created by humans is subject to error.

One of the many benefits of the open source development process is that errors and bugs are typically reported, found, and fixed in a far shorter time than is usually the case with proprietary software. This ensures that the software included with Ubuntu is far more solid and stable than some proprietary alternatives.

Although bugs are typically fixed quickly, there is still the case of user error. Even if a piece of software is completely bug-free, it can be used incorrectly, be misconfigured, or otherwise not work as expected. This is perfectly normal, and the aim of this chapter is to discuss some of the most common problems faced by users and to explore how to fix or otherwise resolve these issues.

This chapter is presented in a cookbook format, presenting each problem followed by a concise solution. If you have read through the other chapters in the book and not found the solution in this chapter, the next option is to try the superb Ubuntu forums at www.ubuntuforums.org. In recent years, the forums have proved to be a gold mine of useful information. Not only do they include discussion about problems and issues that other people have, they are also laden with community-contributed how-to articles that cover a wealth of different areas.

The System

Your Ubuntu system is a little like an ecosystem. For certain things to work, other things must be already working. When you are new to any OS, it can often be a little difficult to get to know how some of these core system functions work.

In this section we cover the core system technology in Ubuntu and problems that can crop up when using it.

Ubuntu Won’t Start!

When Ubuntu first starts, the GRUB bootloader loads an OS for you. If you have only Ubuntu installed on your computer, it is loaded automatically. Otherwise, if you have more than one OS (e.g., both Ubuntu and Microsoft Windows), you can pick the relevant one from a menu. If you don’t see the menu, restart your computer, wait until you see the word GRUB, and press Enter. Now use your arrow keys to select an option.

The core chunk of software that is loaded when Ubuntu starts is the kernel, and sometimes there are a few different kernels installed on your system. On the menu, each kernel version (such as 2.6.15) has two options: the stock kernel and one called recovery mode. Try booting the newest kernel that is not a recovery mode one, and see if your system starts.

The Bootloader

If your system still fails to start, it is likely that your bootloader is broken. When you use a bootloader such as GRUB, a tiny file (called the boot sector) is copied into the very first part of your hard disk. If this file is broken or corrupted, your system often won’t boot. Don’t worry, though, you can fix this! Restart your computer, and choose the newest rescue mode option. When using rescue mode, the system starts in a limited single-user command-line mode. You can use this mode to fix any problems from the command line. In this case, you need to fix the GRUB bootloader.

To do this, load /boot/grub/menu.lst in a text editor. Unfortunately we don’t have the space to cover GRUB configuration here, so we recommend that you consult the excellent documentation on the GRUB Web site at www.gnu.org/software/grub.

Backing Up and Restoring Your Boot Sector

When GRUB runs, the boot sector part of your hard disk contains information about which OS you can boot. This sector sometimes gets corrupted due to a system crash or power loss, and then your computer won’t boot. Luckily, with a few carefully chosen commands, you can back up and restore this important sector.

Back it up using this command:

foo@bar:~$ sudo dd if=/dev/hda of=MBR-backup bs=512 count=1

The dd command copies the sector from the first disk (/dev/hda—change this to your disk) and saves it as MBR-backup in the current directory.

To restore the sector, run this command:

foo@bar:~$ sudo dd if=MBR-backup of=/dev/hda bs=512 count=1

When you boot your computer in rescue mode, you can use these commands to manage your boot sector.

Ubuntu Loads but Keeps Restarting

If Ubuntu boots beyond GRUB but keeps rebooting, here are two issues you might be running into.

Memory Problems

One possible problem is that your computer has faulty memory in it. To test this, restart your computer, and at the GRUB screen, choose Memory Test. Let this run for at least several hours. If your memory has any problems, this test will bring them up.

Wrong Kernel

Sometimes you will get the wrong kernel with your computer. This might be because you have an older computer and are using a server kernel, which does not work with early Pentium computers. To fix this, install an appropriate generic kernel.

The Ubuntu Logo Appears Corrupted or Just Looks Odd While Booting

When your system starts, it uses a special splash image to make the boot process more attractive, as shown in Figure 6-1.

If you have problems with this splash screen, you can disable it. To do this, load the /boot/grub/menu.lst file into a text editor, and scroll to the bottom of the file. You should see a line such as this:

kernel      /boot/vmlinuz-2.6.20-9-generic root=/dev/hda1 ro quiet
             splash

Just remove the splash word from the line and restart your computer. Now plain-text boot messages are displayed when the system starts.

When I Start My Computer, I Get Text Instead of a Graphical Interface

The graphical interface used in Ubuntu comes in two parts: X and GNOME. The X server is an underlying chunk of software that ensures your graphics card and monitor work, and it provides a base for GNOME to run on. The GNOME desktop uses X as an engine to create the rich desktop platform you have been using. If you start your computer and can see only text and no graphical interface, this is a problem with X.

First reboot your computer to see if that fixes the problem. When your computer has booted, if you still have the same problem, Ubuntu may have told you that it cannot start X. If you did not see this message, press Ctrl-Alt-F7 to see if you can access the graphical interface. If this does not work, there is a configuration problem with X. After several tries to start X, Ubuntu will go into failsafe mode and bring up the Screens and Graphics tool to help you reconfigure X. Choose the appropriate monitor and video card and click OK. It should restart X and you should see the login screen.

If this doesn’t work, there is likely some deeper problem. Unfortunately, we don’t have the space to cover X configuration in more detail, so please refer to http://help.ubuntu.com/community/DebuggingXAuto configuration for more help.

I Tried to Use a Word or PowerPoint Document, and the Fonts Are All Wrong

When loading Microsoft Office documents in OpenOffice.org, the documents may not look the way the author intended unless they are displayed with Windows fonts that are not on Ubuntu systems by default. While these fonts are proprietary, several of these are available online and can be downloaded with the msttcorefonts package from the multiverse repository.

When you install msttcorefonts, it automatically downloads and installs the following common Windows fonts:

  • Andale Mono
  • Arial (bold, italic, bold italic)
  • Arial Black
  • Comic Sans MS (bold)
  • Courier New (bold, italic, bold italic)
  • Georgia (bold, italic, bold italic)
  • Impact
  • Times New Roman (bold, italic, bold italic)
  • Trebuchet (bold, italic, bold italic)
  • Verdana (bold, italic, bold italic)
  • Webdings

With the installation complete, restart X to make the fonts available.

I Want to Add TrueType Fonts to My Desktop Quickly

Fonts have a huge impact on how attractive and usable your desktop is. Although Ubuntu comes with a range of high-quality fonts, you may want to install some additional fonts. This is often the case when you need to use a specific company font. On modern operating systems, most fonts come in the form of TrueType fonts. Ubuntu offers full support for TrueType fronts, and it is simple to add new fonts.

To add a font, open Nautilus and create a .fonts folder (don’t miss the .) in your home directory. Open .fonts and drag and drop your new font(s), as you can see in Figure 6-2. You may need to restart any applications, such as the GIMP, to use the new fonts.

My Fonts Don’t Look Good on My LCD Screen

If your fonts don’t look good on your LCD screen, it is possible that a quick change to your configuration may make a large difference. LCDs use what is called subpixel hinting to make the fonts look best. Open the System > Preferences > Appearance tool, and under the Font tab, choose the Rendering option that looks best on your monitor. The Details button opens a further dialog to control DPI (dots per inch), smoothing, hinting, and pixel order. Try various options until you arrive at an optimal configuration.

How Do I Install a Package?

See the section Adding and Removing Programs and Packages in Chapter 4.

How Do I Install Another Desktop Environment?

By default, Ubuntu comes with the GNOME desktop environment. Other variants of Ubuntu come with different desktops; for example, Kubuntu comes with KDE and Xubuntu with Xfce. All of these desktop environments are easy to install on the other variants, via convenient metapackages. The Ubuntu package is called ubuntu-desktop, the Kubuntu one is kubuntu-desktop, and the Xubuntu one is xubuntu-desktop.

I Want to Install an Application That Is Not in Synaptic

Although Synaptic contains a huge selection of packages, sometimes the package you need is not included. The first thing you should check is that you have enabled the additional repositories such as universe and multiverse. Open Synaptic from System > Administration > Synaptic Package Manager. Now click Settings > Repositories > Add. Ensure that all of the Components checkboxes are selected. (See http://help.ubuntu.com/community/Repositories/Ubuntu for more details.)

If you have enabled these extra repositories and your package is still not there, have a quick hunt around with a search engine to see if you can find a repository (known as a Debian or APT repository) for your package. If you find one, use the Repositories dialog box you have just played with to add the new repository, and then use Synaptic to install the package.

If no repository is available, look for a Debian package (.deb) for the application. If you find one, download it, and double-click it to install. If no Debian package exists, look for an Autopackage. (An upcoming subsection, I Downloaded an Autopackage, but I Don’t Know How to Run It, provides details about Autopackage installation.)

Finally, if all else fails, download the source code and compile it.

I Want a Local Copy of the Ubuntu Repositories

If you have a number of computers to administer or do a lot of package maintenance, having a local copy of the Ubuntu repositories can make your life a lot easier. There are two primary ways to do this: via debmirror and via rsync. Both are fairly lengthy processes to undertake, so the full recipe is hosted on the Ubuntu help wiki at http://help.ubuntu.com/community/Rsyncmirror and http://help.ubuntu.com/community/Debmirror.

The File Manager Is Painfully Slow—How Can I Make It Run Faster?

You can deactivate a number of options to make using the file manager a faster process. First, click Edit > Preferences, find the tab marked Preview, and click on it. If Show Text in Icons (the first option) is enabled, it will preview some of the contents of text documents in their icons. Set this option to Never. Next, there’s an option called Show Thumbnails. This option will preview image files as thumbnails. Set this option to Never to further improve the speed of the file manager’s browsing. If enabled, the option Preview Sound Files will make it possible to preview sound files without actually opening them. Set this to Never as well. The last option, Count Number of Items, shows how many items are within the folders listed in the directory you’re currently browsing. Set this to Never.

If you are still not satisfied with the speed of the file manager, you could check out some other file managers, such as Rox Filer or Thunar.

I Can’t See the Hidden Files and Folders in the File Manager

Files and directories that begin with a dot (such as .bashrc) are typically used to store settings and configuration details for a particular application. By default, the file manager does not show these files. So how do you view, move, and copy them? Simple. Just click View > Show Hidden Files, or press Ctrl-H, and your hidden files are displayed, as shown in Figure 6-3.

How Do I Restore Something I Deleted in the File Manager?

When you delete something in Ubuntu, the files are not deleted immediately and are instead moved to the trash. If you accidentally deleted your important report and want to avoid limb removal by your boss, open the trash by double-clicking the small trash icon in the bottom right-hand corner of the screen, and then drag your files back into the file manager. The world now returns to the happy place it was before you accidentally deleted your files.

How Can I Test Whether an .iso File Works?

Whenever you download a Linux distribution such as Ubuntu, you typically download an .iso file, a file that contains an image of a CD. You then use this file to create an installation CD for installing the distribution. After downloading the file, you may want to verify that the file you downloaded is the same as on the server. To test that you have the same file as on the server, you need to verify the .iso file. Open a terminal and run the following command:

foo@bar:~$ md5sum my_iso_file.iso

Wait a little while and Ubuntu will print a “word” that is 33 characters long. Now go to the site from which you downloaded the file, and compare this word with the md5sum given by the owner of the .iso file, usually a file named md5sums. The words should match. If they do not match, you should redownload the file and test it again.

I Downloaded an Autopackage, but I Don’t Know How to Run It

Autopackages are software packages that install on any Linux distribution, including Ubuntu. Autopackages offer a way to install software on your system that is not available via Synaptic. If you need something Synaptic can’t offer, Autopackages are an alternative.

When you find an Autopackage that you want to install, download it to your desktop. Now, right-click the package, and select Properties. In the Permissions tab, select the Execute checkbox on the Owner row. Now close the dialog box, and double-click the package.

The installation program now begins, and you can just follow the on-screen instructions.

How Do I Compile an Application?

When a distribution package is not available, the source code is always available to compile with open source applications. Compilation is the process of converting programming code into a program that you can run and use. Although it sounds like a devilishly difficult process, it is typically fairly simple.

You should first have a look on the application’s Web page, or in the INSTALL or README file included with the code, to see what software the application needs to run. When you know what is required, use Synaptic to search for the required tools. Many of the requirements will be software libraries (software that applications require to run), and these libraries typically have lib at the start of the package name. As an example, if you need to have the Ogg Vorbis audio codec installed, do a search in Synaptic for Ogg Vorbis, and libvorbis will be one of the packages. You should also install the package with -dev at the end of the name (such as libvorbis-dev). These packages allow you to compile software for that library.

The process of compiling software involves three steps: (1) configuration, (2) compilation, and (3) installation. Open a terminal, move into the directory from which you extracted the source code, and configure it:

foo@bar:yourapp$ ./configure

When you run /configure, it checks to see that you have all the required software. If it throws an error, it is likely that a required tool or library is missing. Find out what it is, and install it. Typically, configure will tell you what you need to install.

If the configure script works fine, compile the code with this command:

foo@bar:yourapp$ make

If a problem appears when compiling the software, it may be a bug or problem in the source code. It is best to refer your problem to the author of the code for further help.

If the compile process was successful, install the application with this command:

foo@bar:yourapp$ sudo make install

The software is now fully installed.

The Desktop Has Hung—What Do I Do?

In the rare situation that the desktop hangs, first try to restart it by pressing Alt-Ctrl-Backspace. This kills and restarts the X server. Another method of killing the X server is to press Alt-F2 to jump to a terminal, log in, and then run this command:

foo@bar:~$ /etc/init.d/gdm stop

This command stops the graphical login screen, which in turn stops the X server. You can restart it with this command:

foo@bar:~$ /etc/init.d/gdm start

My Screen Resolution Is Wrong

If your screen resolution is incorrect, click System > Administration > Screens and Graphics, and select a new resolution from the combo box.

How Can I Automatically Log In Without Having to Enter My Login Details?

If logging in is a drag for you, click System > Administration > Login Screen, and select the Login a User Automatically on First Boot checkbox. In the checkbox below it, select the user who should be logged in automatically.

Be careful when automatically logging in—anyone will have access to the computer when it is started. If you would prefer that certain people not have access to the computer, automatically logging in may not be such a good idea.

I Tried to Upgrade My System, but I Got an Error

If you get an error when you try to install some software or upgrade your computer, the package manager may have tied itself in a knot. To try to resolve this, open a terminal, and run the following commands:

foo@bar:~$ sudo apt-get update
foo@bar:~$ sudo apt-get -f install

The first command updates your package list, and the second command tries to fix your package manager. If this is successful, the packages that failed will be installed correctly.

In addition to these commands, you can reconfigure any packages that have not yet been configured by running this command:

foo@bar:~$ sudo dpkg --configure --pending

I Am Running Out of Disk Space—How Do I Free Up Some Space?

If you are concerned that you may be running out of disk space, you can use a few techniques to clear some room. Before you do anything, you should get a report of how much disk space is available. Under the Applications > Accessories menu you will find a tool called Disk Usage Analyzer. After it has loaded, click on the Scan Home button. This will show you a graphical circular chart.

The center circle represents the root folder being scanned, in this case, your home directory. Each directory under that shows up as a ring. The larger the way around the ring, the greater the percentage of the total it is using. To find out specifically which directory is referred to, run your mouse over that segment. With the diagram, you can now explore to find the largest files and folders and clean them out as needed. Another task you can do is to clean out your package cache. Every time a package is downloaded with Synaptic or with the automatic upgrade manager, it is stored in /var/cache/apt/archives/. You can clean out these packages without affecting your system. Just run the following command:

foo@bar:~$ sudo apt-get clean

I Deleted Something in the File Manager, but I Don’t See the Extra Disk Space

When you delete files in the file manager, they are copied to the trash. To finally delete them, right-click the trash in the bottom right-hand corner of the screen, and click Empty the Trash. A dialog box pops up asking you to confirm the deletion. Click the Empty the Trash button, and the files are removed.

Another Version of Ubuntu Is Out—How Do I Upgrade to It?

If a new version of Ubuntu is released, the update manager will notify you via an upgrade notification pop-up bubble. To upgrade, click the Upgrade button, and follow the instructions.

If you want to manually upgrade, you can also use the update manager. To update to an unstable version, run the update manager with the -d option, as follows:

foo@bar:~$ sudo update-manager -d

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020