·¢ÐÅÈË: wlf.bbs@cs3.xmu.edu.cn (»¨ÑÛÀÇ¡«°§µÄÃÀ¶ØÊé), ÐÅÇø: cnunix
±ê  Ìâ: £Ø  £×£É£Î£Ä£Ï£×£Ó  ÏµÍ³Ê¹ÓÃÖ¸ÄÏ--(9)
·¢ÐÅÕ¾: XMU CS BBS (Fri Jan  2 06:31:44 1998)
תÐÅÕ¾: Lilac!ustcnews!ustcnews!sjtunews!xmucs
³ö  ´¦: cs3.xmu.edu.cn

µÚ£¹Õ ·½±ãµÄ³ÌʽºÍÊÓ´°Ïà¹ØµÄ¹¤¾ß

    µ½Ä¿Ç°ÎªÖ¹ÎÒÃÇÒѾ­º­¸ÇÁËʹÓÃϵͳµÄ»ù±¾ÔªËØ, ÓÐÁË xterm¹¦ÄÜ, Ä㿪
ʼ´ÓÊÓ´°ÏµÍ³»ñµÃ¿´µÃ¼ûµÄÓŵã. ÔÚ±¾ÕÂÎÒÃÇÃèÊöһЩС³Ìʽ, ¿ªÊ¼È¥³ä·Öʹ
ÓÃϵͳ²¢Ê¹ÄãµÄ¹¤×÷¸ü·½±ã.

    ÕâÕÂÏÈÌá³ö "°¸Í·¸½ÊôÆ·" (desk accessory) µÄ·½±ã³Ìʽ, ½ÓÖø½éÉܲ¶×½
(capturing)¡¢»Ö¸´ (restoring) ÓëÁÐӡөĻӰÏñµÄÒ»×鹤¾ß.



9.1 ·½±ãµÄ³Ìʽ

    ±¾½ÚËùÃèÊöµÄһЩ³Ìʽ¹¦ÄÜËäÊô´ÎÒª, µ«ÊÇÈ´¿ÉÒÔʹÄ㹤×÷µÃ¸ü·½±ãÇáËÉ.
ÓÐЩÎÒÃÇÔø¾­Ìá¹ý -- xclock Óë xcalc --  µ«ÔÚÕâÀォ¸üÓÐ×éÖ¯µØÃèÊö, ÎÒ
Ãǽ«¿´Ò»Ð©¿ÉÒÔÏÔʾĿǰ»úÆ÷¸ºÔغ͸æËßÄãÓÐÓʼþËÍ´ïµÈ¹¦ÄܵÄгÌʽ.


9.1.1 Ò»¸öÀà±È»òÊýλʱÖÓ - xclock

    ÔÚµÚ£µÕÂÖÐÎÒÃÇÓàxclock Îª¡õÀý³Ìʽ, ËüÓÐÏÂÁÐÃüÁîÁÐÑ¡Ïî :

        Ö¸¶¨ÊÓ´°³õʼ´óСÓëλÖà: Óà-geometry geomspec.

        É趨±³¾°É« : Óà-bg colour.

        É趨ǰ¾°É« : Óà-fg colour.

        É趨ָÕëµÄÑÕÉ« : Óà-hd colour.

        Ö¸Õë±ßÔµ¸ßÁÁ¶È : Óà-hl colour, ÒÔ¸ßÁÁ¶È colour ÑÕɫΪָÕëµÄ
            ±ßÔµ.

    ÆäËûÓÐÓõÄÑ¡Ïî :

        Ê¹ÓÃÊýλʱÖÓ : -digital, ¸æËß xclock Ê¹ÓÃÒ»¸ö 24 Ð¡Ê±µÄÊý×ÖÐÍ
            Ê±ÖÓ, ÒÔÈ¡´úÔ¤ÉèµÄÀà±ÈÐÍ, Èçͼ 9 - 1.

        É趨 "ʱÖÓ-µÎ´ð" ÆµÂÊ : -update num, Ê¹Ê±ÖÓÿ num Ãë¸üÐÂÏÔʾһ
            ´Î. ´¦ì¶Ö¸Õë״̬ÏÂ, Èô num Ð¡ì¶ 30 ÃëÔòÒÔÒ»¸ö×êʯÐÎÃëÕëÿ
            num ÃëÒƶ¯Ò»´Î, Èçͼ 9 - 2. (Ô¤ÉèֵΪ 60 Ãë)

        É趨°ëСʱÖÓÉù : -chime, Ã¿°ëСʱÕûʹÖն˻úÁåÏìÒ»´Î, Ã¿Ò»¸öС
            Ê±ÕûÁåÏìÁ½´Î.

               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p98.  fig 9 - 1             ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦ Í¼ 9 - 1 Êý×ÖÐÍʱÖÓ            ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p98.  fig 9 - 2             ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦ Í¼ 9 - 2 ¾ßÓÐ×êʯÐÎÃëÕëµÄÖ¸ÕëÐÍ©¦
               ©¦        Ê±ÖÓ                    ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


