Jan 29, 2004 onlsbc1, ネットワークブートシステムの検討 --- ネットワークブート #11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/para-CAMAC/ Work/SBC-Linux32.html) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 目的 SBC-Linux30.htmlでの作業により、ディスクレスクライアント専用に用意した /usrファイルを、読み書き可のパーミッションでマウントし、Xの設定を行った。 Xは正常に起動できた。 ここでは Javaのインストールを行う。 項目 (1). Javaの入手 (2). Javaのインストール (2-1). 自己解凍バイナリに実行アクセス権を設定する (2-2). Java をインストール (2-3). PATHを設定 -------------------------------------------------------------------- (1). Javaの入手 Sun の Download Centerからself-extracting file (j2sdk-1_4_2_03-linux-i586.bin, 34.16 MB)を入手した。 j2sdk-1_4_2_03 をインストールするには、75MBの空きディスク容量が必要。 インストール用のバイナリー・ファイルは、onlsbc1 にNFSマウントしたonlpara のディスク上に置く。 root@onlsbc1:/home/inoue# mount onlpara:/home2/onlpara-wrk /mnt root@onlsbc1:/home/inoue# df -k Filesystem 1k-blocks Used Available Use% Mounted on 130.87.153.112:/tftpboot/130.87.153.3 14278840 2659236 10894272 20% / 130.87.153.112:/home 14278840 2659232 10894272 20% /home onlpara:/home2/onlpara-wrk 22659864 5008192 16500616 24% /mnt root@onlsbc1:/home/inoue# root@onlsbc1:/home/inoue# ls -l /mnt/root/j2sdk* -rwxr-xr-x 1 nobody nogroup 42250657 4月 7 2003 /mnt/root/j2sdk-1_4_1_0 2-linux-i586.bin -rwxr-xr-x 1 nobody nogroup 35796720 9月 1 15:23 /mnt/root/j2sdk-1_4_2_0 1-linux-i586.bin -rw-r--r-- 1 nobody nogroup 35818038 1月 28 17:01 /mnt/root/j2sdk-1_4_2_0 3-linux-i586.bin -rw-r--r-- 1 nobody nogroup 36444801 11月 6 16:59 /mnt/root/j2sdk1.4.2_01 -inoue.tar.gz -rw-r--r-- 1 inoue inoue 498 11月 7 15:39 /mnt/root/j2sdk1.4_1.4. 2.01-0.13_i386.changes -rw-r--r-- 1 inoue inoue 41933056 11月 7 15:39 /mnt/root/j2sdk1.4_1.4. 2.01-0.13_i386.deb /mnt/root/j2sdk1.4.1_02: 合計 4 drwxr-xr-x 4 nobody nogroup 4096 4月 10 2003 jre root@onlsbc1:/home/inoue# (2). Javaのインストール (2-1). 自己解凍バイナリに実行アクセス権を設定する ot@onlsbc1:/mnt/root# pwd /mnt/root root@onlsbc1:/mnt/root# ls -l j2sdk-1_4_2_03-linux-i586.bin -rw-r--r-- 1 nobody nogroup 35818038 1月 28 17:01 j2sdk-1_4_2_03-linux-i5 86.bin root@onlsbc1:/mnt/root# root@onlsbc1:/mnt/root# chmod +x j2sdk-1_4_2_03-linux-i586.bin root@onlsbc1:/mnt/root# ls -l j2sdk-1_4_2_03-linux-i586.bin -rwxr-xr-x 1 nobody nogroup 35818038 1月 28 17:01 j2sdk-1_4_2_03-linux-i5 86.bin root@onlsbc1:/mnt/root# (2-2). Java をインストール /usrディレクトリに移動して、J2SDKをインストールする root@onlsbc1:/mnt/root# cd /usr root@onlsbc1:/usr# ls -l 合計 76 drwxr-xr-x 6 root root 4096 11月 27 13:59 X11R6 drwxr-xr-x 3 root root 20480 11月 27 17:23 bin drwxr-xr-x 2 root root 8192 11月 27 17:23 doc drwxr-xr-x 2 root root 4096 11月 27 09:11 games drwxr-xr-x 28 root root 4096 11月 27 15:50 include drwxr-xr-x 2 root root 4096 11月 27 17:23 info drwxr-xr-x 40 root root 16384 11月 27 17:22 lib drwxrwsr-x 10 root staff 4096 11月 27 02:29 local drwxr-xr-x 2 root root 4096 11月 27 17:03 sbin drwxr-xr-x 78 root root 4096 11月 27 17:22 share drwxrwsr-x 5 root src 4096 1月 26 09:46 src root@onlsbc1:/usr# root@onlsbc1:/usr# /mnt/root/j2sdk-1_4_2_03-linux-i586.bin Sun Microsystems, Inc. Binary Code License Agreement for the JAVATM 2 SOFTWARE DEVELOPMENT KIT (J2SDK), STANDARD EDITION, VERSION 1.4.2_X SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT CONTINUE. 1. DEFINITIONS. "Software" means the identified above in binary form, any other machine readable materials (including, but not limited to, libraries, source files, header files, and data files), any updates or error corrections provided by Sun, and any user manuals, programming guides and other documentation provided to you by Sun under this Agreement. "Programs" mean Java applets and applications intended to run on the Java 2 Platform, Standard Edition (J2SETM platform) platform on Java-enabled general purpose desktop computers and servers. 2. LICENSE TO USE. Subject to the terms and conditions of this Agreement, including, but not limited to the Java Technology Restrictions of the Supplemental License Terms, Sun grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally Software complete and unmodified for the sole purpose of running Programs. Additional licenses for developers and/or publishers are granted in the Supplemental License Terms. 3. RESTRICTIONS. Software is confidential and copyrighted. Title to Software and all associated intellectual property rights is retained by Sun and/or its licensors. Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software. You acknowledge that Licensed Software is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility. Sun Microsystems, Inc. disclaims any express or implied warranty of fitness for such uses. No right, title or interest in or to any trademark, service mark, logo or trade name of Sun or its licensors is granted under this Agreement. Additional restrictions for developers and/or publishers licenses are set forth in the Supplemental License Terms. 4. LIMITED WARRANTY. Sun warrants to you that for a period of ninety (90) days from the date of purchase, as evidenced by a copy of the receipt, the media on which Software is furnished (if any) will be free of defects in materials and workmanship under normal use. Except for the foregoing, Software is provided "AS IS". Your exclusive remedy and Sun's entire liability under this limited warranty will be at Sun's option to replace Software media or refund the fee paid for Software. Any implied warranties on the Software are limited to 90 days. Some states do not allow limitations on duration of an implied warranty, so the above may not apply to you. This limited warranty gives you specific legal rights. You may have others, which vary from state to state. 5. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. 6. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for Software under this Agreement. The foregoing limitations will apply even if the above stated warranty fails of its essential purpose. Some states do not allow the exclusion of incidental or consequential damages, so some of the terms above may not be applicable to you. 7. SOFTWARE UPDATES FROM SUN. You acknowledge that at your request or consent optional features of the Software may download, install, and execute applets, applications, software extensions, and updated versions of the Software from Sun ("Software Updates"), which may require you to accept updated terms and conditions for installation. If additional terms and conditions are not presented on installation, the Software Updates will be considered part of the Software and subject to the terms and conditions of the Agreement. 8. SOFTWARE FROM SOURCES OTHER THAN SUN. You acknowledge that, by your use of optional features of the Software and/or by requesting services that require use of the optional features of the Software, the Software may automatically download, install, and execute software applications from sources other than Sun ("Other Software"). Sun makes no representations of a relationship of any kind to licensors of Other Software. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE OTHER SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Some states do not allow the exclusion of incidental or consequential damages, so some of the terms above may not be applicable to you. 9. TERMINATION. This Agreement is effective until terminated. You may terminate this Agreement at any time by destroying all copies of Software. This Agreement will terminate immediately without notice from Sun if you fail to comply with any provision of this Agreement. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right. Upon Termination, you must destroy all copies of Software. 10. EXPORT REGULATIONS. All Software and technical data delivered under this Agreement are subject to US export control laws and may be subject to export or import regulations in other countries. You agree to comply strictly with all such laws and regulations and acknowledge that you have the responsibility to obtain such licenses to export, re-export, or import as may be required after delivery to you. 11. TRADEMARKS AND LOGOS. You acknowledge and agree as between you and Sun that Sun owns the SUN, SOLARIS, JAVA, JINI, FORTE, and iPLANET trademarks and all SUN, SOLARIS, JAVA, JINI, FORTE, and iPLANET-related trademarks, service marks, logos and other brand designations ("Sun Marks"), and you agree to comply with the Sun Trademark and Logo Usage Requirements currently located at http://www.sun.com/policies/trademarks. Any use you make of the Sun Marks inures to Sun's benefit. 12. U.S. GOVERNMENT RESTRICTED RIGHTS. If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement; this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD acquisitions). 13. GOVERNING LAW. Any action related to this Agreement will be governed by California law and controlling U.S. federal law. No choice of law rules of any jurisdiction will apply. 14. SEVERABILITY. If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate. 15. INTEGRATION. This Agreement is the entire agreement between you and Sun relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party. SUPPLEMENTAL LICENSE TERMS These Supplemental License Terms add to or modify the terms of the Binary Code License Agreement. Capitalized terms not defined in these Supplemental Terms shall have the same meanings ascribed to them in the Binary Code License Agreement . These Supplemental Terms shall supersede any inconsistent or conflicting terms in the Binary Code License Agreement, or in any license contained within the Software. A. Software Internal Use and Development License Grant. Subject to the terms and conditions of this Agreement, including, but not limited to the Java Technology Restrictions of these Supplemental Terms, Sun grants you a non-exclusive, non-transferable, limited license without fees to reproduce internally and use internally the Software complete and unmodified for the purpose of designing, developing, and testing your Programs. B. License to Distribute Software. Subject to the terms and conditions of this Agreement, including, but not limited to the Java Technology Restrictions of these Supplemental Terms, Sun grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software, provided that (i) you distribute the Software complete and unmodified (unless otherwise specified in the applicable README file) and only bundled as part of, and for the sole purpose of running, your Programs, (ii) the Programs add significant and primary functionality to the Software, (iii) you do not distribute additional software intended to replace any component(s) of the Software (unless otherwise specified in the applicable README file), (iv) you do not remove or alter any proprietary legends or notices contained in the Software, (v) you only distribute the Software subject to a license agreement that protects Sun's interests consistent with the terms contained in this Agreement, and (vi) you agree to defend and indemnify Sun and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. C. License to Distribute Redistributables. Subject to the terms and conditions of this Agreement, including but not limited to the Java Technology Restrictions of these Supplemental Terms, Sun grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute those files specifically identified as redistributable in the Software "README" file ("Redistributables") provided that: (i) you distribute the Redistributables complete and unmodified (unless otherwise specified in the applicable README file), and only bundled as part of Programs, (ii) you do not distribute additional software intended to supersede any component(s) of the Redistributables (unless otherwise specified in the applicable README file), (iii) you do not remove or alter any proprietary legends or notices contained in or on the Redistributables, (iv) you only distribute the Redistributables pursuant to a license agreement that protects Sun's interests consistent with the terms contained in the Agreement, (v) you agree to defend and indemnify Sun and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. D. Java Technology Restrictions. You may not modify the Java Platform Interface ("JPI", identified as classes contained within the "java" package or any subpackages of the "java" package), by creating additional classes within the JPI or otherwise causing the addition to or modification of the classes in the JPI. In the event that you create an additional class and associated API(s) which (i) extends the functionality of the Java platform, and (ii) is exposed to third party software developers for the purpose of developing additional software which invokes such additional API, you must promptly publish broadly an accurate specification for such API for free use by all developers. You may not create, or authorize your licensees to create, additional classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun" or similar convention as specified by Sun in any naming convention designation. E. Distribution by Publishers. This section pertains to your distribution of the Software with your printed book or magazine (as those terms are commonly used in the industry) relating to Java technology ("Publication"). Subject to and conditioned upon your compliance with the restrictions and obligations contained in the Agreement, in addition to the license granted in Paragraph 1 above, Sun hereby grants to you a non-exclusive, nontransferable limited right to reproduce complete and unmodified copies of the Software on electronic media (the "Media") for the sole purpose of inclusion and distribution with your Publication(s), subject to the following terms: (i) You may not distribute the Software on a stand-alone basis; it must be distributed with your Publication(s); (ii) You are responsible for downloading the Software from the applicable Sun web site; (iii) You must refer to the Software as JavaTM 2 Software Development Kit, Standard Edition, Version 1.4.2; (iv) The Software must be reproduced in its entirety and without any modification whatsoever (including, without limitation, the Binary Code License and Supplemental License Terms accompanying the Software and proprietary rights notices contained in the Software); (v) The Media label shall include the following information: Copyright 2003, Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Solaris, Java, the Java Coffee Cup logo, J2SE , and all trademarks and logos based on Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. This information must be placed on the Media label in such a manner as to only apply to the Sun Software; (vi) You must clearly identify the Software as Sun's product on the Media holder or Media label, and you may not state or imply that Sun is responsible for any third-party software contained on the Media; (vii) You may not include any third party software on the Media which is intended to be a replacement or substitute for the Software; (viii) You shall indemnify Sun for all damages arising from your failure to comply with the requirements of this Agreement. In addition, you shall defend, at your expense, any and all claims brought against Sun by third parties, and shall pay all damages awarded by a court of competent jurisdiction, or such settlement amount negotiated by you, arising out of or in connection with your use, reproduction or distribution of the Software and/or the Publication. Your obligation to provide indemnification under this section shall arise provided that Sun: (i) provides you prompt notice of the claim; (ii) gives you sole control of the defense and settlement of the claim; (iii) provides you, at your expense, with all available information, assistance and authority to defend; and (iv) has not compromised or settled such claim without your prior written consent; and (ix) You shall provide Sun with a written notice for each Publication; such notice shall include the following information: (1) title of Publication, (2) author(s), (3) date of Publication, and (4) ISBN or ISSN numbers. Such notice shall be sent to Sun Microsystems, Inc., 4150 Network Circle, M/S USCA12-110, Santa Clara, California 95054, U.S.A , Attention: Contracts Administration. F. Source Code. Software may contain source code that, unless expressly licensed for other purposes, is provided solely for reference purposes pursuant to the terms of this Agreement. Source code may not be redistributed unless expressly provided for in this Agreement. G. Third Party Code. Additional copyright notices and license terms applicable to portions of the Software are set forth in the THIRDPARTYLICENSEREADME.txt file. In addition to any terms and conditions of any third party opensource/freeware license identified in the THIRDPARTYLICENSEREADME.txt file, the disclaimer of warranty and limitation of liability provisions in paragraphs 5 and 6 of the Binary Code License Agreement shall apply to all Software in this distribution. For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. (LFI#135003/Form ID#011801) Do you agree to the above license terms? [yes or no] yes Unpacking... Checksumming... : : inflating: j2sdk1.4.2_03/man/ja_JP.eucJP/man1/jdb.1 inflating: j2sdk1.4.2_03/man/ja_JP.eucJP/man1/native2ascii.1 inflating: j2sdk1.4.2_03/man/ja_JP.eucJP/man1/rmic.1 inflating: j2sdk1.4.2_03/man/ja_JP.eucJP/man1/serialver.1 inflating: j2sdk1.4.2_03/man/ja_JP.eucJP/man1/idlj.1 Creating j2sdk1.4.2_03/lib/tools.jar Creating j2sdk1.4.2_03/jre/lib/rt.jar Creating j2sdk1.4.2_03/jre/lib/jsse.jar Creating j2sdk1.4.2_03/jre/lib/charsets.jar Creating j2sdk1.4.2_03/jre/lib/ext/localedata.jar Creating j2sdk1.4.2_03/jre/lib/plugin.jar Creating j2sdk1.4.2_03/jre/javaws/javaws.jar Done. root@onlsbc1:/usr# root@onlsbc1:/usr# ls -l 合計 80 drwxr-xr-x 6 root root 4096 11月 27 13:59 X11R6 drwxr-xr-x 3 root root 20480 11月 27 17:23 bin drwxr-xr-x 2 root root 8192 11月 27 17:23 doc drwxr-xr-x 2 root root 4096 11月 27 09:11 games drwxr-xr-x 28 root root 4096 11月 27 15:50 include drwxr-xr-x 2 root root 4096 11月 27 17:23 info drwxr-xr-x 9 root root 4096 1月 29 2004 j2sdk1.4.2_03 drwxr-xr-x 40 root root 16384 11月 27 17:22 lib drwxrwsr-x 10 root staff 4096 11月 27 02:29 local drwxr-xr-x 2 root root 4096 11月 27 17:03 sbin drwxr-xr-x 78 root root 4096 11月 27 17:22 share drwxrwsr-x 5 root src 4096 1月 26 09:46 src root@onlsbc1:/usr# root@onlsbc1:/usr# ln -s j2sdk1.4.2_03 java root@onlsbc1:/usr# ls -l 合計 80 drwxr-xr-x 6 root root 4096 11月 27 13:59 X11R6 drwxr-xr-x 3 root root 20480 11月 27 17:23 bin drwxr-xr-x 2 root root 8192 11月 27 17:23 doc drwxr-xr-x 2 root root 4096 11月 27 09:11 games drwxr-xr-x 28 root root 4096 11月 27 15:50 include drwxr-xr-x 2 root root 4096 11月 27 17:23 info drwxr-xr-x 9 root root 4096 1月 29 2004 j2sdk1.4.2_03 lrwxrwxrwx 1 root root 13 1月 29 2004 java -> j2sdk1.4.2_03 drwxr-xr-x 40 root root 16384 11月 27 17:22 lib drwxrwsr-x 10 root staff 4096 11月 27 02:29 local drwxr-xr-x 2 root root 4096 11月 27 17:03 sbin drwxr-xr-x 78 root root 4096 11月 27 17:22 share drwxrwsr-x 5 root src 4096 1月 26 09:46 src root@onlsbc1:/usr# ok. Java は正常にインストールされた。 (2-3). PATHを設定 ~/.bashrc を修正して Java の PATH を設定する。 inoue@onlsbc1:~$ pwd /home/inoue inoue@onlsbc1:~$ ls -la .ba??* -rw------- 1 inoue inoue 5079 1月 28 17:28 .bash_history -rw-r--r-- 1 inoue inoue 817 1月 14 15:22 .bash_profile -rw-r--r-- 1 inoue inoue 818 11月 28 08:38 .bash_profile.language- env-bak -rw-r--r-- 1 inoue inoue 5173 1月 14 15:23 .bashrc -rw-r--r-- 1 inoue inoue 5081 11月 28 08:38 .bashrc.language-env-ba k inoue@onlsbc1:~$ inoue@onlsbc1:~$ vi .bashrc # ---- language-env DON'T MODIFY THIS LINE! # ログインシェルではない bash の起動時に実行される。 # ----- 基本的な設定 ----- # XIM サーバーの名前を定義する # (XIM は、language-env だけで使うシェル変数です) XIM=kinput2 # xprop は、xbase-clients パッケージに含まれます if [ -n "$WINDOWID" -a -x /usr/bin/X11/xprop ] ; then # X Window System 上で走ってるけど X Window System と通信する権限が # ないとき (su したときなど) への対策 xprop -id $WINDOWID >& /dev/null || unset WINDOWID fi if [ -n "$WINDOWID" -a -x /usr/bin/X11/xprop ] ; then XPROP=`xprop -id $WINDOWID WM_CLASS` case $XPROP in *kterm* | *krxvt* | *kwterm* | *katerm* ) LANG=ja_JP.eucJP ;; *UXTerm* ) LANG=ja_JP.UTF-8 ;; *hanterm* ) LANG=ko_KR.eucKR ;; *caterm* | *crxvt-big5* ) LANG=zh_TW.Big5 ;; *crxvt-gb* ) LANG=zh_CN.GB2312 ;; *xterm* | *rxvt* | *aterm* ) LANG=C ;; # gnome-terminal は $WINDOWID の意味が違う # mlterm は WM_CLASS を設定しない # Eterm もロケール自動認識になった * ) : ;; esac else if [ "$TERM" = "linux" ] ; then LANG=C else LANG=ja_JP.eucJP fi fi case $LANG in ja_JP.eucJP) JLESSCHARSET=japanese-euc ; LV=-Oej ;; ja_JP.UTF-8) JLESSCHARSET=utf-8 ; LV=-Ou8 ;; *) JLESSCHARSET=latin1 ; LV=-Al1 ;; esac export LANG JLESSCHARSET LV if type lv &>/dev/null ; then PAGER=lv elif type jless &>/dev/null ; then PAGER=jless elif type less &>/dev/null ; then PAGER=less else PAGER=more fi export PAGER # XMODIFIERS を export しないのは、emacs が Segmentation Fault を起こすから # ただし、この方法だと、Debian メニューシステムからの起動には対応できない。 function rxvt { if /usr/bin/which krxvt &> /dev/null then krxvt $* else rxvt $* fi } alias xemacs='XMODIFIERS= xemacs' # nvi-m17n-canna または nvi-m17n がインストールされていればそれを優先 # 的に使う。かなり凝ったことをしているので注意。 function vi { if [ -x /usr/bin/nvi-m17n-canna ] then NEXINIT="source ~/.nexrc-m17n-canna" /usr/bin/nvi-m17n-canna $* elif [ -x /usr/bin/nvi-m17n ] then NEXINIT="source ~/.nexrc-m17n" /usr/bin/nvi-m17n $* else /usr/bin/vi $* fi } function nvi-m17n { NEXINIT="source ~/.nexrc-m17n" /usr/bin/nvi-m17n $* } function nvi-m17n-canna { NEXINIT="source ~/.nexrc-m17n-canna" /usr/bin/nvi-m17n-canna $* } # perl がロケールにかんするワーニングを出す場合に有効にしてください。 # PERL_BADLANG=0 ; export PERL_BADLANG # .bash_profile で使う。 BASHRC_DONE=1 # mh がインストールされていたら、PATH に加える。 if [ -x /usr/bin/mh/mhmail ] then if type mhmail &>/dev/null then true else PATH=$PATH:/usr/bin/mh fi fi ## ----- お好みに応じて ----- # ls の動作 (属性表示、色つき)。man ls 参照 if [ "$TERM" = "dumb" -o "$TERM" = "emacs" ] then alias ls='ls -F' else alias ls='ls -F --color=auto' fi # 標準エディタを vi にする。Debian Policy Manual 参照 EDITOR=vi export EDITOR # プロンプト。man bash 参照 if [ "$TERM" = "dumb" -o "$TERM" = "emacs" ] then PS1='\w\$ ' else if [ "$UID" = "0" ] then PS1='\[\e[41m\]\w\$\[\e[m\] ' else PS1='\[\e[7m\]\w\$\[\e[m\] ' fi fi # ファイルを作るとき、どんな属性で作るか。man umask 参照 umask 022 # less の動作。man less 参照 LESS=-M export LESS if type /usr/bin/lesspipe &>/dev/null then LESSOPEN="| /usr/bin/lesspipe '%s'" LESSCLOSE="/usr/bin/lesspipe '%s' '%s'" export LESSOPEN LESSCLOSE fi # Ctrl-D でログアウトするのを抑制する。man bash 参照 IGNOREEOF=3 # カレントディレクトリのバックアップファイルを表示する # (削除する際は "chkbackups | xargs rm" を実行のこと) alias chkbackups='/usr/bin/find . -name "?*~" -o -name "?*.bak" -o -name ".[^.]? *~" -o -name ".[^.]?*.bak" -maxdepth 1' # X Window System 上での設定 if [ "$DISPLAY" ] then # 画面サイズを変更すると COLUMNS, LINES を変更する。man bash 参照 shopt -s checkwinsize # 端末ウィンドウのタイトルを変更する function xtitle() { /bin/echo -e "\033]0;$*\007\c" } fi # ---- language-env end DON'T MODIFY THIS LINE! # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If running interactively, then: if [ "$PS1" ]; then # don't put duplicate lines in the history. See bash(1) for more options # export HISTCONTROL=ignoredups # enable color support of ls and also add handy aliases eval `dircolors -b` alias ls='ls --color=auto' #alias dir='ls --color=auto --format=vertical' #alias vdir='ls --color=auto --format=long' # some more ls aliases #alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF' # set a fancy prompt PS1='\u@\h:\w\$ ' # If this is an xterm set the title to user@host:dir #case $TERM in #xterm*) # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' # ;; #*) # ;; #esac # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc). #if [ -f /etc/bash_completion ]; then # . /etc/bash_completion #fi fi export TERM=vt100 #export MOZ_PRINTER_NAME=ccpr15 export MOZ_PRINTER_NAME=ricoh export IGNOREEOF=0 export PATH=/usr/local/sbin:$PATH export PATH=$PATH:/usr/java/bin export MANPATH=/usr/local/man:$MANPATH ~ ~ .bashrc: 191 lines, 5205 characters inoue@onlsbc1:~$ .bash_profileファイルを編集する。 inoue@onlsbc1:~$ vi .bash_profile : #if [ -f ~/.bashrc ]; then source ~/.bashrc #fi : inoue@onlsbc1:~$ ログインし直してみる。 inoue@onlsbc1:~$ logout Connection to onlsbc1 closed. onlsun3[34]% ssh onlsbc1 inoue@onlsbc1's password: Linux onlsbc1 2.4.18 #1 2004年 1月 9日 金曜日 15:25:22 JST i586 unknown Most of the programs included with the Debian GNU/Linux system are freely redistributable; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. Last login: Thu Jan 29 08:42:21 2004 from onlsun3.kek.jp inoue@onlsbc1:~$ inoue@onlsbc1:~$ env PWD=/home/inoue MOZ_PRINTER_NAME=ricoh PAGER=jless LESSCLOSE=/usr/bin/lesspipe '%s' '%s' LESSOPEN=| /usr/bin/lesspipe '%s' MANPATH=/home/inoue/man:/usr/local/man: PS1=\u@\h:\w\$ LV=-Oej LESS=-M USER=inoue LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:c d=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31: *.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:* .rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01 ;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.ti f=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35 :*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35: MAIL=/var/mail/inoue EDITOR=vi LANG=ja_JP.eucJP SSH_CLIENT=130.87.219.75 32821 22 LOGNAME=inoue SHLVL=1 SHELL=/bin/bash IGNOREEOF=0 HOME=/home/inoue TERM=vt100 PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/j ava/bin JLESSCHARSET=japanese-euc SSH_TTY=/dev/pts/0 _=/usr/bin/env inoue@onlsbc1:~$ inoue@onlsbc1:~$ which javac /usr/java/bin/javac inoue@onlsbc1:~$ java -version java version "1.4.2_03" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02) Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode) inoue@onlsbc1:~$ ok. Java は利用可能になった。 ---xxxx