Installing Common Packages by Hand


Because automated installation systems, such as EasyUbuntu and Automatix, use graphical interfaces, they cannot be used from the default Ubuntu server installation. In addition, remote logins may not support the required graphic interface. If you want to install additional multimedia support without using graphics, then you will need to install the packages by hand.

Installing Multimedia Support

Different multimedia formats need different libraries to encode and decode the formats. A variety of coder-decoder (codec) libraries are available for Ubuntu. Each of these packages is installed using apt-get install package_name. Some of these packages are located on the universe, multiverse, or plf repositories. No additional configuration steps are required.

  • MP3-MP3 is one of the most common and popular audio formats. As mentioned in Chapter 2, the sox and lame packages provide MP3 encoding and decoding support. While these tools do provide command-line support, they do not provide audio libraries. For libraries that will work with most audio players, you will need to install the ffmpeg package from the universe repository.

  • Ogg-Ogg Vorbis is an alternate audio format that is free from MP3's licensing restrictions. To support Ogg Vorbis files, you will need to install the vorbis-tools package from the restricted repository.

  • MPEG and Video-For MPEG and other video file formats, you will want to install the mjpegtools package. This multiverse package provides codecs for MPEG, AVI, QuickTime, and other video formats.

  • MPEG4-The libxvidcore4 and faad packages provide video and audio support for this file format. Both packages are found in the multiverse repository.

  • Windows Codecs-The w32codecs package provides binary support for proprietary Microsoft codecs such as WMA and WMV. This package is found in the plf repository.

  • DVD-Commercial DVD movies are encoded using a system called CSS. The libdvdcss2 permits unlicensed DVD players to view these movies. This package is found in the plf repository.

Warning 

Packages such as libdvdcss2 and w32codecs could cause legal headaches-particularly in corporate and government environments. If you have any questions here, you might want to consult legal council before installing these packages.

After you load the codecs onto the system, you will need to add plug-ins to your multimedia players so that they know the codecs exist.

  • Gstreamer-The Gstreamer interface provides multimedia support for most Gnome applications. Although there are generic plug-ins, their package naming convention is less than descriptive.

    • gstreamer0.10-ffmpeg: This package provides support for the ffmpeg package.

    • gstreamer0.10-pitfdll: Adds support for the controversial w32codecs package.

    • gstreamer0.10-plugins-bad: Support for codecs, such as WAV audio codecs, that are not as refined as other codecs. The naming convention bad denotes codecs that are still under development. They are close to production quality, but are not there yet.

    • gstreamer0.10-plugins-bad-multiverse: Support for multiverse codecs that are not as refined as other codecs. This includes faad and libxvidcore4.

    • gstreamer0.10-plugins-ugly: This package provides support for MPEG formats. While the "bad" codecs are just not refined, the "ugly" codecs may have distribution issues due to licensing restrictions or patents.

    • gstreamer0.10-plugins-ugly-multiverse: Similar to gstreamer0.10- plugins-ugly, this supports packages from the multiverse repository.

  • Xine-Xine is an alternative audio and video player to Gnome's totem player. As with the Gstreamer interface, Xine supports plug-ins. The gxine package installs the gxine base player. The libxine-main1 and libxine-extracodecs packages provide codecs.

Installing Web Support

Some multimedia formats are primarily found on the Web. This includes Macromedia Flash movies and RealNetworks audio and video streams.

Getting Flashy

Macromedia provides a Flash player for Ubuntu. Installing the flashplugin-nonfree package from the multiverse repository will actually download and install the Linux Flash player from the Adobe web site. After installing the package, you will need to run the update- flashplugin command to configure your browser.

 sudo apt-get install flashplugin-nonfree sudo update-flashplugin 

Unfortunately, the flashplugin-nonfree package is only available for PCs. As an alternative, the swf-player package provides basic SWF (Flash file) support for all Ubuntu platforms.

Note 

The swf-player package does not support all SWF versions. Newer versions of Flash animations may not play using swf-player.

Getting Real

In contrast to Flash, there are two different RealPlayer packages for Ubuntu. The realplayer package in the multiverse repository provides support for RealPlayer 8, while the PLF repository has a realplay (not realplayer) package that provides support for RealPlayer 10.

