Andrej Bogatyrev. Paket kirilizacii Solaris 2.3 From: "Andrew S. Bogatyirev (Soft Eng)" (abs@opentech.olvit.ru) ¡ mailto:abs@opentech.olvit.ru Annotaciya: ========== Dannyj dokument opisyvaet posledovatel'nost' dejstvij sistemnogo administratora po ustanovke paketa rusifikacii Open Windows dlya Solaris 2.3 i vyshe, a takzhe funkcional'nye vozmozhnosti paketa. Posle installyacii paketa vy mozhete prochest' etu instrukciyu po komande man cyrillic Paket podderzhivaet sleduyushchie kodirovki: o KOI-8 (RFC-1489) - kotoraya ispol'zuetsya v elektronnoj pochte (ISO 6937-8) seti RelCom, a takzhe istoricheski soderzhitsya (GOST 19768-74) v ryade russkoyazychnyh programm dlya UNIX, (IBM CP-878) proishodyashchih iz firmy "Demos". Nedostatok etoj kodirovki tot, chto bukvy raspolozheny ne v alfavitnom poryadke (chto ne meshaet avtoram paketa ispol'zovat' imenno etu kodirovku :). KOI = Kod Obmena Informaciej. Smotri: xv $OPENWINHOME/share/images/cyr/koi8-r.gif o ISO 8859-5 - amerikanskij standart na russkie bukvy, prinyatyj bez kakogo-libo soglasovaniya s russkimi programmistami. Zato eto standart. Smotri: xfd -fn timescyr-20 o Microsoft 1251 - kodirovka, kotoraya ispol'zuetsya v Microsoft Windows. De-fakto standart na russkuyu kodirovku v mire PC. Izvestna takzhe pod nazvaniem Cyrillic ANSI i IBM CP-1251 (Code Page 1251) (na samom dele eto ob®edin£nnyj korporativnyj standart IBM i Microsoft). o Upominaetsya takzhe kodirovka IBM CP-866, izvestnaya kak "al'ternativnaya kodirovka dlya MS DOS", odnako shrifty i raskladka klaviatury dlya ne£ ne podderzhivayutsya. VNIMANIE! Dannyj paket NE rabotaet s Solaris 1.x, Solaris 2.0, 2.1, 2.2 VNIMANIE! POLNYJ nabor Adobe fontov i polnyj nabor vseh perechislennyh programm mozhet byt' poluchen tol'ko na special'nyh usloviyah. Obychnyj distributiv soderzhit sil'no urezannyj nabor Adobe fontov i programm. Avtor takzhe solasen vydat' besplatno ishodnye teksty otdel'nyh utilit. ADRES DLYA KONTAKTOV: abs@openwin.msk.su (Andrej Sergeevich Bogatyr£v - avtor) balter@lvs.msk.su (Boris Al'terman - sales) ssc@decart.npi.msu.su (Igor' Luk'yanov - sales) OTVETSTVENNOSTX: Avtor ne nes£t otvetstvennosti za rabotosposobnost' postavlyaemogo paketa v neottestirovannyh s soglasiya i s uchastiem avtora prilozheniyah. Pol'zovatel' imeet pravo testirovat' paket na primenimost' v izbrannoj im prikladnoj sisteme, i v sluchae neudachi PROSITX avtora o dostizhenii sovmestimosti. Pol'zovatel' ne imeet prava TREBOVATX etogo i pred®yavlyat' pretenzii, poskol'ku: - paket testirovan dlya Solaris i v n£m garantirovanno rabotaet; - avtor ne imeet vozmozhnosti (i zhelaniya) testirovat' vse na svete prikladnye sistemy sam; - avtor ne mozhet nesti otvetstvennosti za oshibki v chuzhih sistemah; To est' avtor ne otvechaet za ispol'zovanie paketa ili ego komponent dlya celej, ne predusmotrennyh pri ego razrabotke, i ne ogovorennyh special'no s avtorom. Dopolnitel'nye vozmozhnosti ili oblast' primeneniya mogut: - byt' iniciativoj pol'zovatelya; - avtor soglasen okazat' neobhodimye konsul'tacii i dat' sovety, a takzhe okazat' posil'nuyu pomoshch'; - no ne garantiruet etogo i ne otvechaet za uspeh ili neudachu dannogo meropriyatiya. POLITIKA RASPROSTRANENIYA: - Odna licenziya da£t vam pravo ustanovki paketa - fontov: na ODNU mashinu. - MOWcyrKit: na vse mashiny v odnoj lokal'noj seti. - Nekotoraya chast' paketa yavlyaetsya "narodnym dostoyaniem" i mozhet razdavat'sya iz ruk v ruki bez ogranichenij. - SHrifty i ryad programm predstavlyayut soboj sobstvennost' ih avtorov i NE MOGUT razdavat'sya svobodno. Rastrovye shrifty razrabotany CHufarovskim (udarenie na 'o'). Masshtabiruemye shrifty razrabotany firmoj "Paragraf". - Ryad programm postavlyaetsya v ishodnyh tekstah. Vy imeete pravo modificirovat' i uluchshat' ih po svoemu usmotreniyu, odnako avtor vydvigaet USLOVIE: vy dolzhny soobshchit' emu o tom, chto vy sdelali (a eshch£ luchshe - i kak sdelali), daby avtor smog vnesti uluchsheniya v original i tem oblagodetel'stvovat' VSEH pol'zovatelej etogo paketa. - Obnovl£nnye versii paketa prezhnie ego pokupateli mogut poluchit' besplatno (no na svoj nositel'). Konsul'tacii - besplatno. Pozhelaniya prinimayutsya s interesom (no net garantii, chto oni budut realizovany NEMEDLENNO). "YA delal etot paket ne dlya prodazhi, a dlya sebya. Ezhednevno im pol'zuyus'." Uspehov! Andrej Bogatyr£v. =========================================================================== NETOCHNOSTI: Pardon. No kodirovki KOI-8 i ISO-8859-5 v oblasti psevdografiki vypolneny ne po standartu. Massa neudachnyh reshenij prinimaetsya po istoricheskim prichinam: snachala "tak bylo sdelano", a posle - len' peredelyvat'. - Prichina istoricheskaya: takie fonty i tablicy perekodirovki byli sdelany eshch£ do togo, kak ya prinyal v svoi ruki ves' etot proekt. Plyus k tomu: vs£ eto bylo gotovo eshch£ do togo, kak poyavilsya RFC-1489. - V ISO-8859-5 voobshche net psevdografiki. Krome togo, ya ne raschityval na Ukrainu i Belorussiyu. - V PostScript fontah psevdografiki takzhe prosto net. - V Relcom novosti iz FIDO gejtuyutsya s PCshnoj psevdografikoj. Fonty, ispol'zuemye u nas, sohranyayut etu psevdografiku, togda kak RFC-1489 portit e£. Takim obrazom, nasha tablica perekodirovki KOI-8 <==> CP-866 sootvetstvuet toj, kotoraya stoit na shlyuze Relcom <==> Fido, hotya i ne sootvetstvuet standartu. - Poryadok psevdograficheskih simvolov v RFC-1489 produman ploho, tochnee govorya, ne produman vovse. On ne opiraetsya na CP-866, vvodit svoj sobstvennyj poryadok, kotoryj, odnako, ves'ma ploh. |tot poryadok sootvetstvuet Unicode, i, kak obychno, priduman burzhuyami, kotorym bylo len' dumat' - lish' by kak. Moi soobrazheniya o tom, kak dolzhna byla by vyglyadet' tablica psevdografiki, vy mozhete uvidet' na kartinkah xv $OPENWINHOME/share/images/cyr/idea1.gif xv $OPENWINHOME/share/images/cyr/idea2.gif - "koi8-r" (RFC-1700) est' neudachnoe nazvanie dlya codeset, poskol'ku v Solaris okonnaya sistema ne v sostoyanii ispol'zovat' takie imena. V pare ...-encoding-registry ona trebuet, chtoby registry bylo cifroj, v to vremya kak v "koi8-r" bukva "r" - eto bukva, a ne cifra! Inache zhe etot font otvergaetsya. Esli vs£ eto odnazhdy vyzovet u kogo-nibud' neudobstva, ya gotov izmenit' poryadok bukv v fontah i tablicy perekodirovki odnogo codeset v drugoj. Izmeneniyu podvergnutsya: - raskladka simvolov v rastrovyh i Type1 fontah; - tablicy perekodirovki iz odnoj kodirovki v druguyu i vse programmy (make'em), pol'zuyushchiesya etimi tablicami (vse, kto sozda£t i ispol'zuet ctables.h); - raskladka psevdografiki v termcap i terminfo; - vozmozhny pravki v locale; - smena specsimvolov (vrode Nomer i Paragraf) v groff (tak kak v fontah oni mogut sdvinut'sya na inye pozicii); - estestvenno, proizojd£t pravka fajlov dannyh, ispol'zuyushchih staruyu raskladku psevdografiki; - russkij NeWSprint kit? =========================================================================== Ustanovka paketa. ================= Predislovie. ------------ o Distributiv soderzhit neskol'ko paketov: MOWcyrFnt - nabor russkih rastrovyh shriftov 1.6 MB MOWcyrKit - paket russifikacii 3.6 MB MOWcyrMsg - russkie soobshcheniya dlya CDE 0.7 MB MOWcyrPS - nabor russkih masshtabiruemyh shriftov 24.5 MB MOWlocal - nabor dopolnitel'nyh programm 31.8 MB MNPcyrKit - paket kirillizacii NeWSprint 2.5 0.3 MB GNUroff - GNU roff (sistema podgotovki tekstov) 7.5 MB GNUrofCyr - e£ kirillizaciya 11.6 MB Razdelenie sdelano so sleduyushchej cel'yu: paket so shriftami dovol'no velik v ob®£me. Vy mozhete ustanovit' ego na ODIN nekij NFS server, i importirovat' ego na klientskie mashiny cherez set'. Ustanovka paketa MOWcyrKit avtomaticheski eksportiruet katalog /usr/openwin. Na klientskih mashinah vy dolzhny pomestit' v /etc/vfstab stroki dlya montirovaniya cherez set' katalogov s servera /usr/openwin/lib/X11/fonts/cyrill /usr/openwin/lib/X11/fonts/cyrill-Type1 k analogichnym katalogam na vashej klientskoj mashine. Eshch£ luchshe ispol'zovat' dlya etogo automounter. Procedura. ---------- Na vashem CD ROMe nahodyatsya tri fajla, zatragivayushchie installyaciyu: cyrill.img - kirillizaciya gnukit.img - gcc install.sh - installyacionnyj skript Installyaciya dolzhna provodit'sya sleduyushchim obrazom: 1) Dolzhny byt' uzhe ustanovleny: a) Solaris 2.x (x >= 3) b) CDE (Common Desktop Environment) c) Networker (Solstice Backup) (esli trebuetsya) d) NeWSprint 2.5 (esli trebuetsya) Primechanie: esli vy odnazhdy pereinstalliruete CDE, vam neobhodimo pereinstallirovat' takzhe paket MOWcyrKit. 2) pkgadd -d cyrill.img MOWcyrFnt pkgadd -d cyrill.img MOWcyrKit pkgadd -d cyrill.img MOWcyrMsg pkgadd -d cyrill.img MOWcyrPS MOWlocal pkgadd -d cyrill.img GNUroff pkgadd -d cyrill.img GNUrofCyr if [ -d /opt/NeWSprint ] ; then pkgadd -d cyrill.img MNPcyrKit fi pkgadd -d gnukit.img GNUkit |ti komandy kak raz i pomeshcheny v fajl install.sh i mogut byt' vypolneny pri pomoshchi sh install.sh Ukazannyj poryadok installyacii paketov SUSHCHESTVENEN! Na voprosy installyatora sleduet otvechat': 1) Na vopros ob ispol'zuemoj kodirovke otvet'te - koi dlya KOI-8 (RFC-1489) - iso dlya ISO 8859-5 - mswcyr dlya kodirovki ANSI Cyrillic, ispol'zuemoj v Microsoft Windows (Microsoft 1251). Kodirovka Microsoft 866 ispol'zuetsya pod imenem altdos. Budut proinstallirovany neobhodimye fajly dlya vseh kodirovok, no iznachal'nye nastrojki budut sdelany dlya ukazannoj vami. 2) Na zapros o polnom imeni vashej organizacii otvet'te strokoj, kotoraya dolzhna budet poyavlyat'sya v pole Organization: vashih pisem v elektronnoj pochte. CHtoby ne otvechat' na etot vopros, mozhno pomestit' etu stroku v fajl /etc/organization 3) Na vopros "zapuskat' li XDM?" Otvechajte "yes" tol'ko esli vasha rabochaya stanciya imeet graficheskuyu konsol'. Otvechajte "no", esli u vas server bez konsoli ili s zel£nym terminalom. Zapusk XDM pri zagruzke sistemy proishodit v tom sluchae, esli imeetsya fajl /etc/xdm.run (pustoj). 4) Na zapros magicheskogo klyucha otvet'te strokoj, kotoruyu vam soobshchit prodavec dannogo paketa. *) Na ostal'nye voprosy otvechajte y (yes). Primer protokola postanovki paketa. ----------------------------------- Obratite vnimanie na poryadok: MOWcyrFnt MOWcyrKit MOWcyrMsg MOWcyrPS MOWlocal GNUroff GNUrofCyr Otvety pol'zovatelya oboznacheny _tekst_ # sh install.sh Processing package instance from OpenWindows Bitmap Cyrillic Fonts (SPARC) Version 2.3 for X11r5 ---------------------------------------------------------------- | | | Copyright (C) 1993,94,95 George Akimoff, Andrew Bogatyirev | | All Rights Reserved. | | | | Contains copyrighted software licensed from | | Moscow Center for SPARC-technology and | | Open Technologies, Ltd. | | Unauthorized duplication is strictly prohibited. | | | | Restricted rights of distribution are given to | | LVS Corporation and | | DEC Art | | | | Disassembly, decompilation, or other means of reducing | | the object code to human readable form | | is prohibited by the license agreement under which | | this code is provided to the user or company | | in possession of this copy. | | | ---------------------------------------------------------------- ## Processing package information. ## Processing system information. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing OpenWindows Bitmap Cyrillic Fonts as ## Installing part 1 of 1. /usr/openwin/lib/X11/fonts/cyrill/crc5-08.pcf.Z ................ ................ ................ /usr/openwin/lib/X11/fonts/cyrill/sscWi-24.pcf.Z [ verifying class ] Installation of was successful. Processing package instance from OpenWindows Cyrillic Kit (SPARC) Version 2.4.2 for X11r5 Using as the package base directory. ................ ................ ................ Which codeset will you use: KOI-8, ISO 8859-5, ANSI Cyrillic (MS Windows) ? Please type koi or iso [koi|iso|mswcyr]: _koi_ Please, enter default timezone or just hit [Russia/Moscow (Samara,Novosibirsk)]: _ENTER_ Russia/Moscow is to be used in /etc/timezone and /etc/default/init Please, enter Full name of your organization (for Email) > _Open Technologies, Ltd._ Organization: Open Technologies, Ltd. Please, enter your maildomain (for NIS/Email), such as hostname.msk.su [] > _openwin.msk.su_ Maildomain: openwin.msk.su Do you want to start X Display Manager ? [yes] _yes_ XDM start enabled Please type your magic key> _ ## Processing package information. ## Processing system information. 25 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. The following files are already installed on the system and are being used by another package: /usr/openwin/lib/Xinitrc Do you want to install these conflicting files [y,n,?,q] _y_ ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of this package [y,n,?] _y_ Installing OpenWindows Cyrillic Kit as ## Executing preinstall script. ................ ................ ................ To use Cyrillization You have to 1) add setenv LANG ru.koi_8 (RFC-1489) OR setenv LANG ru.iso_8859_5 OR setenv LANG ru.mswcyr (Microsoft 1251) into your .cshrc file (or .login) 2) check for /etc/skel/local.cshrc --> $HOME/.cshrc /etc/skel/local.login --> $HOME/.login /etc/skel/local.profile --> $HOME/.profile and copy them into your $HOME if needed. 3) Then you have to exit OpenWindows and re-start it again. 4) cd /etc/skel and read README* files *) You can switch between RUS/LAT by pressing of key. or key. On Sun X-terminal use key. Installation of was successful. Processing package instance from ................ ................ ................ Installation of was successful. Processing package instance from ................ ................ ................ Do you want to start WWW (HTTP) server ? [no] _no_ Do not start WWW server ................ ................ The following files are already installed on the system and are being used by another package: /usr/local/man/man3 Do you want to install these conflicting files [y,n,?,q] _y_ ## Checking for setuid/setgid programs. The following files are being installed with setuid and/or setgid permissions or are overwriting files which are currently setuid/setgid: /usr/bin/rbmail /usr/local/bin/le /usr/local/bin/traceroute /usr/local/bin/xwall /usr/local/etc/httpd/httpd Do you want to install these setuid/setgid files [y,n,?,q] _y_ This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of this package [y,n,?] _y_ Installing Set of local programs and sources (includes WWW) as ................ ................ ................ Installation of was successful. Processing package instance from GNU groff - text to PostScript formatting utility (SPARC) 1.09 ------------------------------------------- | Copyright (C) | | | | jjc@jclark.com (James Clark) | | | | and Free Software Foundation | ------------------------------------------- ## Processing package information. ## Processing system information. 2 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. The following files are already installed on the system and are being used by another package: /usr/local/man/man1 Do you want to install these conflicting files [y,n,?,q] _y_ ## Checking for setuid/setgid programs. Installing GNU groff - text to PostScript formatting utility as ................ ................ ................ Installation of was successful. Processing package instance from GNU groff Cyrillization (SPARC) 1 ................ ................ The following files are already installed on the system and are being used by another package: /usr/local/lib/groff/tmac/tmac.gs /usr/local/lib/groff/tmac/tmac.pspic /usr/local/lib/groff/tmac/troffrc Do you want to install these conflicting files [y,n,?,q] _y_ ## Checking for setuid/setgid programs. Installing GNU groff Cyrillization as ................ ................ ................ Installation of was successful. Processing package instance from ................ ................ This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of this package [y,n,?] _y_ Installing NeWSprint 2.5 Cyrillic Kit -- KOI-8 codeset as ................ ................ Installation of was successful. Processing package instance from ................ ................ ................ Installation of was successful. you have mail # REKOMENDUETSYA PEREZAGRUZITX SISTEMU V |TOM MESTE i vystavit' pravil'noe vremya komandoj date. Udalenie paketa. ---------------- V sluchae nuzhdy vy mozhete udalit' paket rusifikacii, vypolniv komandy pkgrm MOWlocal MOWcyrPS MOWcyrMsg MOWcyrKit MOWcyrFnt Ustanovili. CHto dal'she? ----------------------- Posle togo, kak ustanovka vypolnena, vy dolzhny dlya kazhdogo pol'zovatelya, kotoryj budet ispol'zovat' russkij yazyk (pust', naprimer, eto pol'zovatel' user). Skopirovat' .login .cshrc .profile iz /etc/skel v domashnij katalog pol'zovatelya user (~user), komandy nizhe napisany dlya csh cp /etc/skel/local.login ~user/.login cp /etc/skel/local.cshrc ~user/.cshrc cp /etc/skel/local.profile ~user/.profile Esli pol'zovatel' uzhe imeet odin iz etih fajlov, to imeet smysl modificirovat' ego sushchestvuyushchie fajly, a ne kopirovat' predlagaemye nami. Imenno takoe kopirovanie osushchestvlyaet komandnyj fajl /etc/tune_lang (opisanie privoditsya nizhe). Klyuchevymi v etih fajlah yavlyayutsya stroki: V .login setenv LANG ru.koi_8 V .profile LANG=ru.koi_8; export LANG zadayushchie ispol'zovanie russkogo yazyka v kodirovke KOI-8. setenv LANG ru.iso_8859_5 dlya ISO 8859-5 setenv LANG ru.mswcyr dlya CP1251 setenv LANG ru.altdos dlya CP866 I stroka stty cs8 -istrip erase ^H opredelyayushchaya vos'mibitovyj vvod/vyvod. Sostav paketa. ============== Paket predostavlyaet vam: 1) Russkuyu kartu klaviatury. 2) Russkie shrifty dlya X Window System. 3) Resursy sistemy X Window, prisposoblennye dlya ispol'zovaniya russkogo yazyka. 4) locale dlya russkogo yazyka. 5) Vklyuchaet ispol'zovanie X Display Manager. Nastrojka yazyka. ================ Dlya bystroj smeny ispol'zuemoj kodirovki predlagaetsya komandnyj fajl /etc/tune_lang kotoryj mozhet ispol'zovat'sya kak tune_lang koi spisok_imen_pol'zovatelej ili tune_lang iso spisok_imen_pol'zovatelej tune_lang mswcyr spisok_imen_pol'zovatelej Pol'zovatel' root v spiske zada£t yazyk "po umolchaniyu" dlya vsej sistemy. Ne trebuetsya pereinstallyaciya paketa dlya smeny yazyka. Kak pravilo dostatochno prosto zadaniya setenv LANG ru. v $HOME/.login i LANG=ru.; export LANG v $HOME/.profile CHastichnaya otmena lokalizacii. ============================= Inogda byvaet neobhodimo, chtoby data vydavalas' na anglijskom yazyke. Dlya etogo sleduet zadat' peremennuyu okruzheniya setenv LC_TIME C ili v fajle /etc/default/init LC_TIME=C Tehnicheskoe opisanie komponent. =============================== Russkaya karta klaviatury. ------------------------- Sushchestvuyut DVE shemy pereklyucheniya russkogo yazyka pri vvode. Uchtite, chto v rezhime russkoj klaviatury, vy ne mozhete vvodit' upravlyayushchie kody vrode CTRL/C ili CTRL/U, chtoby ih vvesti vy DOLZHNY snachala pereklyuchit'sya v rezhim latinskoj klaviatury. Uvy, takovo ustrojstvo standartnoj X Window System. Pravka biblioteki Xlib mozhet pomoch' ispravit' etu problemu, mesto izvestno, no... luchshe ne narushat' celostnost' firmennogo koda. ZHelayushchim avtor mozhet podskazat' - chto nado sdelat'. Shema pervaya: xmodmap ~~~~~~~~~~~~~~~~~~~~~ Pervaya shema ispol'zuet komandu xmodmap i fajly $OPENWINHOME/lib/locale/$LANG/Xmodmaprc Ona yavlyaetsya bolee ekonomichnoj, chem nasha vtoraya shema, ibo karta klaviatury ODIN raz zagruzhaetsya v X-server. Obychnym pol'zovatelyam rekomenduetsya ispol'zovat' imenno etu shemu. Zato vtoraya shema obladaet bol'shej obshchnost'yu. Pol'zovatel' mozhet PRINUDITELXNO ispol'zovat' shemu s xmodmap, sozdav v domashnem kataloge pustoj fajl $HOME/.UseXmodmap V etoj sheme: ********************************************************* * * * PEREKLYUCHENIE RUSSKOGO/LATINSKOGO SHRIFTA NA VVODE * * PROIZVODITSYA PRI POMOSHCHI KLAVISHI * * * * * * * * (sprava ot klavishi PROBEL) * * * * ili pri pomoshchi * * * ********************************************************* Pri perehode v russkij rezhim zagoraetsya lampochka na klavishe ********************************************************* * Na Sun X terminal-ah (vrode SPARCclassic X) * * pereklyuchenie RUS/LAT proizvoditsya klavishej * ********************************************************* Karty klaviatury opisany v fajlah $OPENWINHOME/lib/locale/ru.koi_8/Xmodmaprc $OPENWINHOME/lib/locale/ru.iso_8859_5/Xmodmaprc $OPENWINHOME/lib/locale/ru.mswcyr/Xmodmaprc Pereraskladka russkih klavish osnovana na sleduyushchej vozmozhnosti X Window: - funkciya XLookupString() podderzhivaet al'ternativnuyu tablicu kodov. - Dlya zagruzki etoj tablicy primenyaetsya komanda xmodmap, zagruzhayushchaya chetyr£hkolonochnuyu tablicu: pervye dve kolonki zadayut pervuyu gruppu klavish, vtorye dve - vtoruyu. V kazhdoj gruppe pervyj stolbec zada£t kod, vydavaemyj klavishej pri NEnazhatoj klavishe , vtoroj stolbec - pri nazhatoj. ! Key ! KEYBOARD GROUP 0 ! KEYBOARD GROUP 1 ! ! Normal Shift ! Normal Shift !------------------------------------------------------------------------ keysym a = a A 0xe4 0xc4 keysym s = s S 0xeb 0xcb ...... - Dlya pereklyucheniya grupp ispol'zuetsya modifikator mod2, skleenyj s edinstvennoj klavishej, fiksiruyushchej svo£ sostoyanie - modifikatorom lock. Modifikator lock ishodno soedin£n s klavishej Caps_Lock i fiksiruet Shift. Ego ispol'zovanie v dannoj funkcii otmenyaetsya, mod2 i lock naznachayutsya na klavishu Multi_key (ona zhe Compose). Smotri man xmodmap i razdel H.3.2.7 v tome 1 serii knig O'Reilly po X Window. !---------------------------------------------------------------------- ! Use COMPOSE and CapsLock keys as RUS/LAT switch keys. !---------------------------------------------------------------------- remove lock = Caps_Lock add mod2 = Multi_key add mod2 = Caps_Lock add lock = Multi_key !---------------------------------------------------------------------- ! Use COMPOSE and NumLock keys as RUS/LAT switch keys. !---------------------------------------------------------------------- !remove lock = Num_Lock !add mod2 = Multi_key !add mod2 = Num_Lock !add lock = Multi_key Posle etogo russkie bukvy vklyuchayutsya/vyklyuchayutsya libo klavishej Compose, libo CapsLock. Kak mozhno videt', imeetsya zakommentirovannyj vtoroj variant - pereklyuchenie RUS/LAT po NumLock. Pri etom v latinskom registre prodolzhaet rabotat' CapsLock - klavisha dlya fiksacii bol'shih bukv. CHtoby vybrat' etu versiyu, sleduet zakommentirovat' vosklicatel'nymi znakami pervyj blok i raskommentirovat' vtoroj. |to fajl /usr/openwin/lib/Xmodmaprc.X-sun Popytka ispol'zovat' dlya etoj celi predpisannuyu klavishu AltGraph (Mode_switch) k sozhaleniyu privodit k zavisaniyu okonnoj sistemy pri rabote MYSHXYU, kogda vklyuch£n russkij registr. Poka mysh' ne trogaem - vs£ otlichno. Est' podozrenie, chto eto povedenie ne X11 server a OpenLook Window Manager. K sozhaleniyu, X imeet tol'ko ODNU klavishu, pomnyashchuyu svo£ sostoyanie: edinstvennyj modifikator Lock. Poetomu ego ispol'zovanie v kachestve pereklyuchatelya RUS/LAT privodit k potere klavishi fiksacii verhnego registra (CapsLock): e£ tehnicheski nevozmozhno imet', ne modificiruya X Window System v storonu rasshireniya. Novaya karta klaviatury mozhet byt' prosmotrena komandami xmodmap xmodmap -pk Shema vtoraya: monitor vvoda xCyrInput ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ V etoj sheme pereklyuchenie kodovyh tablic osushchestvlyaet special'naya programma - xCyrInput. Pri kazhdom (uvy) nazhatii pereklyuchatel'noj klavishi ona perezagruzhaet kartu klaviatury v X-server. |to bolee nakladno, no zato: - vy mozhete vybrat' klavishu pereklyucheniya po svoemu vkusu (v tom chisle Shift_L+Shift_R). Pereklyuchenie RUS/LAT iznachal'no podklyucheno k knopke Mode_switch, kotoraya na Sun-ovskih mashinah sovpadaet s AltGraph (v nizhnem pravom uglu). E£ nazhatie otobrazhaetsya svetodiodom na knopke Compose. - mozhno derzhat' na ekrane neskol'ko programm, ispol'zuyushchih raznye kodovye tablicy ODNOVREMENNO. - rabotaet klavisha Pseudo CapsLock (na Sun eto Caps_Lock ), kotoraya pozvolyaet fiksirovat' verhnij registr v tom chisle i russkih bukv. Shift pri nazhatom PseudoLock da£t malen'kie bukvy. Nazhata li eta klavisha - otobrazhaetsya svetodiodom na ScrollLock i bukvoj L v okne "modifikatory". - eta programma takzhe otslezhivaet aktivnost' pol'zovatelya, i posle dolgoj pauzy (net dvizhenij myshi ili klaviatury) zapuskaet programmu zapiraniya ekrana. ***************************************************************************** * PROGRAMMA NAPISANA PO MOTIVAM I S ISPOLXZOVANIEM ISHODNYH TEKSTOV * * * * xrus-1.3.4 * * * * Aleksandra Luk'yanova * * lav@yars.free.net (Alexander V. Lukyanov) * * * * ftp://ftp.relcom.ru/x11/cyrillic/xrus-1.3.4.tar.gz *¡ ftp://ftp.relcom.ru/x11/cyrillic/xrus-1.3.4.tar.gz * * * RASPROSTRANYAETSYA SVOBODNO * ***************************************************************************** Avtor dannoj versii (abs@openwin.msk.su - Andrej Bogatyr£v) vyrazhaet glubochajshuyu priznatel'nost' A.Luk'yanovu za plodotvornuyu ideyu. Ishodnye teksty programmy nahodyatsya v /usr/local/src/xCyrInput Ispol'zovanie programmy: ------------------------ Osnovnaya ideya raboty etoj programmy - perehvat i otslezhivanie nazhatij VSEH klavish na klaviature. Pri etom ispol'zuetsya ta osobennost' X Window System, chto sobytiya ot okna mogut posylat'sya NESKOLXKIM programmam odnovremenno, prichem kazhdoj programme - svoi sobytiya (zakazannye eyu). Vtoraya ispol'zuemaya osobennost' - to, chto klientskaya programma mozhet zakazat' poluchenie sobytij ot LYUBOGO okna na ekrane, ne tol'ko ot svoego. Takim obrazom my mozhem otslezhivat' i nazhatie klavish nad CHUZHIMI oknami. Pereklyuchenie RUS/LAT iznachal'no podklyucheno k knopke Mode_switch, kotoraya na Sun-ovskih mashinah sovpadaet s AltGraph (v nizhnem pravom uglu). Pereklyuchenie proishodit takzhe pri nazhatii myshi nad graficheskoj knopkoj RUSSKIJ/LATIN v verhnem pravom uglu ekrana (pravaya knopka). Srednee menyu pozvolyaet "na letu" menyat' kodovuyu tablicu. Pri nazhatii Ctrl programma vremenno pereklyuchaetsya v latinskij rezhim, chtoby pravil'no otrabatyvlis' Ctrl/C i Ctrl/U. Nazhatie PRAVOJ knopki myshi nad oknom proyavlyaet menyu, v kotorom soderzhitsya strochka "Properties...". Vybor etoj strochki privodit k proyavke dialoga, v kotorom vy mozhete nastroit' ochen' mnogo raznoobraznyh vozmozhnostej, v tom chisle raskladku klavish na klaviature. Smotrim na Properties: DiskCheckPath - programma sledit za svobodnym mestom v neskol'kih katalogah i preduprezhdaet vas o ego ischerpanii. Spisok katalogov - v etom pole, cherez dvoetochie. V okoshke v pravom verhnem uglu ekrana otobrazhaetsya kolichestvo svobodnogo mesta, ostavsheesya v PERVOM v spiske kataloge. Application Codesets Pattern List - programma pozvolyaet ODNOVREMENNO derzhat' na ekrane neskol'ko programm-klientov, ispol'zuyushchih RAZNYE kodovye tablicy. Pri etom monitor avtomaticheski pereklyuchaet kodovye tablicy v zavisimosti ot imeni programmy, klassa programmy, imeni okna, argv[0]. Klass programmy mozhno uznat' komandoj xlsclients -l Spisok sootvetstviya oformlyaetsya v vide shablon_imeni1=imya_tablicy1:shablon_imeni2=imya_tablicy2:... SHablon imeni pishetsya v sile regulyarnogo vyrazheniya SHell. Primer: shablon: *866*=altdos Zapusk programmy: $ LANG=ru.altdos cxterm -T x866 -fn crcA-12 -e /bin/sh & Teper' peremeshchenie fokusa klaviatury v eto okno budet vyzyvat' pereklyuchenie klaviatury na 866 kodovuyu tablicu. Save - sohranyaet resursy v fajl $HOME/.Xdefaults Minusy podhoda, ispol'zovannogo v dannoj programme: --------------------------------------------------- Vysokaya reaktivnost' na medlennyh mashinah i pri bol'shom chisle klientskih programm, ibo 1) Kazhdoe pereklyuchenie - eto zagruzka 4h kolonochnoj tablicy po 132 knopki (posylka takogo paketa po seti) 2) Posle etogo KAZHDYJ KLIENT delaet po MappingNotify event vyzov XRefreshKeyboardMapping() i chitaet takoj zhe paket s servera. Neobhodima biblioteka /usr/dt/lib/libDtSvc.so.1 iz CDE, bez nee ne rabotaet. Shema tret'ya: ~~~~~~~~~~~~~ Odnovremennoe ispol'zovanie obeih shem. Mozhno odnovremenno ispol'zovat' oba metoda pereklyucheniya RUS/LAT. Dlya etogo nado: - sozdat' pustoj fajl $HOME/.UseXmodmap - pod CDE ne ubivat' xCyrInput - pod Open Look libo zapuskat' ego vruchnuyu, libo zanesti komandu zapuska v fajl $HOME/.openwin-init Zapusk programmy xCyrInput vruchnuyu: 1) pereklyuchit' klaviaturu v LATINSKIJ rezhim i ubedit'sya v etom, poprobovav nabrat' paru-druguyu bukv. 2) v okne terminal (xterm, cxterm) nabrat' komandu xCyrInput -daemon Russkie fonty. -------------- Osnovnye fonty: garnitura nachertanie bitmap PostScript ========================================================== Courier Roman crc CourierC Bold Italic BoldItalic Helvetica Roman ssc PragmaticaC Bold Oblique BoldOblique Times Roman smc NewtonC Bold Italic BoldItalic Katalogi, gde oni raspolozheny: $OPENWINHOME/lib/X11/fonts/cyrill - rastrovye $OPENWINHOME/lib/X11/fonts/cyrill-Type1 - masshtabiruemye Imena etih katalogov zapisany v stolbik v fajlah $OPENWINHOME/lib/locale/C/OWfontpath $OPENWINHOME/lib/locale/$LANG/OWfontpath otkuda skripty Xinitrc i StartOW ih i berut. Imena rastrovyh fontov skonstruirovany sleduyushchim obrazom: xxxT-NN xxxTi-NN xxxTb-NN gde xxx: crc - courier (CouRier Cyrillic) smc - serif (Serif Monospaced Cyrillic) ssc - sans-serif (Sans Serif Cyrillic) gde T: W - shrifty v kodirovke CP-1251 dlya MS Windows. A - shrifty v kodirovke CP-866 dlya MS DOS. K - shrifty v kodirovke KOI-8. 5 - shrifty v kodirovke ISO 8859/5. gde poslednyaya bukva: bez - roman, pryamoj obychnyj shrift. i - italic, kursiv. b - bold, zhirnyj shrift. gde NN: razmer shrifta v tochkah: 08, 10, 12, 14, 18, 24 Primery: smcW-08 sscKb-24 XLFD imena (X logical font definition): --------------------------------------- -chu-crcT-medium-r-normal--13-80-96-96-m-70-koi-8 sscT bold o 15-100 90 iso8859-5 smcT 16-120 90 ibm-1251 19-140 120 24-180 170 36-240 220 Dlya fontov razmerov 80 i 100 est' tol'ko versiya -medium-r- Dlya fontov razmerov 120, 140, 180, 240 est' versii -bold-r- i -medium-o- (italic). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! V fajlah resursov rekomenduetsya ispol'zovat' korotkie imena, !!! !!! poskol'ku XLFD imena mogut izmenit'sya v sleduyushchih versiyah. !!! !!! (takoe uzhe bylo) !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Sootvetstvie rastrovyh shriftov CDE fontam. ------------------------------------------ CDE size Chu --------------------------------------------- 1) xxs extra-extra small -net- 2) xs extra small -08 default 3) s small -10 4) m medium -12 5) l large -14 6) xl extra large -18 7) xxl extra-extra large -24 Prover'te shrifty. ----------------- Udostover'tes', chto imena katalogov s russkimi shriftami popali v FONT PATH, dlya chego naberite komandu xset -q i ubedites' v nalichii im£n katalogov /usr/openwin/lib/X11/fonts/cyrill i /usr/openwin/lib/X11/fonts/cyrill-Type1 Dlya razovoj interaktivnoj smeny fonta vy mozhete ispol'zovat' komandu xrdb (X resources database manager): % xrdb Font.Name: crcK-24 ^D <-- CTRL/D % cxterm & ili ukazat' neposredstvenno komande, kakoj font ej sleduet ispol'zovat': % xterm -fn crcK-24 & Spisok dostupnyh fontov i ih kratkih im£n mozhno poluchit' komandoj xlsfonts Prosmotret' kodovye tablicy - uvidet' poryadok bukv v kodirovkah - pozvolyayut komandy xfd -fn crcK-12 & xfd -fn crc5-12 & xfd -fn crcW-12 & Fajly resursov. --------------- To, chto programmy dolzhny ispol'zovat' imenno russkie fonty, zadaetsya v sistemnom fajle resursov $OPENWINHOME/lib/locale/ru.koi_8/Xdefaults $OPENWINHOME/lib/locale/ru.iso_8859_5/Xdefaults $OPENWINHOME/lib/locale/ru.mswcyr/Xdefaults dlya CDE /etc/dt/config/ru.koi_8/sys.resources /etc/dt/config/ru.iso_8859_5/sys.resources /etc/dt/config/ru.mswcyr/sys.resources Fajl resursov sostoit iz strok vida: KlassProgrammy*imyaResursa: znachenieResursa *imyaResursa: znachenieResursa vo vtorom sluchae resurs primenyaetsya ko VSEM programmam. Vot chto tam napisano dlya KOI-8: ! Added by Cyrillic Package ! Define Cyrillic fonts (KOI-8) ! OpenWindows.TextFont: smcK-12 OpenWindows.TitleFont: smcKb-14 OpenWindows.ButtonFont: sscKb-12 Font.Name: sscK-12 <- glavnoe eto Icon.Font.Name: sscK-10 olwm.TextFont: smcK-12 olwm.ButtonFont: smcK-12 olwm.TitleFont: smcKb-12 Mwm*menu*background: pink Mwm*fontList: -chu-sscK-bold-r-normal-*-*-120-*-*-*-*-koi-8: nptool.Font.Name: fixed *font: crcK-12 !Tuning of OpenLook Virtual Window Manager OpenWindows.VirtualSticky: xclock clock oclock xwall OpenWindows.VirtualForegroundColor: white OpenWindows.VirtualBackgroundColor: yellow OpenWindows.UseImages: UseAll OpenWindows.InputFocusColor: pink OpenWindows.UniqueIconSlots: True OpenWindows.FreeIconSlots: True OpenWindows.ShowResizeGeometry: True OpenWindows.ShowMoveGeometry: True OpenWindows.SelectDisplaysMenu: False ! Trailer Cyrillic Package Ubedites', chto fajly .OWdefaults i .Xdefaults v vashem domashnem kataloge ne perekryvayut eti opredeleniya. Sleduet udalit' starye: ~/.Xdefaults ~/.Xresourses ~/.OWdefaults ~/.openwin-init ~/.keytable ~/.dt (eto katalog) Tekushchie ustanovki resursov mozhno posmotret' komandoj xrdb -q | more Startovyj fajl. --------------- Izuchite startovyj fajl $OPENWINHOME/lib/Xinitrc soderzhashchij komandy zagruzki kart klaviatury Xmodmaprc i fajlov resursov Xdefaults Sistemnyj administrator OBYAZAN prochitat' etot fajl i ponyat', kak vs£ rabotaet. Obratite vnimanie na special'nyj fajl-flazhok $HOME/.Xmod++ locale dlya tr£h kodirovok. -------------------------- locale - eto opisanie mnozhestva bukv, kakie iz nih pechatnye, bol'shie, malen'kie,... Smotri man setlocale i man ctype Opisaniya raspolozheny v katalogah /usr/lib/locale/ru.koi_8 /usr/lib/locale/ru.iso_8859_5 /usr/lib/locale/ru.mswcyr /usr/lib/locale/ru.altdos (dlya funkcii setlocale(LC_ALL, ""); ) X Display Manager. ------------------ Paket zapuskaet na vashej mashine X Display Manager (xdm). Oznakom'tes' s ego konfiguracionnymi fajlami, raspolozhennymi v /usr/openwin/lib/xdm/* Obratite vnimanie na Xresources - tam zadan russkij yazyk soobshchenij. StartOW - parametry zapuska X-servera. Xsession - skript, vypolnyaemyj pri vhode pol'zovatelya v sistemu. Xsetup_0 - zapusk programm, soputstvuyushchih oknu Xlogin. Smotri takzhe man xdm VNIMANIE, SISTEMNYJ ADMINISTRATOR !!! ------------------------------------- Dlya vhoda cherez xdm ispol'zuetsya nastroechnyj fajl ~/.profile Dlya vhoda s konsoli - ~/.login Poetomu dobavlenie ustanovki peremennyh okruzheniya sleduet proizvodit' PARALLELXNO v oboih etih fajlah. V kachestve obrazcov ispol'zujte fajly iz /etc/skel Esli u pol'zovatelya uzhe byli fajly .login, .cshrc, .profile, to vam prid£tsya posvyatit' nekotoroe vremya privedeniyu ih v sootvetstvie s rabotosposobnym obrazcom. Pardon za prichin£nnye neudobstva! Vhod cherez XDM. ~~~~~~~~~~~~~~~ xdm (xlogin) -> Xsession -> $HOME/.profile -> Xinitrc -> xterm -> sh xdm (xlogin) -> Xsession -> $HOME/.profile -> Xinitrc -> xterm -> csh -> $HOME/.cshrc Vhod cherez console login (s beloj konsoli) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ login -> sh -> $HOME/.profile -> \ -> $OPENWINHOME/bin/openwin -> Xinitrc -> xterm -> sh login -> csh -> $HOME/.cshrc -> $HOME/.login -> \ -> $OPENWINHOME/bin/openwin -> Xinitrc -> xterm -> csh -> $HOME/.cshrc Vhod cherez telnet ili rlogin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ telnet -> login -> sh -> $HOME/.profile telnet -> login -> csh -> $HOME/.cshrc -> $HOME/.login Vhod cherez dtlogin CDE ~~~~~~~~~~~~~~~~~~~~~~ /etc/rc2.d/S99dtlogin -> dtlogin -> ... -> /usr/dt/bin/Xsession -> ... ->\ -> /etc/dt/config/Xsession.d/0055.cyrillic -> $HOME/.profile ->\ -> xterm -> sh -> csh -> $HOME/.cshrc Pri vhode pod Co