Tabla de Contenidos
preguntas localizacion
9. Which of the following commands tells the X server to accept connections from penguin.example.com?
A. xhost +penguin.example.com B. export DISPLAY=penguin.example.com:0 C. telnet penguin.example.com D. xaccess penguin.example.com E. ssh penguin.example.com
12. You manage a computer that’s located in Los Angeles, California, but the time zone is misconfigured as being in Tokyo, Japan. What procedure can you follow to fix this problem? (Select two.)
A. Run hwclock –systohc to update the clock to the correct time zone. B. Delete /etc/localtime, and replace it with an appropriate file from /usr/share/zoneinfo C. Edit the /etc/tzconfig file so that it specifies North_America/Los_Angeles as the time zone. D. Edit /etc/localtime, and change the three-letter time zone code on the TZ line. E. Use the tzselect program to select a new (Los Angeles) time zone.
13. You’re configuring a Linux system that doesn’t boot any other OS. What is the recommended time to which the computer’s hardware clock should be set?
A. Helsinki time B. Local time C. US Pacific time D. UTC E. Internet time
14. You’ve developed a script that uses several Linux commands and edits their output. You want to be sure that the script runs correctly on a computer in Great Britain, although you’re located elsewhere, since the output includes features such as currency symbols and decimal numbers that are different from one nation to another. What might you do to test this?
A. Enter the BIOS, locate and change the location code, reboot into Linux, and run the script. B. Edit /etc/locale.conf, change all the LC_* variables to en_GB.UTF-8, and then reboot and run the script. C. Type export LC_ALL=en_GB.UTF-8, and run the script from the same shell you used to type this command. D. Ty p e locale_set Great_Britain, and run the script from the same shell you used to type this command. E. Ty p e export TZ=:/usr/share/zoneinfo/Europe/London, and run the script from the same shell you used to type this command.
15. Which character set encoding is the preferred method on modern Linux systems?
A. UTF-8 B. ASCII C. ISO-8859-1 D. ISO-8859-8 E. ATASCII
respuestas:
Chapter 6: Configuring the X Window System, Localization, and Printing 1.
A. On most Linux systems, some runlevels don’t run X by default, so using one of them
along with the startx program (which starts X running) can be an effective way to quickly test changes to an X configuration, making option A correct. The telinit program changes runlevels, which is a lengthy process compared to using startx , so option B is incorrect. Unplugging the computer to avoid the shutdown process is self-defeating because you’ll have to suffer through a long startup (if you use a non-journaling filesystem), and it can also result in data loss. Thus, option C is incorrect. The startx utility doesn’t check the veracity of an X configuration file; it starts X running from a text-mode login, making option D incorrect. Reconfiguring an X server does not normally require network access; the X server runs on the computer at which you sit. Thus, option E is incorrect. bapp01.indd 534 bapp01.indd 534 11/12/12 12:16 PM 11/12/12 12:16 PM Appendix A Answers to Review Questions 535 2.
D. The
XF86Config and xorg.conf file design enables you to define variants or multiple components and easily combine or recombine them as necessary, using the structure specified in option D. Options A, B, and C all describe fictitious structures. Option E is incorrect because the X.org-X11 and XFree86 configuration files use a text-mode structure, not a binary structure. 3.
C. The vertical refresh rate range includes a maximum value, but that value may be reduced
when the resolution and vertical refresh rate would demand a higher horizontal refresh rate than the monitor can handle. Thus, option C is correct. Since the resolution affects the maximum refresh rate, option A is incorrect. The color depth is irrelevant to resolution and refresh rate calculations, so option B is incorrect. The computations shown in options D and E are bogus, making these options incorrect. 4.
E. Option E describes the correct location for this option. The
ServerLayout section (referenced in option A) combines all the other options together but doesn’t set the resolution. The Modeline option in the Monitor section (as described in option B) defines one possible resolution, but there may be several Modeline entries defining many resolutions, and there’s no guarantee that any of them will be used. The Modeline option doesn’t exist in the Device section (as suggested by option C), nor is that section where the resolution is set. There is no DefaultResolution section (as referenced in option D). 5.
B. By maintaining fonts on one font server and pointing other X servers to that font
server, you can reduce the administrative cost of maintaining the fonts on all the systems, so option B is correct. Font servers don’t produce faster font displays than X’s local font handling; if anything, the opposite is true. Thus, option A is incorrect. XFree86 4. x supports TrueType fonts directly, so option C is incorrect. Converting a bitmapped display into ASCII text is a function of optical character recognition (OCR) software, not a font server, so option D is incorrect. Neither X core fonts nor a font server handles font smoothing; for that, you need Xft. Thus, option E is incorrect. 6.
C, E. XDMCP servers are typically launched either from a system startup script or by
init (as specified in /etc/inittab ), as described in options C and E. The XDMCP server then starts X. The Start folder mentioned in option A is a Windows construct, not a Linux construct. The ~/.xinitrc script mentioned in option B is an X login script used when starting X from the command line via startx ; it’s not used to automatically start X when the system boots. A boot manager, as described in option D, launches the kernel; it doesn’t directly start X, so option D is incorrect. 7.
E. The XDM greeting is a resource set in the
/etc/X11/xdm/Xresources file, so option E is correct. XDM doesn’t offer many options on its main screen and certainly not one to change its greeting, as described in option A. The kernel doesn’t directly handle the login process, nor does it pass options directly to XDM, so option B is incorrect. Although the xorg.conf file mentioned in option C is real, this file provides no XDM configuration options because XDM is a separate program from the X server. There is no standard xdmconfig program, as mentioned in option D. bapp01.indd 535 bapp01.indd 535 11/12/12 12:16 PM 11/12/12 12:16 PM 536 Appendix A Answers to Review Questions 8.
C. KDM and GDM add many features, one of which is a menu that enables users to select
their desktop environment or window manager when they log in rather than specifying it in a configuration file, as option C states. Option A describes one of the advantages of the Secure Shell (SSH) as a remote-access protocol. Option B describes a feature common to all three XDMCP servers. Option D describes the way both KDM and XDM function; GDM is the one that presents username and password fields in series rather than simultaneously. Although a failure of X to start usually results in a fallback to a text-mode login, this feature is not provided by the XDMCP server, so option E is incorrect. 9.
A. The
xhost command controls various aspects of the local X server, including the remote computers from which it will accept connections, making option A correct. Option B sets the DISPLAY environment variable, which doesn’t directly affect the X server (it does tell X clients which X server to use). Option C initiates a text-mode remote login session with penguin.example.com . Option D’s xaccess is a fictitious program. Although logging into penguin.example.com via ssh may also initiate an X tunnel, this isn’t guaranteed, and such a tunnel doesn’t cause the local X server to accept direct connections from the remote computer, so option E is incorrect. 10.
A. As stated in option A, GNOME, KDE, and other user programs often override the
keyboard repeat settings in the X configuration file. Option B has it almost backward; most Linux distributions have abandoned XFree86, and therefore its XF86Config file, in favor of X.org-X11 and its xorg.conf file. Option C is pure fiction; xorg.conf settings apply to all varieties of keyboards, and there is no standard usbkbrate program. Although some keyboards do have hardware switches, they don’t affect X’s ability to control the keyboard repeat rate, contrary to option D. Although you can set a keyboard’s nationality in xorg.conf , this option is independent of the keyboard repeat rate settings, so option E is incorrect. 11.
C, E. The Orca and Emacspeak programs both provide text-to-speech conversion facilities,
so options C and E are both correct. Braille is a form of writing that uses bumps or holes in a surface that can be felt by the reader. Although Linux supports Braille output devices, the question specifies computer-generated speech, which Braille is not, so option B is incorrect. SoX (option A) is an audio format converter, but it won’t convert from text to speech. The talk program (option D) is an early Unix online text-mode “chat” program, but it has no built-in speech synthesis capabilities. 12.
B, E. Time zones are determined by the
/etc/localtime file, so replacing that one with the correct file (a selection is stored in /usr/share/zoneinfo ) will fix the problem, making option B correct. (You may also need to edit /etc/timezone or some other file to keep automatic utilities from becoming confused.) Utilities such as tzselect will make these changes for you after prompting you for your location, so option E is also correct. The hwclock program mentioned in option A reads and writes data from the system’s hardware clock. Although it relies on time zone data, it can’t adjust your system’s time zone itself. There is no standard /etc/tzconfig file, although the tzconfig program, like tzselect , can help you set the time zone. Thus, option C is incorrect. The /etc/localtime file is a binary format; you shouldn’t attempt to edit it in a text editor, making option D incorrect. bapp01.indd 536 bapp01.indd 536 11/12/12 12:16 PM 11/12/12 12:16 PM Appendix A Answers to Review Questions 537 13.
D. Linux, like Unix, maintains its time internally in Coordinated Universal Time (UTC),
so setting the computer’s hardware clock to UTC (option D) is the recommended procedure for computers that run only Linux. Although Linus Torvalds spent time at the University of Helsinki, Helsinki time (as in option A) has no special place in Linux. Local time (as in option B) is appropriate if the computer dual-boots to an OS, such as Windows, that requires the hardware clock to be set to local time, but this is the second-best option for a Linux-only system. Option C’s US Pacific time, like Helsinki time, has no special significance in Linux. Internet time (option E) is an obscure way to measure time that divides each day into 1,000 “beats.” It’s not a time zone and is not an appropriate way to set your hardware clock. 14.
C. The
LC_ALL environment variable (option C), when set, adjusts all the locale ( LC_* ) variables, so setting this and then running the script will make the programs that your script uses work as if on a British computer. The BIOS has no location code data, so option A is incorrect. There is no standard /etc/locale.conf file, so option B is incorrect. There is no standard locale_set utility, so option D is incorrect. Although setting the TZ environment variable, as in option E, will set the time zone for your local shell to that for Great Britain, this won’t affect the sort of text formatting options noted in the question. 15.
A. The Unicode Transformation Format 8 (UTF-8) standard can encode characters for just
about any language on Earth, while looking just like ordinary ASCII to programs that only understand ASCII. Thus, UTF-8 (option A) is the preferred method for character encoding when a choice is possible. ASCII (option B) is an old standard that’s adequate for English and a few other languages, but it lacks some or all characters needed by most languages. ISO-8859 (options C and D) is a standard that extends ASCII, but it requires separate encodings for different languages and so is awkward when a computer must process data from multiple languages. ATASCII (option E) is a variant of ASCII used in the 1980s by Atari for its home computers; it’s obsolete and inadequate today. 16.
E. The smart filter makes a print queue “smart” in that it can accept different file types
(plain text, PostScript, graphics, and so on) and print them all correctly, as in option E. Font smoothing is useful on low-resolution computer monitors, but not on most printers, and adding font smoothing is not a function of a smart filter, so option A is incorrect. A smart filter doesn’t detect confidential information (option B) or prank print jobs (option D). The lpr program can be given a parameter to email a user when the job finishes (option C), but the smart filter doesn’t do this. 17.
B, D. The job ID (option B) and job owner (option D) are both displayed by
lpq . Unless the application embeds its own name (option A) in the filename, that information won’t be present. Most printers lack Linux utilities to query ink or toner status (option C); certainly lpq can’t do this. Although knowing when your job will finish printing (option E) would be handy, this information is well beyond lpq ’s capabilities to provide. 18.
C. The
lprm command (option C) deletes a job from the print queue. It can take the -P queue option to specify the queue and a print job number or various other parameters to specify which jobs to delete. BSD LPD, LPRng, and CUPS all implement the lprm command, so you can use it with any of these systems, making option A incorrect. Option bapp01.indd 537 bapp01.indd 537 11/12/12 12:16 PM 11/12/12 12:16 PM 538 Appendix A Answers to Review Questions B presents the correct syntax but the wrong command name; there is no standard lpdel command. The cupsdisable command can be used to disable the whole queue, but not to delete a single print job, so option D is incorrect. Because option C is correct, option E obviously is not. 19.
B. PostScript is the de facto printing standard for Unix and Linux programs, as specified
in option B. Linux programs generally do not send data directly to the printer port (option A); on a multi-tasking, multi-user system, this would produce chaos because of competing print jobs. Although a few programs include printer driver collections, most forgo this in favor of generating PostScript, making option C incorrect. Printing utilities come standard with Linux; add-on commercial utilities aren’t required, so option D is incorrect. Verdana is one of several “Web fonts” released by Microsoft. Although many Linux programs can use Verdana for printing if the font is installed, most Linux distributions don’t install Verdana by default, and few Linux programs use it for printing by default even if it’s installed, so option E is correct. 20.
B. The
mpage utility (option B) prints multiple input pages on a single output page, so it’s ideally suited to the specified task. PAM (option A) is the Pluggable Authentication Modules, a tool for helping to authenticate users. 4Front (option C) is the name of a company that produces commercial sound drivers for Linux. The route command (option D) is used to display or configure a Linux routing table. The 411toppm program (option E) converts files from Sony’s .411 image file format to the .ppm image file format; it doesn’t do the specified task.
