mmonDesktopEnvironment sleduet imet' v vidu dve veshchi: 1) Peremennuyu LANG ustanavlivaet programma dtlogin, poetomu e£ ne sleduet ustanavlivat' v .profile 2) Skript /usr/dt/bin/Xsession na vremya svoej raboty ustanavlivaet peremennuyu DT=true i unichtozhaet e£ posle zaversheniya inicializacii okonnoj sistemy (to est' xterm zapuskaetsya uzhe bez ne£). Poetomu fragment v .profile vyglyadit tak: if [ ! "$DT" ] ; then ... stty -istrip cs8 erase "^H" kill "^U" swtch "^-" ... LANG=... ... fi Kartinki ~~~~~~~~ Kartinki dlya vhodnoj zastavki raspolozheny v /etc/dt/backdrops/*.pm i imeyut format XPM. Kakuyu imenno kartinku sleduet pokazat' na ekrane ukazano v fajle /etc/dt/config/Xresources eto stroki vida Dtlogin*logo*bitmapFile: /etc/dt/backdrops/cat.pm Gde iskat' soobshcheniya ob oshibkah ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Esli pol'zovatel' ne mozhet vojti v sistemu cherez xdm, vy dolzhny prochitat' fajl .xsession-errors v domashnem kataloge etogo pol'zovatelya. Tuda popadayut soobshcheniya ob oshibkah. Soobshcheniya XDM ob oshibkah, sluchivshihsya DO nachala pol'zovatel'skogo seansa, popadayut v /var/tmp/xdm-errors. Pri zapuske iz-pod CDE ishchite soobshcheniya ob oshibkah v /var/dt/Xerrors $HOME/.dt/startlog $HOME/.dt/errorlog $HOME/.dt/sessionlogs/* CHtoby soobshcheniya zapisyvalis' v poslednee upomyanutoe mesto, sleduet zakommentirovat' sleduyushchuyu stroku v fajle $HOME/.dtprofile (nizhe ona napisana, kak ona DOLZHNA vyglyadet'): # export dtstart_sessionlogfile="/dev/null" Esli u Vas PROBLEMY ~~~~~~~~~~~~~~~~~~~ "Vy zabudete o svoih problemah! Kogda uznaete o nashih." Esli vy ne mozhete vojti v sistemu cherez xlogin: - XDM vyda£t okno login: - vy vvodite imya, parol', zhm£te , okno ischezaet... - nichego ne proishodit, i okno xlogin poyavlyaetsya snova. Skoree vsego problema v tom, chto u vas nepravil'nyj ~/.profile (smotri v ~/.xsession-errors). No chtoby sumet' otredaktirovat' ego, vam nado hot' kak-to vojti v sistemu. |to delaetsya tak: - XDM vyda£t okno login: - vy vvodite imya, parol', zhm£te vmesto . ... i vhodite v sistemu s odnim edinstvennym oknom xterm. 8 bit protiv 24 bit ~~~~~~~~~~~~~~~~~~~ xdm na SPARCstation 5 s 24-bitovym frame buffer-om S24 zapuskaet po umolchaniyu X server v rezhime defaultdepth=8 bit, a ne 24 (defaultdepth = chislo bit na piksel). CHtoby vernut'sya k 24 bitam po umolchaniyu, sleduet vykinut' (zakommentirovat') iz $OPENWINHOME/lib/xdm/StartOW sleduyushchij fragment: # Start X server on S24 frame buffer (for SS5) in 8 bit mode, not 24. if [ -c /dev/fbs/tcx0 ] ; then pass="$pass -dev /dev/fbs/tcx0 defdepth 8" fi A chtoby na mashinah s graficheskim uskoritelem SX zapuskat' X-server po umolchaniyu v 24-bitovom rezhime, sleduet raskommentirovat' sleduyushchij fragment: (KROME PERVOJ STROKI-KOMMENTARIYA) # Start X server on SX frame buffer (for SS20) in 24 bit mode. # if [ -c /dev/fbs/cgfourteen0 ] ; then # pass="$pass -dev /dev/fbs/cgfourteen0 defdepth 24" # fi CHtoby uznat' tekushchee sostoyanie depth i mnogo drugoj informacii pro X-server, ispol'zujte programmy: a) xdpyinfo b) ps -ef | fgrep X (smotri na argumenty zapuska X-servera). Smotri man X11 openwin xdm Xserver Xsun Avtorizaciya dostupa k ekranu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/openwin/bin/openwin ispol'zuet /usr/openwin/bin/X $DISPLAY -auth $HOME/.xsun.`uname -n`$DISPLAY xdm ispol'zuet /usr/openwin/bin/X $DISPLAY -auth /var/tmp/A$DISPLAY-nechto Prosto poleznye programmy ------------------------- xprop - vyda£t svojstva i Klass ukazannogo mysh'yu okna xlsclients -l - vyda£t spisok X-klientov xdpyinfo - vyda£t parametry vashego ekrana i X servera xev - vyda£t keysym i keycode nazhimaemyh klavish. Nezamenima pri sostavlenii kart klaviatury. Kak podmenit' sistemnye fonty ----------------------------- Inogda vsta£t zadacha zamenit' nekotoryj sistemnyj font podhodyashchim fontom, soderzhashchim russkie bukvy, pri etom ne stiraya original'nyj font. Takaya zadacha mozhet vozniknut', esli imya nekotorogo nerusskogo fonta namertvo proshito v kodah programmy i ne zada£tsya cherez resursy tipa Prog*fontList: XLFD-fontname Nam zhe nado zamenit' ego na russkoyazychnyj font. |to delaetsya pri pomoshchi takogo tryuka: Kak izvestno, X-server ishchet fonty v katalogah v poryadke, ukazannom v peremennoj FONTPATH (smotri xset -q). V samoe nachalo etogo puti pri pomoshchi komandy ~~~~~~ xset +fp cyrill-aliases my dobavlyaem katalog, soderzhashchij nashi sobstvennye fonty. Na samom dele v etom kataloge net nastoyashchih fontov, no imeetsya ob®yavlenie fontov: V fajle fonts.dir ~~~~~~~~~~~~~~~~~ 0 chto oznachaet, chto katalog soderzhit 0 nastoyashchih fontov. Zato v fajle fonts.alias ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helvetica "-paragraph-PragmaticaCK-medium-r-normal--0-0-0-0-p-0-koi-8" -b&h-lucida-medium-r-normal--0-0-0-0-p-0-iso8859-1 \ "-paragraph-JournalSansCK-medium-r-normal--0-0-0-0-p-0-koi-8" my ob®yavlyaem sinonimy im£n, kotorye perekryvayut sistemnye imena sistemnyh fontov imenami nashih sobstvennyh fontov, lezhashchih v drugih katalogah. Uvy, my ne mozhem sdelat' sinom=nimy zavisimymi ot peremennoj $LANG inache kak kazhdyj raz podsovyvaya DRUGOJ KATALOG s sinonimami. Primer fajla fonts.alias dlya tr£h osnovnyh nachertanij v KOI-8: -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1 "-paragraph-CourierCK-medium-r-normal--0-0-0-0-m-0-koi-8" -adobe-courier-medium-o-normal--0-0-0-0-m-0-iso8859-1 "-paragraph-CourierCK-medium-i-normal--0-0-0-0-m-0-koi-8" -adobe-courier-bold-r-normal--0-0-0-0-m-0-iso8859-1 "-paragraph-CourierCK-bold-r-normal--0-0-0-0-m-0-koi-8" -adobe-courier-bold-o-normal--0-0-0-0-m-0-iso8859-1 "-paragraph-CourierCK-bold-i-normal--0-0-0-0-m-0-koi-8" -adobe-times-medium-r-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-NewtonCK-medium-r-normal--0-0-0-0-p-0-koi-8" -adobe-times-medium-i-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-NewtonCK-medium-i-normal--0-0-0-0-p-0-koi-8" -adobe-times-bold-r-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-NewtonCK-bold-r-normal--0-0-0-0-p-0-koi-8" -adobe-times-bold-i-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-NewtonCK-bold-i-normal--0-0-0-0-p-0-koi-8" -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-PragmaticaCK-medium-r-normal--0-0-0-0-p-0-koi-8" -adobe-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-PragmaticaCK-medium-i-normal--0-0-0-0-p-0-koi-8" -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-PragmaticaCK-bold-r-normal--0-0-0-0-p-0-koi-8" -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1 "-paragraph-PragmaticaCK-bold-i-normal--0-0-0-0-p-0-koi-8" Takoj fajl postavlyaetsya vmeste s nashim paketom, no ego podstanovka VYKLYUCHENA (smotri fajl /usr/openwin/lib/locale/C/OWfontpath dlya vklyucheniya). Katalog $OPENWINHOME/lib/X11/fonts/cyrill-aliases++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kak raz odin iz dvuh alias-katalogov, zapisannyh v /usr/openwin/lib/locale/C/OWfontpath |tot katalog prednaznachen dlya kirillizacii Sun-ovskogo produkta ShowMe. |tot produkt ShowMe zaprashivaet 4 shrifta po XLFD shablonam: -*-helvetica-bold-r-*--12-* -*-helvetica-bold-r-*--14-* -*-helvetica-medium-r-*--18-* -*-helvetica-medium-r-*--24-* Im udovletvoryayut shrifty -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 -adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1 -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1 CHtoby bralis' russkie shrifty, sleduet v spiske fontov PERED -adobe- shriftami pomestit' nekie kirillicheskie fonty, udovletvoryayushchie tem zhe XLFD shablonam. Poimenuem eti shrifty tak: -ada-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 -ada-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1 -ada-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 -ada-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1 Programmy, yavno ukazyvayushchie -adobe-* , ne budut zatronuty etim mehanizmom sinonimov. K sozhaleniyu, mnogie drugie produkty ispol'zuyut shablony im£n fontov s podobnoj specifikaciej, naprimer Open Vision HA ispol'zuet *hel*-b*-r-*-14-* *hel*-b*-r-*-18-* kotorye v itoge otobrazhayutsya v SLISHKOM BOLXSHIE russkie shrifty. V etom sluchaet slduet libo: 1) zakommentirovat' pervuyu stroku v OWfontpath !$OPENWINHOME/lib/X11/fonts/cyrill-aliases++ V DANNOJ VERSII PAKETA |TA STROKA KAK RAZ ZAKOMMENTIROVANA (VYKLYUCHENA). 2) Pered zapuskom programmy nabrat' vruchnuyu (ili iz komandnogo fajla) % xset -fp $OPENWINHOME/lib/X11/fonts/cyrill-aliases++ (chto udalyaet etot katalog iz puti poiska fontov) Nabor PostScript Adobe Type I fontov. ===================================== Dannye fonty licenzirovany u kompanii Paragraph. Ih ispol'zovanie: -fn - naprimer xfd -fn XeniaExtendedC-Bold-40 xterm -fn AcademyC-14 xfd - programma prosmotra fontov, poleznaya dlya togo, chtoby uznat' kak oni vyglyadyat. Fonty, pomechennye nizhe znachkom '+', ne mogut byt' ispol'zovany okonnoj sistemoj i PostScript printerami, nachinaya s HP LaserJet 4 (fonty ustareli). Odnako NeWSprint v sostoyanii pechatat' fajly, sdelannye s ih ispol'zovaniem. Tem ne menee rekomenduetsya ih ne ispol'zovat'. Fonty v al'ternativnoj kodirovke dlya PC: Courier866-normal Courier866-Bold Courier866-BoldItalic Courier866-Italic Fonty v tr£h populyarnyh kodirovkah: MS Windows 1251 ISO 8859/5 KOI-8 AcademyC-Bold AcademyC5-Bold AcademyCK-Bold + AcademyC-Italic AcademyC5-Italic AcademyCK-Italic AcademyC AcademyC5 AcademyCK AdverGothicC AdverGothicC5 AdverGothicCK AstronC AstronC5 AstronCK + BalticaC-Bold BalticaC5-Bold BalticaCK-Bold + BalticaC-Italic BalticaC5-Italic BalticaCK-Italic + BalticaC BalticaC5 BalticaCK BetinaScriptC-Bold BetinaScriptC5-Bold BetinaScriptCK-Bold BetinaScriptC BetinaScriptC5 BetinaScriptCK + BodoniC-Bold BodoniC5-Bold BodoniCK-Bold + BodoniC-BoldItalic BodoniC5-BoldItalic BodoniCK-BoldItalic + BodoniC-Italic BodoniC5-Italic BodoniCK-Italic + BodoniC BodoniC5 BodoniCK + BodoniCondC BodoniCondC5 BodoniCondCK CompactC-Bold CompactC5-Bold CompactCK-Bold CompactC-BoldItalic CompactC5-BoldItalic CompactCK-BoldItalic CompactC-Italic CompactC5-Italic CompactCK-Italic CompactC CompactC5 CompactCK CorridaC CorridaC5 CorridaCK CourierC-Bold CourierC5-Bold CourierCK-Bold CourierC-BoldItalic CourierC5-BoldItalic CourierCK-BoldItalic CourierC-Italic CourierC5-Italic CourierCK-Italic CourierC CourierC5 CourierCK DecorC DecorC5 DecorCK DidonaC DidonaC5 DidonaCK FreeSetC-Bold FreeSetC5-Bold FreeSetCK-Bold FreeSetC FreeSetC5 FreeSetCK FuturaEugeniaC FuturaEugeniaC5 FuturaEugeniaCK FuturisC FuturisC5 FuturisCK FuturisXC-Bold FuturisXC5-Bold FuturisXCK-Bold FuturisXC FuturisXC5 FuturisXCK FuturisXCondC-Bold FuturisXCondC5-Bold FuturisXCondCK-Bold FuturisXCondC FuturisXCondC5 FuturisXCondCK InformC-Bold InformC5-Bold InformCK-Bold InformC InformC5 InformCK IzhitsaC IzhitsaC5 IzhitsaCK JournalC-Bold JournalC5-Bold JournalCK-Bold JournalC-Italic JournalC5-Italic JournalCK-Italic JournalC JournalC5 JournalCK JournalSansC-Bold JournalSansC5-Bold JournalSansCK-Bold JournalSansC-Italic JournalSansC5-Italic JournalSansCK-Italic JournalSansC JournalSansC5 JournalSansCK LazurskiC-Bold LazurskiC5-Bold LazurskiCK-Bold LazurskiC-BoldItalic LazurskiC5-BoldItalic LazurskiCK-BoldItalic LazurskiC-Italic LazurskiC5-Italic LazurskiCK-Italic LazurskiC LazurskiC5 LazurskiCK MonoCondensedC-Bold MonoCondensedC5-Bold MonoCondensedCK-Bold MonoCondensedC-BoldItalic MonoCondensedC5-BoldItalic MonoCondensedCK-BoldItal MonoCondensedC-Italic MonoCondensedC5-Italic MonoCondensedCK-Italic MonoCondensedC MonoCondensedC5 MonoCondensedCK MyslC-Bold MyslC5-Bold MyslCK-Bold MyslC-BoldItalic MyslC5-BoldItalic MyslCK-BoldItalic MyslC-Italic MyslC5-Italic MyslCK-Italic MyslC MyslC5 MyslCK NewtonC-Bold NewtonC5-Bold NewtonCK-Bold NewtonC-BoldItalic NewtonC5-BoldItalic NewtonCK-BoldItalic NewtonC-Italic NewtonC5-Italic NewtonCK-Italic NewtonC NewtonC5 NewtonCK NewtonXC NewtonXC5 NewtonXCK ParsekC ParsekC5 ParsekCK PetersburgC-Bold PetersburgC5-Bold PetersburgCK-Bold PetersburgC-BoldItalic PetersburgC5-BoldItalic PetersburgCK-BoldItalic PetersburgC-Italic PetersburgC5-Italic PetersburgCK-Italic PetersburgC PetersburgC5 PetersburgCK PragmaticaC-Bold PragmaticaC5-Bold PragmaticaCK-Bold PragmaticaC-BoldItalic PragmaticaC5-BoldItalic PragmaticaCK-BoldItalic PragmaticaC-Italic PragmaticaC5-Italic PragmaticaCK-Italic PragmaticaC PragmaticaC5 PragmaticaCK PragmaticaCondC-Bold PragmaticaCondC5-Bold PragmaticaCondCK-Bold PragmaticaCondC PragmaticaCondC5 PragmaticaCondCK QuantAntiquaC-Bold QuantAntiquaC5-Bold QuantAntiquaCK-Bold QuantAntiquaC-Italic QuantAntiquaC5-Italic QuantAntiquaCK-Italic QuantAntiquaC QuantAntiquaC5 QuantAntiquaCK SchoolBookC-Bold SchoolBookC5-Bold SchoolBookCK-Bold SchoolBookC-BoldItalic SchoolBookC5-BoldItalic SchoolBookCK-BoldItalic SchoolBookC-Italic SchoolBookC5-Italic SchoolBookCK-Italic SchoolBookC SchoolBookC5 SchoolBookCK StandardPosterC StandardPosterC5 StandardPosterCK TextBookC-Bold TextBookC5-Bold TextBookCK-Bold TextBookC-Italic TextBookC5-Italic TextBookCK-Italic TextBookC TextBookC5 TextBookCK XeniaC XeniaC5 XeniaCK XeniaCondensedC XeniaCondensedC5 XeniaCondensedCK XeniaExtendedC-Bold XeniaExtendedC5-Bold XeniaExtendedCK-Bold XeniaExtendedC XeniaExtendedC5 XeniaExtendedCK XeniaWesternC-Italic XeniaWesternC5-Italic XeniaWesternCK-Italic ZhikharevC ZhikharevC5 ZhikharevCK Kak dobavit' svoyu podlozhku ekrana v CDE ======================================= Pust' u vas est' myfile.gif ili myfile.jpg Smotrite etot fajl pri pomoshchi programmy /usr/local/bin/xv myfile.gif Nazhmite v okne PRAVOJ knopkoj myshi. V menyu vybiraete punkt "Save". V menyu formatov vybiraete XPM/FullColor/OK. Zatem Quit. V itoge vy poluchaete fajl myfile.xpm Dalee pereimenujte ego: mv myfile.xpm myfile.pm Zatem posmotrite KONEC etogo fajla redaktorom vi vi myfile.pm Fajl dolzhen konchat'sya tak: ......" }; Esli nizhe est' musor - udalite ego. Teper' proverka: sxpm myfile.pm dolzhno pokazat' etot obraz. Teper' pomestim etot obraz v standartnoe mesto: mv myfile.pm /etc/dt/backdrops/myfile.pm Teper' vy mozhete vybrat' ego v menedzhere oformleniya vida rabochego stola. Mozhno zadat' fon vruchnuyu: v fajle $HOME/.dt/sessions/home/dt.resources Sleduet napisat' stroki Dtwm*0*ws4*backdrop*image: myfile gde 4 - nomer workspace ot NULYA nachinaya. Esli vy hotite ispol'zovat' etu kartinku kak zastavku pri vhode v sistemu (dlya dtlogin), to vam sleduet zadat' v fajle /etc/dt/config/Xresources stroku: Dtlogin*logo*bitmapFile: /etc/dt/backdrops/myfile.pm Dopolnitel'nye programmy. ========================= Vsyakaya vsyachina pomeshchena v katalog /usr/local, real'no razmeshch£nnyj v /opt/local. Obychno v /usr/local razmeshchayutsya chasto ispol'zuemye, no ne standartnye programmy, vrode programm iz GNU. /usr/local (to est' /opt/local) mozhet trebovat' do soten Megabajt diskovogo prostranstva. K primeru, dovol'no nebol'shoj local na mashine avtora paketa zanimaet 18 MB. |ti programmy dolzhny sohranyat'sya pri pereinstallyacii sistemy, poetomu /usr/local dolzhen byt' libo otdel'noj fajlovoj sistemoj (ili razdelom diska), libo razmeshchat'sya na sohranyaemoj oblasti (kakovoj obychno yavlyaetsya /opt). 1) S paketom postavlyaetsya virtual'nyj okonnyj menedzher /usr/local/bin/olvwm, podrobnuyu instrukciyu po kotoromu vy mozhete najti po komande man olvwm man olvwmrc olvwm pozvolyaet imet' mnogo graficheskih terminalov na odnom (virtual'nye ekrany), a takzhe pozvolyaet rabotat' s oknami razmerom bol'she ekrana terminala. ------------------------------------------------------------- | Pereklyuchenie ekranov po Meta (klavisha s rombom) + Fn. | ------------------------------------------------------------- Vy mozhete zadat' zapusk opredel£nnyh programm srazu na zadannom virtual'nom ekrane pri pomoshchi fajla $HOME/.olvwmrc, naprimer: Screen 4 { AnswerBook } Screen 5 { Audio } 2) programmy perekodirovki iz odnoj kodirovki v druguyu, razmeshch£nnye v /usr/local/bin koi2iso < KOI_file > ISO_file koi2iso -from < ISO_file > KOI_file koi2win [-plain] < KOI_file > MS_Windows_file koi2win [-plain] -from < MS_Windows_file > KOI_file koi2dos - programma perekodirovki KOI-8 v al'ternativnuyu kodirovku dlya IBM PC (MS DOS). koi2dos -from - iz al'ternativnoj kodirovki v KOI-8 chcode [-replace] files.... chcode [-r] files.... programma perekodirovki iz lyuboj kodirovki v lyubuyu. Klyuch -replace (ili -r) zada£t, chto fajl v novoj kodirovke zamestit ishodnyj fajl na prezhnem meste. Bez etogo klyucha perekodirovannyj fajl vyda£tsya v standartnyj vyvod. V kachestve i mogut byt' ispol'zovany: koi_8 mswcyr iso_8859_5 altdos 3) Programma dlya smeny kodirovki na klaviature na letu: xloadmap - zagruzhaet kodirovku, kotoruyu ona vybiraet po soderzhimomu peremennoj okruzheniya $LANG. Esli peremennaya ne opredelena - zagruzhaetsya koi_8. xloadmap - zagruzhaet kodirovku po imeni. V kachestve imeni dopustimy koi_8 iso_8859_5 mswcyr altdos 4) Razlichnye programmy: whichlang - pytaetsya opredelit' tip russkoj kodirovki, ispol'zovannoj v dannom fajle. Ispol'zovanie standartnogo vvoda: whichlang -- xspy - demon, indiciruyushchij v verhnem pravom uglu ekrana sostoyanie klavish i modifikatorov, a takzhe koordinaty kursora myshi. |tot demon zazhigaet lampochku Compose vmesto lampochki CapsLock. xfonts - demonstrator russkih fontov. cxterm - cvetnoj X-terminal (smotri man cxterm). On osnovan na MITovskom xterm i yavlyaetsya chast'yu distributiva X Window System. On (v otlichie ot vseh Sun-ovskih programm) ne ispol'zuet ni OpenLook (XView) ni Motif. Vy mozhete pereklyuchat' razmer shriftov v okne pri pomoshchi menyu, vyzyvaemogo po CTRL + PravayaKnopkaMyshi. |to edinstvennaya konsol', podderzhivayushchaya psevdografiku. Zapustite komandu /usr/local/bin/pseudographics dlya polucheniya spiska kodov psevdograficheskih simvolov. VNIMANIE! Edinstvennyj Adobe Type1 font, podderzhivayushchij psevdografiku - eto semejstvo Courier866. Poetomu pechat' fajlov, soderzhashchih psevdografiku, sleduet osushchestvlyat' cherez fil'tr ensc (smotri nizhe), kotoryj perekodiruet tekst v MS DOS al'ternativnuyu kodirovku i ispol'zuet shrifty Courier866-normal Courier866-Bold Courier866-Italic Courier866-BoldItalic Poprobujte komandu pseudographics | ensc | dolp cxterm vypolnyaet interpretator komand $SHELL, esli ne ukazano inache. Esli SHELL=/bin/csh (ili vcsh), to csh vypolnyaet komandnyj fajl ~/.cshrc Esli vyzyvat' cxterm -ls to v okne zapuskaetsya "login shell", vypolnyayushchij posledovatel'no: ~/.cshrc ~/.login dlya csh ili $HOME/.profile dlya sh, ksh Selekciya teksta v okne cxterm vypolnyaetsya tak: nazhat' LevuyuKnopkuMyshi - derzha knopku vesti mysh' - otpustit' knopku ili klik LevojKnopkoj - pomestit' mysh' v konec - klik PravojKnopkoj Rasshirenie selekcii - klik PravojKnopkoj. Snyatie selekcii - klik LevojKnopkoj vne okna. xterm.altdos - terminal s CP866 kodirovkoj (special'no dlya teh neschastnyh, kotorye eshch£ ne izbavilis' ot tyazh£logo naslediya MS DOS). gzip i gunzip - GNU arhivator: sozda£t *.z fajly. gzip zameshchaet ishodnyj fajl zakompressirovannym. gunzip zameshchaet ishodnyj fajl *.z raskompressirovannym. zcat - programma vydachi *.z fajlov v standartnyj vyvod, naprimer zcat archive.tar.z | tar xvf - vcsh - csh s redaktirovaniem stroki (smotri man vcsh). wm - window manager dlya alfavitno-cifrovyh terminalov (sm man wm). less - programma prosmotra fajlov (analog more), umeyushchaya prokruchivat' fajl kak vper£d, tak i nazad. sxpm - programma prosmotra XPM kartinok. xv - versii 3. Rasprostranyaetsya kak freeware, avtor bradley@cis.upenn.edu programma prosmotra rastrov v razlichnyh formatah. xloadimage - analogichnaya, no bolee prostaya programma. Pozovite xloadimage -help. Zagruzka krasivogo fona okna: dobav'te v vash ~/.xinitrc ili ~/.openwin-init stroku toolwait xloadimage -onroot /usr/openwin/share/images/raster/bg.rs cproto - programma generacii prototipov funkcij dlya yazyka Si stilya Kerningana i Richchi (sm. man cproto) mailx - russkoyazychnyj komandnyj interfejs k elektronnoj pochte RelCom. Ego nastroechnye fajly - v /usr/local/lib/mail Smotri man mailx. Sistemnyj administrator OBYAZAN nastroit' fajl /usr/local/lib/mail/maildomain i /usr/local/lib/mail/Mail.rc zapisav v nego imya vashego pochtovogo domena. Stroka From: vashego pis'ma sostavlyaetsya po shablonu headline From '$r <$u@$h>' (smotri fajl Mail.rc), gde $u - imya pol'zovatelya, a $h - imya pochtovogo domena. Esli ono ne zadano v fajle - ispol'zuetsya kratkoe imya vashej mashiny (hostname). Esli vash pochtovyj adres user@host.msk.su to zapishite v /usr/local/lib/mail/maildomain stroku host.msk.su Mozhno bylo by sdelat' etot process konstruirovaniya imeni bolee intellektual'nym, no tak - po moemu opytu - proshche. quatro - programma dlya pereformatirovaniya PostScript fajlov. K primeru, pechat' po dve stranicy na stranice bumagi: zcat file.ps.gz | quatro -2z | dolp Smotri spisok klyuchej po quatro -h killproc Programma dlya ubivaniya processa po imeni: killproc xclock strlook Programma dlya pokaza steka STREAMS modulej. pcal - programma dlya pechati kalendarej na yazyke PostScript pcal -w pechataet kalendar' na ves' god Smotri man pcal Vyzov: pcal | dolp pcal -w | dolp mosaic - Internet-ovskij gipertekst. smtpgate - perekodirovshchik pochty dlya PCshek. Smotri README v /usr/local/src/smtpgate/* pop2d - POP-2 demon s perekodirovkoj bukv. Smotri tam zhe. webcp - programma rekursivnogo kopirovaniya WEB serverov. Smotri /usr/local/src/webcp/* V kachestve poleznoj dlya uma pishchi rekomenduetsya chtenie dokumentov man vcsh man cbook man mime 5) Programmy konvertirovaniya Adobe Type I fontov v binarnyj ili tekstovyj vid. Smotri man t1ascii (1), t1asm (1), t1binary (1), t1disasm (1), unpost (1). Vremennaya smena yazyka. ====================== Kak vam uzhe stalo yasno, yazyk opredelyaetsya naborom tr£h komponent: - peremennoj okruzheniya LANG dlya locale. - fontom. - raskladkoj klaviatury. Pokazhem, kak mozhno zapustit' cxterm, ispol'zuyushchij druguyu kodirovku, k primeru mswcyr. Komandnyj fajl dlya etogo dolzhen vyglyadet' tak: #!/bin/sh xloadmap mswcyr LANG=ru.mswcyr cxterm -fn crcW-12 xloadmap # Vosstanovit' predydushchuyu raskladku klaviatury po $LANG exit 0 Nastrojka vremennoj zony. ========================= Esli vy ne v prestol'nom grade Moskve ili zhivete ne po moskovskomu vremeni, vam sleduet nastroit' fajly otnosyashchiesya k TIMEZONE. 1) V kataloge /usr/share/lib/zoneinfo nahoditsya fajl /usr/share/lib/zoneinfo/Moscow.src Prochitajte man zic i man timezone i po dannomu obrazcu sostav'te svoj fajl s opisaniem vremennoj zony dlya vashego goroda, pust' eto fajl XXX dlya zony Russia/Town. Vypolnite komandu zic XXX Ona sozdast fajl /usr/share/lib/zoneinfo/Russia/Town 2) Nastrojte fajly /etc/timezone -- Russia/Town imya_NIS_domena_vashej_mashiny /etc/default/init -- TZ=Russia/Town Obratite vnimanie na fajl /etc/default/init - v nem soderzhatsya peremennye okruzheniya, vystavlyaemye dlya VSEH pol'zovatelej pri ih vhode v sistemu. Povedenie knopki v verhnem levom uglu okon. =========================================== V Solaris 1.1 nazhatie knopki SELECT (levoj) myshi nad treugol'noj knopkoj v verhnem levom uglu okna privodilo k ikonifikacii okna. V Solaris 2.x po umolchaniyu proyavlyaetsya okonnoe menyu. |to povedenie zada£tsya parametrom OpenWindows.SelectDisplaysMenu: False ili True V fajle Xdefaults ili ~/.OWdefaults True - sootvetstvuet proyavke menyu. False - vypolneniyu pervoj komandy menyu, v dannom sluchae - ikonifikacii okna (Close). Dannyj paket ustanavlivaet eto znachenie v False. OpenWindows.SelectDisplaysMenu: False Resize Cursors ============== Po umolchaniyu olwm i olvwm dlya izmeneniya razmerov okna ispol'zuyut kursor v vide kruzhochka. Vy mozhete ispol'zovat' dlya kazhdogo ugla okna svoj sobstvennyj kursor-ugolok, esli zadadite v fajle ~/.OWdefaults ili ~/.Xdefaults takoj resurs: OpenWindows*CursorSpecialResize: True Opisanie terminala ================== Cvetnoj X-terminal cxterm podderzhivaet psevdografiku i cveta. Programmy vcsh, le, wm pol'zuyutsya etimi vozmozhnostyami. V fajl /etc/termcap (kotoryj est' symlink na /usr/share/lib/termcap) zanositsya opisanie terminala xterm-Sg dlya cxterm. Dlya ispol'zovaniya vcsh vam sleduet opisat' sleduyushchie parametry: f1 f2 ... f9 f0 f. f- opisateli dlya funkcional'nyh klavish F1 F2 F9 F10 F11 F12 kh - klavisha HOME kH - klavisha END kN - klavisha PgDn (Next) kP - klavisha PgUp (Previous) kI - klavisha Insert kD - klavisha Del kb - klavisha BackSpace kB - klavisha BACKTAB (Shift + TAB) kl - klavisha strelka vlevo kr - klavisha strelka vpravo ku - klavisha strelka vverh kd - klavisha strelka vniz gs - komanda vklyucheniya rezhima psevdografiki ge - komanda vyklyucheniya rezhima psevdografiki g1 - opisateli tonkih psevdograficheskih ramok g2 - opisateli tolstyh psevdograficheskih ramok g1=HV123456789 H - gorizontal'naya liniya V - vertikal'naya liniya 7--8--9 | | | 4--5--6 | | | 1--2--3 STREAMS-modul' transliteracii (perekodirovki). ============================================== Razlichnye mashiny, podklyuch£nnye k stancii cherez posledovatel'nye porty ili set' mogut imet' razlichnye kodirovki. Harakternym primerom yavlyaetsya telnet v PC NFS, gde PC imeet kodirovku "Al'ternativnaya DOS", a stanciya k primeru - KOI-8. Pri kommunikacii s takimi abonentami dolzhno proishodit' preobrazovanie kodirovki. Dlya etogo v sostave paketa imeetsya STREAMS-modul' "trcode". PROGRAMMA POLXZOVATELYA write() read() sistemnye ioctl() vyzovy | A | | |WRITE |READ | | [==========================] ttcompat [==========================] ldterm [==========================] trcode | | V | ekran klaviatura drajver ustrojstva ######### ============ Kazhdyj iz potokov: READ i WRITE mozhet nahodit'sya v dvuh sostoyaniyah: NORMAL i ALTER. Kazhdoe iz sostoyanij imeet svoyu perekodirovochnuyu tablicu, perekodiruyushchee idushchij po potoku simvol v nekij drugoj. |ti tablicy mogut zagruzhat'sya iz programmy pri pomoshchi vyzova ioctl(), libo iz nekotorogo nabora standartnyh tablic. Sobstvenno "sostoyanie" i opredelyaet to, cherez kotoruyu iz tablic proishodit perekodirovka. Imeyutsya takzhe pereklyuchatel'nye simvoly: popadanie takogo simvola v potok vyzyvaet pereklyuchenie sostoyaniya, sam simvol pri etom vych£rkivaetsya iz potoka. Pereklyuchatel'nye simvoly mogut sovpadat', togda povtornyj vvod pereklyuchatel'nogo simvola menyaet sostoyanie na protivopolozhnoe. Obychno simvoly-pereklyuchateli aktivirovany tol'ko na storone READ (to, chto postupaet v mashinu s klaviatury). Po umolchaniyu zhe oni vyklyucheny vovse ('\0). Simvol CTRL/N pereklyuchaet sostoyanie NORMAL --> ALTER Simvol CTRL/O pereklyuchaet sostoyanie ALTER --> NORMAL Krome togo, modul' "trcode" ved£t podsch£t simvolov, proshedshih cherez nego v obeih napravleniyah. |ti sch£tchiki mogut byt' zaprosheny programmoj i mogut byt' ispol'zovany dlya podsch£ta traffika. Interfejs iz yazyka "Si". ------------------------ poka ne opisan v dannom dokumente. Komandnyj interfejs. -------------------- V pakete imeyutsya takzhe dve programmy, pozvolyayushchie ispol'zovat' sistemnye vyzovy k modulyu "trcode" iz komandnoj stroki. 1) Programma strlook - vyda£t spisok modulej, nahodyashchihsya v STREAMe. strlook - vyda£t informaciyu pro vash upravlyayushchij terminal. strlook ... - vyda£t informaciyu pro perechislennye ustrojstva. strlook -i - pro stdin strlook -o - pro stdout |ta komanda pokazyvaet tekushchie flagi i sostoyanie modulya "trcode", esli takovoj imeetsya v stream-e. 2) Programma trload - upravlenie modulem "trcode". trload -i vypolnyaet komandy po kanalu stdin trload -o stdout (umolchanie) trload -e stderr trload -t /dev/tty |ti klyuchi dolzhny byt' PERVYMI v komandnoj stroke. trload [-v] -query trload [-v] -q Bez klyucha -v vyda£t kod otveta 0, esli modul' trcode est' na steke modulej; 1, esli ego net. S klyuchom -v eshch£ i raspechatyvaet stek STREAMS modulej. trload [-v] trload -load Zagruzhaet modul' trcode v STREAM. Poluchaetsya sleduyushchaya konfiguraciya: ttcompat - modul' sovmestimosti s BSD ldterm - line discipline, smotri man termio i termios trcode - modul' perekodirovki Klyuch -v zastavlyaet napechatat' staruyu i novuyu konfiguracii. trunload [-v] trload -u trload -unload Vygruzhaet modul' trcode iz STREAMa. Poluchaetsya sleduyushchaya konfiguraciya: ttcompat ldterm trload -push Zagruzhaet modul' trcode na vershinu STREAMa. trload -pop Vygruzhaet pervyj sverhu modul' trcode iz STREAMa. Moduli, lezhavshie vyshe nego, kladutsya obratno na STREAM. trload -tname Zagruzhaet v modul' trcode odnu iz predopredel£nnyh tablic perekodirovki. Format sleduyushchij (skobki <> ne vhodyat v imya, dvoetochie - vhodit): RN:: RA:: WN:: WA:: R oznachaet zagruzku v kanal READ W WRITE N oznachaet zagruzku tablicy dlya sostoyaniya NORMAL A ALTER i - imena kodirovok: koi_8 iso_8859_5 mswcyr altdos Para ":" zada£t zagruzku tablicy, perekodiruyushchej iz kodirovki v kodirovku Est' eshch£ sleduyushchie predopredel£nnye tablicy: I:I - nichego ne perekodirovat' (samo v sebya) qwerty:koi_8 qwerty:iso_8859_5 qwerty:mswcyr Tri poslednih tablicy prednaznacheny dlya raboty s terminalom, ne podderzhivayushchim vos'mibitovyj vvod s klaviatury. |ti tablicy pozvolyayut perekodirovat' kody latinskih klavish qwerty... QWERTY... v sootvetstvuyushchie russkie kody jcuken... JCUKEN... pereklyuchayas' mezhdu nimi po CTRL/N, CTRL/O. trload -tload Zagruzhaet v modul' trcode tablicu iz fajla. Parametr imeet vid: RN: RA: WN: WA: gde vy mozhete pridumat' proizvol'no po svoemu vkusu. Fajl s tablicej imeet sleduyushchij format: - pustye stroki i stroki, nachinayushchiesya s # - eto kommentarii. - fajl sostoit iz strok vida: # kommentarij '1' 200 'A' 201 243 253 0xFF 222 120 'A' 55 0xFE 66 ^G Pervaya kolonka zada£t kod simvola KOTORYJ nado perekodirovat', vtoraya - kod simvola V KOTORYJ nado perekodirovat'. Kod simvola mozhet zadavat'sya v lyuboj iz sleduyushchih form: 'c' - simvol predstavlyaet sam sebya 0xFF - shestnadcatirichnoe chislo ^C - CTRL/simvol \377 - vos'mirichnoe chislo 999 - desyatichnoe chislo Simvoly, ne perechislennye v dannom fajle, perekodiruyutsya sami v sebya. trload -rswitchN c trload -rswitchA c trload -wswitchN c trload -wswitchA c Zada£t simvoly pereklyucheniya sostoyanij. r - dlya READ, w - dlya WRITE. N - iz NORMAL v ALTER, A - iz ALTER v NORMAL. Simvol mozhet byt' ukazan v vide: ^- ili NO ili none - nulevoj bajt, vyklyuchaet simvol pereklyucheniya ^C - CTRL/bukva (dlya csh: "^C" ) c - prosto bukva trload -rstate N trload -rstate A trload -wstate N trload -wstate A Ustanavlivaet sostoyanie kanala: rstate - READ, wstate - WRITE. N - sostoyanie v NORMAL, A - v ALTER. Argumenty (krome -unload i -pop) mogut vystupat' v kombinacii: trload -o -v -push -tname RN:koi_8:altdos strlook Poskol'ku programmnye konveery v UNIX takzhe realizovany cherez STREAMS, my mozhem ispol'zovat' modul' "trcode" vnutri truby: date | ( trload -i -v -push -tname RN:koi_8:altdos ; cat ) ili (trload -o -push -tname WN:koi_8:altdos; date) | cat ili (trload -push -tname WN:koi_8:altdos; date) | cat budet poluchen otvet v al'ternativnoj DOSovskoj kodirovke (pri uslovii, chto date vyda£t v KOI-8). 3) Komandnyj fajl dosterm Zagruzhaet modul' trcode i sootvetstvuyushchie tablicy dlya ispol'zovaniya s telnet-om iz PC NFS. Posle vhoda s PC na stanciyu cherez telnet, naberite komandu dosterm. Ona zadast preobrazovanie iz Al'ternativnoj DOSovskoj kodirovki na PC v tu kodirovku, kotoraya zadana v vashej peremennoj sredy $LANG. 4) Komandnyj fajl dumbterm Zagruzhaet modul' trcode i sootvetstvuyushchie tablicy dlya ispol'zovaniya s "tupym terminalom" cherez CTRL/N CTRL/O i QWERTY-raskladku. Eshch£ primer: ~~~~~~~~~~ trload -tname RA:qwerty:koi_8 -rswitchN ^N -rswitchA ^O -escseq on -esclength 3 V dannom sluchae u nas imeetsya terminal, funkcional'nye klavishi i klavishi so strelkami kotorogo generiruyut ESC-posledovatel'nosti vida ESC [ A Esli my vklyuchili po CTRL/N russkij vvod, to podobnaya posledovatel'nost' vved£tsya kak ESC [ F i ne budet raspoznana programmoj chteniya funkcional'nyh klavish (ibo eto ne sootvetstvuet opisaniyam v terminfo ili termcap). Dlya etogo predusmotreny tri klyucha, obespechivayushchie otmenu perekodirovki v russkie bukvy ESC-posledovatel'nostej. trload -esc c Zada£t simvol, oboznachayushchij nachalo ESC-posledovatel'nosti. Po umolchaniyu eto simvol ESC - on zhe ^[ ili '\033' trload -escseq on trload -escseq off Vklyuchit'/vyklyuchit' prosmotr ESC-posledovatel'nostej. Po umolchaniyu vklyuch£n. trload -esclength N (N obychno 3) Ne perekodirovat' ESC-posledovatel'nosti dliny N. Po umolchaniyu 0 - vyklyucheno. To est', esli so vvoda postupil simvol ESC (ukazannyj v -esc c), to NE perekodirovat' ego i posleduyushchie N-1 simvolov. Tak dlya "ESC [ A" dlina kak raz ravna 3. Uvy, dannaya vozmozhnost' ne da£t resheniya pri ESC-posledovatel'nostyah peremennoj dliny, vrode ESC [ A i ESC [ 2 2 2 z Eshch£ primer: ~~~~~~~~~~ trload -load -tname RA:qwerty:koi_8 -rswitchN "^N" -rswitchA "^O" -escseq on -esctime 33 trload -esctime N Ispol'zuet inuyu strategiyu raboty s ESC-posledovatel'nostyami. Pri poluchenii simvola ESC (zadannogo v -esc C), otmenyaetsya perekodirovka na vvode na vremennoj interval N tikov (v sekunde soderzhitsya 100 tikov - dlya Solaris 2.x). Pri etom posledovatel'nosti vrode ESC [ A ESC [ 2 2 2 z generiruyutsya "kompaktno vo vremeni" i uspevayut projti cherez modul' perekodirovki za eto korotkoe vremya. Zatem perekodirovka avtomaticheski vosstanavlivaetsya. |tot podhod reshaet takzhe problemu odinochnogo ESC, posle kotorogo ne sleduyut nikakie inye simvoly, to est' vse posleduyushchie simvoly vvodimye pol'zovatelem nado perekodirovat' obychnym obrazom. Problemoj teper' yavlyaetsya vybor udachnogo intervala N. 1) Slishkom malen'kij interval mozhet okazat'sya nedostatochnym dlya prohozhdeniya vsej ESC-posledovatel'nosti. 2) Slishkom bol'shoj interval mozhet privesti k tomu, chto vy vs£ eshch£ budete imet' vystavlennyj flag otmeny perekodirovki, kogda e£ uzhe pora by nachat' vypolnyat'. Interval etot dolzhen byt' yavno men'she 1 sekundy. Na konsoli SPARC-stancii podhodyashchim yavlyaetsya znachenie 3 tika. Dlya terminalov, veroyatno, prigodno znachenie 33 = 1/3 sekundy. Imenno etot metod ispol'zovan v dumbterm. Eshch£ primer: ~~~~~~~~~~ Mogut byt' neskol'ko tipov ESC-posledovatel'nostej, vrode ESC [ A ^A A Poetomu predusmotreno neskol'ko simvolov, nachinayushchih ESC-posledovatel'nosti: trload -esc c trload -esc2 c trload -esc3 c trload -esc4 c Kak dobavlyat' Adobe Type I fonty v X Window System. =================================================== 1) Polozhit' fajly konturov i metrik Font.pfa Font.afm Font-Bold.pfa Font-Bold.afm Font-Italic.pfa Font-Italic.afm Font-BoldItalic.pfa Font-BoldItalic.afm v /usr/openwin/lib/X11/fonts/Type1 /usr/openwin/lib/X11/fonts/Type1/afm (dalee $DIR) ($DIR/afm) 2) Vzyat' i rukami dopisat' v fajl $DIR/fonts.scale Font.pfa -company-fontname-medium-r-normal--0-0-0-0-m-0-koi-8 Font-Bold.pfa -company-fontname-bold-r-normal--0-0-0-0-m-0-koi-8 Font-Italic.pfa -company-fontname-medium-i-normal--0-0-0-0-m-0-koi-8 Font-BoldItalic.pfa -company-fontname-bold-i-normal--0-0-0-0-m-0-koi-8 -p- dlya proporcional'nyh shriftov -m- dlya fixed wi