[ Pobierz całość w formacie PDF ]
.Look in the /usr/lib/X11 directory of the file called rgb.txtfor a list of colors, and look at the section "Colors," later in this chapter,for more information.See the man pages for additional features of xsetroot.NOTE: The cursorfileis an ASCII file with arrays of characters.You create a bitmap using the bitmaputility.Then, run this bitmap through bmtoa to convert a bitmap to arrays.A reverseutility, called atobm, converts existing arrays to bitmaps for use with the bitmapeditor.Using xsetThe xset command sets up some of the basic options on your environment.Some of these options might not work on your particular system.It's worth it tocheck these out.Set your bell volume with this command:xset b volume frequency durationInMilliseconds.For example, the commandxset b 70 4000 60sets the keyboard bell to about 70 percent of maximum, at a frequency of 4000Hz,and on for 60 milliseconds.To turn on the speaker, use the following command:xset b onTo turn it off, type this:xset b offTurning the speaker back on returns the volume to its default.Use xset c volume to set the keyclick volume in percentages.A volumesetting of 0 turns it off.Any other number (1 through 100) turns it on for thatpercentage.Of course, for this command to work, you must have your speaker turnedon.To set the mouse speed, use the following command at the prompt:xset m acceleration thresholdThe acceleration is the number of times faster than the threshold that each mousemovement travels.This way, you can zip across the screen with a twitch.Use carein setting this feature unless you are very dexterous.Invoking the Screen SaverUse xset s seconds to enable the screen saver.You can turn off the screensaver with the off option.The default option reverts to system defaulttime for blanking the screen.For more options, type xset.Using Fonts For example, to load your ownfonts, use the following command:$ xset fp /user/home/myfont,/usr/lib/X11/fontsdir$ xset fp rehashThe rehash command forces the server to reread its systems files foryour command to take effect.To restore to normal, use the following command:$ xset fp default$ xset fp rehashSee the section "Fonts," later in this chapter.Getting More InformationAbout Your Display: xdpyinfoThe xdpyinfo utility gives you more information about your X server.It is usedto list the capabilities of your server and all its predefined parameters, includingthe following:Name of displayVersion numberVendor nameExtensionsThe list is too exhaustive to be included here, and it will be different for yourinstallation.Pipe its output to a file and review it for information about the server.Your output should look different from what's shown in Listing 23.4.Listing 23.4.Outputfrom xdpyinfo.$ xdpyinfoname of display: :0.0version number: 11.0vendor string: XFree86vendor release number: 2110maximum request size: 262140 bytesmotion buffer size: 0bitmap unit, bit order, padding: 32, LSBFirst, 32image byte order: LSBFirstnumber of supported pixmap formats: 2supported pixmap formats:depth 1, bits_per_pixel 1, scanline_pad 32depth 8, bits_per_pixel 8, scanline_pad 32keycode range: minimum 8, maximum 134focus: window 0x200000d, revert to Parentnumber of extensions: 6XTestExtension1SHAPEMIT-SHMMulti-BufferingXTESTMIT-SUNDRY-NONSTANDARDdefault screen number: 0number of screens: 1screen #0:dimensions: 800x600 pixels (270x203 millimeters)8 resolution: 75x75 dots per inchdepths (2): 1, 8root window id: 0x29depth of root window: 8 planesnumber of colormaps: minimum 1, maximum 1default colormap: 0x27default number of colormap cells: 256preallocated pixels: black 1, white 0options: backing-store YES, save-unders YEScurrent input event mask: 0x30003cButtonPressMask ButtonReleaseMask EnterWindowMaskLeaveWindowMask SubstructureRedirectMask FocusChangeMasknumber of visuals: 6default visual id: 0x20visual:visual id: 0x20class: PseudoColordepth: 8 planessize of colormap: 256 entriesred, green, blue masks: 0x0, 0x0, 0x0significant bits in color specification: 6 bitsvisual:visual id: 0x21class: DirectColordepth: 8 planessize of colormap: 8 entriesred, green, blue masks: 0x7, 0x38, 0xc0significant bits in color specification: 6 bits(.this is a very long listing.)***END LISTINGHelp for Left-HandedUsers: xmodmapIf you are a left-handed user, it might a bit uncomfortable to use the "left"button with your third or second finger.The X designers kept you in mind.If youwant to swap the functionality of the pointers on your mouse or pointer, use thexmodmap command.First, display the current mappings like so:xmodmap -ppYou see the following display:Physical ButtonButton Code1 12 23 3This shows you that button code 1 is mapped to physical button 1, button code2 is mapped to physical button 2, and button code 3 is mapped to physical button3.Now issue this command:xmodmap -e `pointer = 3 2 1'This command reverses the mappings on the buttons.Now, physical button 1 is mappedto button code 3, and so on.To confirm this, retype the xmodmap -pp command,and you'll see this display:Physical ButtonButton Code1 32 23 1You can always revert to the default with this:xmodmap -e `pointer = default'Useful Command-LineOptionsSome other standard input parameters that can be used to change the behavior ofa window from the command line are listed here:-borderwidth or -bwThe border width of pixels in the frame.This might not be available for all clients.-foreground or -fgThe foreground color.For example, this can be the text color for an xterm.-background or -bgThe background color.For example, this can be the text color for an xterm.-displayThe display on which the client runs.-font or -fnThe font to use for a particular text display.-geometrySpecifies the geometry.-iconicStarts the application in an iconic form.-rv or -reverseSwaps foreground and background colors.-titleThe title for the title bar.-nameThe name for the application.Of course, the man pages on an application can give you more detailed informationthan one chapter in a book.Explore a little.For example, you can call one terminalname editor, and set your resources in the.Xresources file forname editor.The following command starts a remote session on another node:-display nodename:displayname.ScreenNameThe displayname and ScreenName are optional and default to zero if not entered.Logging into RemoteMachinesYou can log into remote machines by using the xterm -display option,provided that you have set up your Linux machine for networks.The remote systemmust allow you to open a display on its machine.This is done with the xhost+ command on its machine.The xhost + command is dangerous becauseit allows anyone to access your machine, so use it cautiously
[ Pobierz całość w formacie PDF ]