9.1.2 Ò»¸ö×ÀÉÏÐͼÆËãÆ÷ - xcalc

    ÕâÊÇÁíÒ»¸öÎÒÃÇÔø¾­ÓùýµÄ³Ìʽ. ÎÒÃÇÓùýµÄÃüÁîÁÐÑ¡ÏîÈçÏ :

        Ö¸¶¨ÊÓ´°³õʼ´óСÓëλÖà: -geometry geomspec.

        É趨±³¾°É« : -bg colour.

        É趨ǰ¾°É« : -fg colour.

    ÆäËûÑ¡Ïî :

        Ö¸¶¨¼ÆËã³ß (slide-rule) Ä£Ê½ : -analog, Ö´ÐгÌʽģÄâÒ»¸ö¼ÆËã
            ³ß (ͼ 9 - 3) È¡´úµç×Óʽ¼ÆËãÆ÷. ÕâʵÔÚºÜÏ¡Ææ, µ«Ò»Ð©¸ü½øÒ»
            ²½µÄÖ¸Áî°üº¬ì¶ÏÂÃæ, ÒòΪËü²»°üº¬ÔÚÖ¸ÄÏÒ³ÄÚ.

        Ö¸¶¨ HP-10C ÐͼÆËãÆ÷ : -rpn (´ú±í·´²¨À¼¼ÇÊý·¨ (Reverse Polish
            Notation)), ¸æËß xcalc Ä£Äâ HP-10C ÐͼÆËãÆ÷ (Èçͼ 9 - 4).

    ¸÷ÖÖ¼ÆËãÆ÷ģʽµÄ¸üÉîÈëµÄÖ¸Áî˵Ã÷°üº¬ì¶Ö¸ÄÏÒ³. (ÎÞÂÛÄã´¦ì¶ÄÇÒ»¸öģʽ
, µ±Ä㽫Ëü±íáçͼ»¯Ê±, Æä±íáçͼ¶¼ÊÇͼ 9 - 5 µÄÑù×Ó.


               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p99.  fig 9 - 3                 ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦ Í¼ 9 - 3 Àà±ÈµÄ xcalc ÊÇÒ»¸ö¼ÆËã³ß ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p99.  fig 9 - 4                 ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦                                    ©¦
               ©¦ Í¼ 9 - 4 ·´²¨À¼¼ÇÊý·¨ xcalc ¼ÆËãÆ÷ ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼
               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p99.  fig 9 - 5             ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦ Í¼ 9 - 5 xcalc ±íáçͼ          ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


ʹÓüÆËã³ß

    Ê¹Óû¬Êó°´Å¥²Ù×÷¼ÆËã³ß. µ±»¬ÊóÖ¸±ê½øÈëÊÓ´°ÄÚ, Ö¸±ê±ä³ÉÊÖÐÍÓαê.

        ¶¨Î»»¬³ß - ×ó¶Ë : Òƶ¯Ö¸±ê½øÈ뻬³ßÇø, ¶¨Î»ÖÁÄãÏëÒªµÄµØ·½,Åö
            ´¥×ó°´Å¥,»¬³ß×ó¶ËÌøÖÁÖ¸±êλÖÃ.

        ¶¨Î»»¬³ß - ÓҶˠ: ÓëÉ趨×ó¶ËÒ»Ñù, µ«Åö´¥ÓÒ°´Å¥.

        ¶¨Î»¼ÆËã³ßµÄÓαê : ¶¨Î»Ö¸±êÖÁÄãÏëÒªµÄ³ßÌåλÖÃ, ²¢Åö´¥×ó°´Å¥
            : ³ßµÄÓαêÌøÖÁÖ¸±êλÖÃ.

        »¬¶¯»¬¶¯°ô (slide-bar) : ¶¨Î»ÓαêÖÁ»¬³ß, °´ÏÂÖм䰴ť, ²¢±£
            ³Ö°´Öø ... ÍÏק»¬³ßµ½ÄãÒªµÄλÖÃ, È»áá·ÅËÉ°´Å¥.

        ½«³ßµÄ³¤¶È±äΪÁ½±¶ : ÔÚ³ßÌåÉÏÅö´¥Öм䰴ť.

        ½«³ßµÄ³¤¶È±äΪһ°ë : ÔÚ³ßÌåÉÏÅö´¥ÓÒ°´Å¥.

×¢Òâ : ¼ÙÈçÄãÒÔ×ó»òÓÒ°´Å¥ÍÏק, ½«»áÓÐÆæ¹ÖµÄÊÂÇé·¢Éú.


9.1.3 ÏÔʾ»úÆ÷µÄ¸ºÔØƽ¾ù - xload

    xload ÏÔʾϵͳƽ¾ù¸ºÔØ (ÔÚÖ´ÐÐØùÁÐÀïµÄƽ¾ù¹¤×÷ÊýÄ¿) µÄÖù״ͼ ,
Ëü»á¶¨ÆڵظüÐÂ. µäÐ͵ÄÊä³öÈçͼ 9 - 6a, xload µÄ±íáçͼÈç 9 - 6b.

               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p100.  fig 9 - 6                  ©¦
               ©¦                                      ©¦
               ©¦                                      ©¦
               ©¦                                      ©¦
               ©¦                                      ©¦
               ©¦ Í¼ 9 - 6 xload µÄÕý³£ÊÓ´°Óë±íáçͼÊÓ´°©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


9.1.4 Óʼþ֪ͨ³Ìʽ - xbiff

    xbiff ÊÇÒ»¸ö¼àÊÓÄãµÄÓʼþµµÓëÈÃÄãÖªµÀºÎʱÓÐÓʼþµ½´ïµÄС³Ìʽ. ËüÏÔ
ʾһ¸öÓÊÏäµÄͼ°¸; µ±Ã»ÓÐÐÂÓʼþʱÓÊÏäµÄÆì×ÓÊÇÏòϵĠ(ͼ 9 - 7a). µ±ÓÐÐÂ
Óʼþ½øÀ´Ê±, xbiff ÏìÁå, ÊúÆðÆì×Ó, ²¢Ê¹Í¼°¸±ä³É·´ÏàÏÔʾ (ͼ 9 - 7b).

    Äã¿ÉÒÔÔÚ xbiff ÊÓ´°ÉÏÅö´¥Èκλ¬Êó°´Å¥, Ç¿ÆÈÆì×Ó·ÅÏÂ.

    xbiff ½ÓÊÜÒ»°ã¶ÔÉ«²ÊµÄÃüÁîÁÐÑ¡Ïî (-bg, -fg, -bd) Óë¶ÔÊÓ´°ÌØÐÔµÄ
ÃüÁîÁÐÑ¡Ïî(-display, -geometry, -bw). ÆäËû°üÀ¨ :

    Ö¸¶¨¼ì²éÓʼþƵÂÊ : -update num, ¸æËß xbiff Ã¿ num Ãë¼ì²éÓÊÏäÒ»´Î
, ¿´ÊÇ·ñÓÐеÄÓʼþµ½´ï. (Ô¤ÉèֵΪ 60 Ãë)

    Ö¸¶¨Ò»¸öÌض¨Óʼþµµ : -file filename, Ê¹ xbiff ¼ì²éÔÚ filename ÄÚ
µÄÓʼþ, È¡´úÔ¤ÉèÃû³ÆµÄµµ. Ô¤ÉèÃû³ÆΪ /usr/spool/mail/username, ÆäÖÐ
usernameΪÄãµÄµÇ¼Ãû³Æ (login name)¡£

    xbiff ÌØÓеĠ-file Ñ¡Ïî, ¶ÔÍø·ÉϵÄÓʼþ±»¼¯Öд¦ÀíºÍÄãµÄÓÊÏäÓÉ
ÁíÍâµÄ»úÆ÷´¦ÀíµÈÁ½·½Ãæ·Ç³£ÓÐÓÃ. ÏÂÃæµÄÃüÁîÈÃÄãÖ´ÐÐij¸öÓʼþ»úÆ÷(±È
Èç˵mars) ÉϵĠxbiff³Ìʽ, ²é¿´ÄãµÄÓÊÏä, ²¢½«ÏÔʾËÍ»ØÄã×Ô¼ºµÄ»úÆ÷venus:

    rsh mars xbiff -file /var/spool/mail/smith\
    -display venus:0 &

               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p101.  fig 9 - 7              ©¦
               ©¦                                  ©¦
               ©¦                                  ©¦
               ©¦                                  ©¦
               ©¦ Í¼ 9 - 7 xbiff Óʼþ¼àÊÓÊÓ´°µÄÁ½ÖÖ©¦
               ©¦        ×´Ì¬                      ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼



9.2 ´¢´æ, ÏÔʾÓëÁÐӡөĻӰÏñ

    £ØÊÇÒ»¸öͼÐÎϵͳ, ¶øÄ㽫ÓÃËüÔÚÊÓ´°ÄÚÏÔʾÎÄ×ÖÓëͼÐÎ. ¾­³££ØÊÓ´°µÄʹ
ÓÃÕß»áÏëÒª²¶×½Ó©Ä»ÉϵÄijЩӰÏñ, ÒÔ±ãÉÔááÄã¿ÉÒÔÖØÐÂÏÔʾËü, »òËÍÖÁÓ²¿½±´
 (hard-copy)×°ÖÃÁÐÓ¡. ÏÂÃæµÄС½Ú½«ÃèÊöÕâЩ¹¦ÄÜ.


9.2.1 ´¢´æÒ»¸öÊÓ´°µÄÓ°Ïñ - xwd

    xwd ÇãÓ¡ (dump) Ò»¸öÊÓ´°µÄÓ°Ïñµ½Ò»¸öµµ°¸. Õâ¸öµµ°¸ÉÔáá¿ÉÒÔ±»ÆäËû
³Ìʽ´¦Àí (ÀýÈçÁÐÓ¡Ò»¸öÓ²¿½±´).

    Ê¹Óàxwd ÓÐÐí¶àÖÖ²»Í¬·½·¨. Äã¿ÉÒÔÃ÷È·µØÖ¸¶¨Ò»¸öÊä³öµµ (ʹÓÃÃüÁîÁÐ
Ñ¡Ïî-out name), »òÕßʹÓàxwd ÇãÓ¡Ó°Ïñµ½±ê×¼Êä³ö. ÄãÒ²¿ÉÒÔÃ÷È·µØÖ¸¶¨Ïë
ÇãÓ¡µÄÊÓ´°, »ò¿ÉÒÔÈàxwd "Ìáʾ" ÄãÒ»ÏÂ.

    ÈÃÎÒÃÇÄÃ×î¼òµ¥µÄÒ»¸öÀý×Ó : ì¶ xterm ÏÂÒÔÏÂÁÐÃüÁîÆô¶¯³Ìʽ

        xwd > outfile

Ö»Òª xwd Æô¶¯, Óαê±ã»á±ä³É "Ê®×ÖÏß" (cross hairs) ×´, ¼ûͼ 9 - 8. ÒÆ
¶¯Ö¸±ê½øÈëÄãÏëÒªÇãÓ¡µÄÊÓ´°, ²¢Åö´¥Èκΰ´Å¥ : xwd ÏìÒ»´ÎÁå±íʾËüÒѾ­¿ªÊ¼
¼Ç¼ÊÓ´°Ó°Ïñ, ÇÒÔÚËüÍê³ÉʱÏìÁ½´ÎÁå. È»ááÓαê»Ö¸´Õý³£.

               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p102.  fig 9 - 8            ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦                                ©¦
               ©¦ Í¼ 9 - 8 Ê®×ÖÏßÐÎÓαꠠ        ©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼

×¢Òâ 1 : ¼ÙÈçÄãÊÔͼÇãÓ¡ÔÚÓ©Ä»Éϲ»ÍêÕûµÄÊÓ´°, ³Ìʽ¿ÉÄÜʧ°Ü²¢ÔÚÄãµÄ¿Ø
ÖÆ̨ xterm ÊÓ´°ÄÚÏÔʾ³öÒ»³¤´®µÄ´íÎóѶϢ (¼ÙÈçÄãÓÐÒ»¸ö¿ØÖÆ̨µÄ»°).

×¢Òâ 2 : ±»²¶×½µÄÓ°ÏñÊÇÄãÕæÕýÔÚÓ©Ä»ÉϵÄÊÓ´°±ß½çÄÚËù¿´µ½µÄ, ÌرðµÄÊÇ,
¼ÙÈçÊÓ´°µÄij²¿·Ö±»ÁíÒ»¸öÊÓ´°¸²¸Ç, ÇãÓ¡µÄÓ°Ïñ½«Õ¹ÏÖÊÓ´°º­¸ÇµÄ¿É¼û²¿·Ö
ÒÔ¼°ÕÚ±ÎÊÓ´°ÖصþµÄ²¿·Ö. (ÀýÈç : Í¼ 9 - 9 Õ¹Ê¾Ò»¸ö±» xman ¸²¸ÇµÄÒ»¸ö
xterm ÊÓ´°µÄÇãÓ¡½á¹û) ÕâËƺõÊÇÒ»¸ö²»·½±ãµÄ¹¦ÄÜ, µ«ÓÐËüµÄÓŵã :ÈôÏëÒª
»ñµÃÕû¸öÓ©Ä»µÄÇãÓ¡Ó°Ïñ, Ö»Òª¶Ô¸ùÊÓ´°Ö´ÐРxwd ¼´¿É; ¾ÍÈçͬÄãÔÚÓ©Ä»ÉÏ
¿´µ½±»¸²¸ÇµÄ¸ùÊÓ´°Ò»Ñù, ÓÃÕâ¸ö·½·¨Äã¿ÉÒԵõ½ÍêÕûÓ©Ä»µÄͼƬ.

               ©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
               ©¦    p102.  fig 9 - 9              ©¦
               ©¦                                  ©¦
               ©¦                                  ©¦
               ©¦                                  ©¦
               ©¦                                  ©¦
               ©¦ Í¼ 9 - 9 Ò»¸ö±»ÖصþÊÓ´°µÄÇãÓ¡½á¹û©¦
               ©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼

ÈçºÎÖ¸¶¨±»ÇãÓ¡µÄÊÓ´°

    ÓÐÁ½ÖÖ·½·¨¿ÉÒÔ͸¹ýÃüÁîÁÐÑ¡Ïî¸æËß xwd ÒªÇãÓ¡ÄÇÒ»¸öÊÓ´°.

    -root : ÇãÓ¡¸ùÊÓ´°. ÀýÈç : ÏëµÃµ½Ó©Ä»µÄÒ»¸öÍêÕûͼƬ, Ê¹ÓÃÃüÁî :

            xwd -root > screenpic

    -id win-id : ÇãÓ¡ÊÓ´°Ê¶±ðÂëΪ win-id µÄÊÓ´°. (ÿ¸öÓÉ X server ½¨
            Á¢µÄÊÓ´°½ÔÓÐÒ»¸öΨһµÄÊÓ´°Ê¶±ðÂë : ËüÖ»ÊÇÒ»¸öʶ±ðÊÓ´°µÄ
            ºÅÂë. ÎÒÃǽ«ÔÚ "×ÊѶÓë״̬³Ìʽ " (Information and status
            program)ÄÇÒ»Õ (µÚ£±£²ÕÂ) ÖиæËßÄãÈçºÎÕÒµ½Ò»¸öÖ¸¶¨ÊÓ´°µÄ
            Ê¶±ðÂë).

    (ÕâЩѡÏîÔÚ xwd Ö¸ÄÏÒ³ÄÚûÓÐÃèÊö)

    Ê¹ÓÃÕâЩѡÏîµÄºÃ´¦ÊÇÄã²»±ØʹÓû¬ÊóÈ¥Ö¸¶¨Äã¸ÐÐËȤµÄÊÓ´°. ÒòΪÓÐʱ
ºòÔÚÇãÓ¡µÄͬʱ£¬»¬Êó±ØÐë³öÏÖÔÚij¸öÌض¨µÄµØ·½Ö´ÐÐijÏîÌض¨µÄ¹¦ÄÜ£¬ÀýÈ磺
ºô½ÐÒ»¸öÍ»ÏÖʽѡµ¥, »òʹһ¸öÃüÁî°´Å¥³öÏÖÄãÏëÒªµÄ״̬. ¾ÙÀýÀ´Ëµ£ºÓû´¢´æ
ͼ 6-1µÄөĻӰÏñ, »¬Êó±ØÐ뱻ʹÓÃÒÔÍ»ÏÖuwn Ñ¡µ¥£¬Òò¶øÔì³ÉÄãûÓа취ͬʱ
ʹÓû¬ÊóÈ¥Ö¸¶¨ xwd µÄÄ¿±ê. ÏÂÃæÊÇÈçºÎ²¶×½Ò»¸öÓ°ÏñµÄ²½Öè :

    1. ÔÚÒ»¸ö xterm ÊÓ´°, ¼üÈëÃüÁî

           sleep 10.xwd -root > uwmfile

       ÔÚ²¶×½Ó°Ïñ֮ǰ, ¸øÄã×Ô¼ºÊ±¼äʹөĻ½øÈëÄãÒªµÄ״̬.

    2. Òƶ¯Ö¸±êÖÁ±³¾°ÊÓ´°ÉÏ.

    3. °´Ï»¬ÊóÖм䰴ť, ³öÏÖ WindoeOps Ñ¡µ¥, ²¢±£³Ö°´Ï²»ËÉ¿ª ...

    4. ... µÈÒ»ÏÂ, Ö±µ½ xwd ÏìÁåÒ»´Î¸æËßÄ㿪ʼ, Íê³ÉÔòÏìÁå¶þ´Î. È»áá
       ·ÅËÉ°´Å¥.

    ÏàͬµÄ·½·¨ (¼¼ÇÉ) ±»ÓÃ춲¶×½µÚ£¸ÕÂËùÊöÖ® xterm Ñ¡µ¥,  Çë×¢Òâ±ØÐë
ʹÓÃÃ÷È·µÄÊÓ´°Ê¶±ðÂë. (ÔÚ "×ÊѶÓë״̬³Ìʽ" ÄÇÒ»Õ (µÚ£±£²ÕÂ) Öн«ÔÙÒ»
´ÎÌáµ½)


9.2.2 ·Å´óÓ©Ä»ÊÓ´°Ó°Ïñ - Xmag

   xmag ÈÝÐíÄã¿ìÅÄ (snapshot) ÈκÎÓ©Ä»µÄÓ°Ïñ, ²¢ÒÔÈÎÒⱶÊý·Å´óËûÃÇ. ×î
¼òµ¥µÄ·½·¨Îª²ÉÓý»Ì¸·½Ê½Ö¸¶¨Äã¸ÐÐËȤµÄÇøÓò£º

    1. Æô¶¯³Ìʽ (Óàxmag ÃüÁî) : xmag ÏÔʾһ¸öÉÁ¶¯µÄ¾ØÐÎÍâ¿ò.

    2. ½«¾ØÐοò°²Öõ½ÄãÏëÒªµÄµØ·½ÉÏ.

    3. Åö´¥Èκΰ´Å¥ : xmag ¿ìÅľØÐοòÄÚµÄÇøÓò, ²¢ÏÔʾһ¸öÇåеÄÊÓ´°
Íâ¿ò, ÀïÃæÕýÏÔʾ·Å´óµÄ (enlarged) ¿ìÅÄÓ°Ïñ.

    4. ·ÂÕÕÔÚµÚ£¶ÕÂÆô¶¯ xclock ááËù²ÉÓõķ½·¨Ò»ÑùʹÓÃÖ¸±êÓë°´Å¥·ÅÖÃ
       Íâ¿ò. (ÀýÈç : Åö´¥»¬Êó×ó°´Å¥½«ÊÓ´°°²ÖÃÔÚÖ¸±êÄ¿Ç°ËùÔÚµÄλÖÃ)

    5. xmag ÔÚÄã¸Õ°²·ÅµÄÊÓ´°ÄÚ, ÖØ»æ·Å´óµÄÓ°Ïñ.

    ÄãÏÖÔÚ¿ÉÒÔÑ¡Ôñµ×ÏÂÈÎÒ»¶¯×÷£º

  . Äã¿ÉÒÔ°´ Q »ò q »ò CTRL-C,½ÓÖøÖ¸¶¨ xmag ÊÓ´°ÄÚµÄÑ¡Ïî, Ìø³ö xmag.

  . Äã¿ÉÒÔ°´»¬ÊóÖм䰴ť»ò×ó°´Å¥ÒÔÒÆ¿ªÄ¿Ç°·Å´óµÄÊÓ´°, xmag ÔÙ´ÎÏÔʾ
    ³öËüµÄÉÁ˸¾ØÐÎ, ËùÒÔÄã¿ÉÒÔ·Å´óÓ©Ä»ÉÏÁíÒ»¸öÇøÓò.

  . °´Ï»¬Êó×ó°´Å¥ : xmag ÏÔʾ³öÔÚÖ¸±êƶ¯Ö¸±ê, ÕâЩÏÔʾËæÖø¸üÐÂ, Ö±µ½Äã·ÅËÉ°´Å¥.

³Ìʽ¼Ç¼¿ìÅÄÓ°ÏñÖ»ÊÇΪÁËÁ¢¼´ÔÙÏÔʾ -- Ã»ÓÐÈκη½·¨¿ÉÒÔÈ¡µÃËüÒÔ±ãÇãÓ¡
Ó°ÏñÖÁÒ»¸öµµ°¸.

xmag µÄÃüÁîÁÐÑ¡Ïî

    Ô¤ÉèµÄ²Ù×÷·½·¨±»Ò»Ð©·½Ê½ÏÞÖÆס -- Äã±ØÐëÒÔ½»Ì¸·½Ê½Ö¸¶¨±»·Å´óµÄÇø
Óò, ÇøÓòµÄÐÎ×´Óë´óС±»¹Ì¶¨, ·Å´óÂʶ¼ÊÇ 5. µ«ÊÂʵÉÏÄã¿ÉÒÔʹÓÃÃüÁîÁÐÑ¡
Ïî¸Ä±äÉÏÊöËùÓеÄÌØÐÔ :

    Ö¸¶¨²»Í¬µÄ·Å´óÂÊ : -mag num, ·Å´óÓ°Ïñ num ±¶ (num ÐëΪÕûÊý). Àý
        Èç : -mag 2, ½«²úÉúÒ»¸öΪԭÀ´Á½±¶¿íÓëÁ½±¶¸ßµÄÓ°Ïñ.

    Ö¸¶¨´óСÓë·Å´óÇøÓòµÄλÖà: Ê¹Óà-source geomspec. ÀýÈç :

            -source 300x100 + 450 + 762

        xmag ²»ÌáʾÈκÎѶϢ, µ«½«Ö±½ÓÌøµ½ËüÏÔʾ·Å´óÊÓ´°Íâ¿òµÄ²½Öè, ¼Ù
        Èç geomspec Ö»ÓÐλÖò¿·Ö, Ôò´óС²¿·ÖÔ¤ÉèΪ 64x64.

    ½öÖ¸¶¨·Å´óÇøÓòµÄ´óС : Ê¹Óà-source geomspec, geomspec ½öÓÉ´óС
        ²¿·Ö×é³É, ¾ÍÏñ

            -source 300x100

        xmag ½«ÏÔʾһ¸öÉÁ˸µÄ 300x100 µÄ¾ØÐÎÍâ¿ò, µÈÄ㶨λÓëÅö´¥°´Å¥.


9.2.3 ´¢´æÒ»²¿·ÖÓ©Ä»µÄÓ°Ïñ

    xwd ½ö¶Ôµ¥Ò», ÍêÕûÊÓ´°²Ù×÷. ¼ÙÈçÏë²¹×½Ò»¸öÊÓ´°µÄij²¿·Ö, »òijЩÊÓ
´°Ò»Æð,Äã±ØÐë²ÉÓÃÁ½½×¶Î´¦Àí :

    1. Ê¹Óàxmag ³ÌʽѡÔñÄãÒªµÄÇøÓò, ²¢ÔÚÒ»¸öµ¥Ò»ÊÓ´° (Ò༴ xmag ±¾
Éí) ÏÔʾËü.

    2. Óàxwd ÇãÓ¡ xmag ÊÓ´°ÖÁÒ»¸öµµ°¸. (¼ÙÈçÄãÏëÇãÓ¡Óë×î³õÒ»Ñù´óС
       µÄÓ°Ïñ, ±ðÍüÁËÖ¸¶¨ -mag 1 ¸ø xmg.)


9.2.4 ÏÔʾһ¸öÏÈÇ°ÇãÓ¡µÄÓ°Ïñ - xwud

    xwud "·´ÇãÓ¡" (undumps)Ò»¸öÏÈÇ°Ôø¾­±»ÇãÓ¡ÖÁÒ»¸öµµ°¸µÄÓ°Ïñ, Ò²¾ÍÊÇ
Ôٴν«Ó°ÏñÏÔʾì¶Ó©Ä»ÉÏ.Ô¤ÉèµÄ×÷·¨ÊÇËü´Ó±ê×¼ÊäÈë¶ÁÈëÇãÓ¡µµ, ËùÒÔ·´ÇãÓ¡
Ò»¸öÄãÏëÒªµµ°¸ÀàËÆ£º

        xwud < screenpic

    xwud ÏÔʾÉÁ˸µÄÊÓ´°Íâ¿ò, ×¼±¸ÈÃÄãʹÓÃÊÓ´°¹ÜÀíÆ÷. µ±ÄãÒÑ°²ÖúÃËü
, Ó°Ïñ¼´±»ÏÔʾ. µ±È»Äã¿ÉÒÔÀûÓÃÊÓ´°¹ÜÀíÆ÷Òƶ¯ÊÓ´°, Öض¨´óС, ±íáçͼ»¯
, ...µÈ, ¾ÍÈçͬÆäËûÈκÎÊÓ´°Ò»°ã.

×¢Òâ : ÔÚÖ¸ÄÏÒ³ÄÚÌáµ½µÄ -inverse ¿ÉÄÜÎÞ·¨Õý³£ÔË×÷¡£


9.2.5 ÁÐÓ¡ÏÈÇ°ÇãÓ¡µÄÓ°Ïñ - xpr

    xpr Äܹ»×ªÒëÒ»¸öÏÈÇ°ÔøÇãÓ¡µÄÓ°ÏñΪ¿ÉËÍÖÁÓ²¿½±´Ó¡±í»úÁÐÓ¡µÄ¸ñʽ. Ëü
Ö§Ô®¸÷ÖÖ²»Í¬µÄÓ¡±í»ú - PostScript, DEC LN03 Óë LA100, ÒÔ¼° IBM PP3812.
ÓÉì¶Ô¤ÉèÊÇдµ½±ê×¼Êä³ö, ËùÒÔµäÐ͵ÄÓ÷¨Ó¦¸ÃÊÇ :

    xpr -device ln03 < screenpic | lpr

xpr µÄÃüÁîÁÐÑ¡Ïî

    xpr ½ÓÊÜÊý¸öÑ¡Ïî, °üÀ¨¿ØÖÆÓ°ÏñÔÚÖ½ÉϵÄλÖÃ, ´óСÓëÅäÖÃ, ºÍÖ¸¶¨Êä
³öµÄÓ¡±í»úÐÍʽ :

    Ö¸¶¨Ó¡±í»úÐÍʽ : Ê¹Óà-device type, ÕâÀïµÄ type ÊÇÖ¸ ln03, la100,
        ps (PostScript) »ò pp (Ö¸ PP3812).

    ¿ØÖÆÓ°ÏñµÄ´óС : ÓÉì¶Ô¤Éè xpr ÒÔ×î´óµÄ³ß´çÁÐÓ¡Ó°Ïñ, Äã¿ÉÒÔÓÃ
        -width num »ò -height num  Ö¸¶¨×î´óµÄ¿í¶È»ò¸ß¶È, num µÄµ¥
        Î»Îª inch (²»±ØÊÇÕûÊý).

    ¶ÔÓ°Ïñ±ê¿Ì¶È : Äã¿ÉÒÔʹÓà-scale num ¶ÔÓ°Ïñ±ê¿Ì¶È, num ÎªÕûÊý.
        ×÷·¨Óë xmag µÄ -mag Ñ¡ÏîÀàËÆ, µ«´óС¿ÉÄÜŤÇú, ÒòΪӡ±í»ú¿É
        ÄÜÓв»Í¬µÄ½âÎö¶È, Ò༴ÿ¸ö inch Óв»Í¬µÄµã (ÏñËØ) Êý, ÀýÈç :
        -scale 2 ±íʾÿ¸öÓ©Ä»ÏñËر»Ó¡±í»úÓ¡³É 2x2 µãµÄ·½ÐÎ, ËùÒÔ¼Ù
        ÈçÄãµÄөĻΪ 75 dpi ÇÒÄãµÄÓ¡±í»úΪ 300 dpi, ÁÐÓ¡Ó°Ïñ½öΪө
        Ä»Ó°Ïñ´óСµÄÒ»°ë (75x2/300 = 0.5).

    ¼ÓÓ°Ïñ±êÌâ : Ê¹Óà-header string »ò -trailer string ·Ö±ð½«Ò»ÎÄ×Ö
        ×Ö´®Ó¡ÔÚÓ°ÏñµÄÉÏÃæ»òÏÂÃæ.

ÀûÓõ¥Ò»²Ù×÷ÃüÁîÇãÓ¡ÓëÁÐÓ¡Ò»¸öÊÓ´° - xdpr

xdpr ÊÇÒ»¸öʹÓàxwd ÇãÓ¡ÊÓ´°Ó°Ïñ, ½ÓÖøʹÓàxpr ¸ñʽ»¯ÁÐÓ¡Ó°Ïñ, ×îáá
ʹÓàlpr Ó¡³öÓ°ÏñµÄÒ»¸ö³Ìʽ. Ëü½ÓÊÜËùÓÐÕâÈýÖÖ³ÌʽµÄÃüÁîÁÐÑ¡Ïî (ÊÂʵ
ÉÏ xdprÊÇÒ»¸ö shellÃèÊö, Ëü½«ÉÏÊöÈýÖÖ³Ìʽ°ü×°ÔÚÒ»ÆðÒÔ±ãʹÓá£ËüÕæÕý
µÄ¹¤×÷Ϊ¼ì²éÃüÁîÁÐÉϵĸ÷¸öÑ¡ÏîÇÒ´«ËÍËüÃǸøÊʵ±µÄ³Ìʽ)

9.3 ½áÂÛ/ÕªÒª

    ÔÚ±¾ÕÂÖÐÄãÒѼû¹ýһЩ¿É°ïÖúÄã´¦ÀíÈÕ³£µÄ¹¤×÷С³Ìʽ, ºÍһЩÌØÊâµÄ¹¤
¾ßÒԼǼºÍÖØР(½¨Á¢) ²úÉúөĻӰÏñ. ÓµÓÐÕâЩ¹¤¾ßÄ㿪ʼµÃµ½ÊÓ´°ÏµÍ³µÄ
Óŵ㲢¿ªÊ¼Ê¹ÓÃËüµÄͼÐÎÄÜÁ¦.

    ÏÂÒ»ÕÂÎÒÃǼÌÐøÒÔÏàͬµÄ·½Ïò¿´Ò»Ð©ÆÕͨµÄ¹«ÓóÌʽ, ¿´ËüÃÇÈçºÎÀûÓÃÊÓ
´°ÏµÍ³È¥¼ò»¯²Ù×÷ÓëÔöǿʹÓýéÃæ.

=====

--
¡ù À´Ô´:¡¤¹ÅÃíÖÓÉù cs3.xmu.edu.cn¡¤[FROM: 210.34.6.201]
[°Ù±¦Ïä] [·µ»ØÊ×Ò³] [Éϼ¶Ä¿Â¼] [¸ùĿ¼] [·µ»Ø¶¥²¿] [Ë¢ÐÂ] [·µ»Ø]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º212.368ºÁÃë