[[FrontPage]] #contents 2012/11/04からのアクセス回数 &counter; ** Wifiの設定 [#h2808dbc] 起動後に行うのは、USB-Wifiドングルの設定です。((最初の起動は、HMDIではなくアナログの信号で起動し、すぐにシャットダウンし、次にHMDI接続で起動し直すとデフォルトの起動としてアナログ信号になってセットされるので、Raspberry Pi単体で起動するときに便利です。)) &ref(Wifi-setting.png); 設定時にRaspberryのIPアドレスをメモしておいてください。 今後の設定はパソコンのターミナルから行うので、起動時にX-Windowを起動しないようにターミナルを起動し、以下のコマンドを入力します((不要なメモリを使用しないように設定を変更します))。 #pre{{ $ sudo raspi-config }} 最初の起動で設定をした画面がでますので、boot_behaviourからX-Windowを起動しないように設定を変更します。 ** PCからsshで接続 [#s05eb534] Mac OSXのターミナルソフト(Windowsの場合、TeraTerm等のソフトが使えます)を起動して、Raspberry Piに接続します。 #pre{{ $ ssh -l pi 先にメモったIPアドレス $ ssh pi@192.168.1.103 The authenticity of host '192.168.1.103 (192.168.1.103)' can't be established. RSA key fingerprint is 13:d8:81:f0:e9:46:02:41:e0:54:f5:58:6e:4f:20:ff. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.103' (RSA) to the list of known hosts. pi@192.168.1.103's password: Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l The programs included with the Debian GNU/Linux system are free software; 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. pi@raspberrypi ~ $ }} 初期設定では、Raspberry Piのユーザpiのパスワードはrespberryです。 最初の接続時に上記のように接続確認がでますので、yesと入力してください。 ** アプリケーションのインストール [#x096a7e8] 続いて、apt-getを使って必要なアプリケーションをインストールします。その前にapt-getが使うデータベースを最新に更新します。 #pre{{ $ sudo apt-get update Get:1 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB] Get:2 http://archive.raspberrypi.org wheezy InRelease [7,737 B] 途中省略 Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en Fetched 7,473 kB in 2min 35s (48.0 kB/s) Reading package lists... Done }} これで準備完了、以下のアプリケーションとリソースをインストールすることにします。 - VNCサーバ - 日本語フォント - パッケージ検索ソフトapt-file apt-getを使ってアプリケーションをインストールするときには、apt-getの後にinstallとインストールするアプリケーションを指定します(( 続けて複数指定することも可能です))。 #pre{{ $ sudo apt-get install tightvncserver Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: x11-xserver-utils xfonts-base xfonts-encodings xfonts-utils Suggested packages: tightvnc-java nickle cairo-5c xorg-docs-core The following NEW packages will be installed: tightvncserver x11-xserver-utils xfonts-base xfonts-encodings xfonts-utils 0 upgraded, 5 newly installed, 0 to remove and 87 not upgraded. Need to get 7,824 kB of archives. After this operation, 11.7 MB of additional disk space will be used. Do you want to continue [Y/n]? }} 継続するか確認してきますので、そのままリターンキーを入力します。 次に日本語フォントをインストールします。 #pre{{ $ sudo apt-get install ttf-takao-mincho $ sudo apt-get install ttf-takao }} 同様にapt-fileをインストールします。 #pre{{ $ sudo apt-get install apt-file }} apt-fileのデータベースも更新します。 #pre{{ $ sudo apt-file update }} ** VNCサーバの起動 [#x562ee42] 簡単にVNCサーバを起動できるようにコマンドを1個のスクリプトにまとめます。 #pre{{ $ cat <<EOF >StartVNC.sh vncserver :1 -geometry 1024x728 -depth 24 EOF $ chmod +x StartVNC.sh }} VNCサーバを起動するときには、以下のように入力します。 #pre{{ $ ./StartVNC.sh You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n New 'X' desktop is raspberrypi:1 Creating default startup script /home/pi/.vnc/xstartup Starting applications specified in /home/pi/.vnc/xstartup Log file is /home/pi/.vnc/raspberrypi:1.log }} 最初の起動時にパスワードとview-onlyのパスワード設定を要求されますので、パスワードを入力してください。 *** VNCクライアントからpiを操作する [#pf6c38ec] ようやくVNCクライアントからpiにアクセスすることができるようになりました。 &ref(VNC-client.png); ** タイムゾーンの設定 [#nb3160ac] 正しい時刻を表示するようにタイムゾーンを設定します。 VNCクライアントを終了し、VNSサーバを起動したSSHの画面に戻ります。 #pre{{ $ sudo raspi-config Current default time zone: 'Asia/Tokyo' Local time is now: Sun Nov 4 16:43:48 JST 2012. Universal Time is now: Sun Nov 4 07:43:48 UTC 2012. }} change_timezoneを選択し、Asia→Tokyoを選択します。 これで起動後の設定は完了です。 ** コメント [#rc1f1933] #vote(おもしろかった[6],そうでもない[0],わかりずらい[0]) 皆様のご意見、ご希望をお待ちしております。 - パスワードの resp -> raspです。小さなことですみません。Raspberry Pi が届きました。参考にさせていただきます。 -- [[ysato]] &new{2014-02-01 (土) 14:50:33}; - Mac を使ってVNCサーバの起動まできました。VNCサーバの起動後「VNCクライアントからpiを操作する」のラズベリーの画面がMac に表示されないのですが、解決法をお尋ねします。 -- [[ysato]] &new{2014-02-02 (日) 15:19:16}; #comment_kcaptcha