These packages configure the Firefox browser so they are automatically recognized and available for use.

Note 

RealPlayer support is only provided on the x86 architecture. If you are using a PowerPC or AMD64 system, then there is no native driver available.

Finally, you may want to have a multimedia player like Totem integrated into your web browser. Normally multimedia files are saved to disk. Having the player integrated in the browser can create a seamless user experience by automatically running the player when you click on a link. You can enable the integration by installing the totem-gstreamer-firefox- plugin package. For using Xine in Firefox, use totem-xine-firefox-plugin.

Installing Font Packages

There are a few desktop packages that you will probably want to install. The first set of packages provides different desktop fonts. These are used by everything from text menus to PDF and Postscript viewers. If an application cannot find a particular font, then it will attempt to substitute it with a different font, and the results can be ugly.

Ubuntu supports three main types of fonts: xfonts, gsfonts, and ttf. Xfonts are used by X-Windows. These bitmapped fonts are designed for specific resolutions (dpi) and can appear blocky when scaled. For example, the xfonts-100dpi package provides fonts that render best at 100dpi.

Ghostscript fonts (gsfonts) are vector-based rather than bitmapped. These may take longer to render than bitmapped fonts, but they will look smoother and scale well. These are usually used for displaying documents, word processing, and printing, but not for regular screen fonts.

The final group consists of TrueType fonts (ttf). These are also vector-based and are commonly used on Windows systems. If you receive a document in PDF or Word that has ugly or missing fonts, then you probably need to install a ttf font package.

Font definitions are relatively small and consume no system resources if they are not used. For best results, consider installing all of the available fonts for languages that you expect to encounter. This way, you won't end up rendering with poor substitutions.

Note 

The default font in most cases is called misc-fixed and is a monospaced San Serif font. When converting between graphic formats, like Postscript and PDF, missing system fonts may be replaced with bitmapped fonts, resulting in very rough text that is readable but not pretty. The technical term for drawing text with bitmapped fonts is ugly rendering.

  • Ghostscript fonts-Ghostscript is the open source Postscript rendering and viewing system. The fonts used by Ghostscript can be used by any available X-Windows application. The gv package provides the Ghostscript Ghostview program for viewing Postscript files. The gsfonts package provides Ghostscript fonts, and gsfonts-x11 makes the fonts available for X11.

     sudo apt-get install gv gsfonts gsfonts-x11 
  • International fonts-There are many different packages for providing international language support. All of the most common languages are supported, as well as some lesser- known languages. Example font packages include:

    • xfonts-intl-european provides support for most European and Latin-based languages. This includes Spanish, German, and French.

    • gsfonts-wadalab-common, gsfonts-wadalab-gothic, gsfonts-wadalab- mincho, konfont, and ttf-sazanami-mincho each provide support for Japanese.

    • Chinese is supported through a variety of font packages including ttf2pt1- chinese, ttf-arphic-ukai, ttf-arphic-uming, xfonts-cmex-big5p, xfonts-intl-chinese, and xfonts-intl-chinese-big.

    • ttf-farsiweb and ttf-paktype supplies Farsi and Urdu fonts.

    • ttf-khmeros supplies fonts for the Khmer language of Cambodia.

    • There are dozens of xfont packages (apt-cache search xfonts) for supporting most European, Asian, and Middle-Eastern languages.

  • Windows fonts-The msttcorefonts package provides the core TrueType fonts found on Microsoft systems. While this does provide true compatibility with Windows systems, there may be licensing issues.

After installing the fonts, you will need to inform applications that they exist. Fortunately, all standard applications look at the same cache directories. The command sudo fc-cache -f -v will scan and list the font directories, and update the shared font information.

Note 

If the fonts do not appear after you install them, you may have forgotten to run fc-cache.



Hacking Ubuntu
Hacking Ubuntu: Serious Hacks Mods and Customizations (ExtremeTech)
ISBN: 047010872X
EAN: 2147483647
Year: 2004
Pages: 124
Authors: Neal Krawetz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net