FrontPage

2012/11/04からのアクセス回数 12782

Wifiの設定

起動後に行うのは、USB-Wifiドングルの設定です。*1

Wifi-setting.png

設定時にRaspberryのIPアドレスをメモしておいてください。

今後の設定はパソコンのターミナルから行うので、起動時にX-Windowを起動しないようにターミナルを起動し、以下のコマンドを入力します*2

$ sudo raspi-config

最初の起動で設定をした画面がでますので、boot_behaviourからX-Windowを起動しないように設定を変更します。

PCからsshで接続

Mac OSXのターミナルソフト(Windowsの場合、TeraTerm等のソフトが使えます)を起動して、Raspberry Piに接続します。

$ 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と入力してください。

アプリケーションのインストール

続いて、apt-getを使って必要なアプリケーションをインストールします。その前にapt-getが使うデータベースを最新に更新します。

$ 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

これで準備完了、以下のアプリケーションとリソースをインストールすることにします。

apt-getを使ってアプリケーションをインストールするときには、apt-getの後にinstallとインストールするアプリケーションを指定します*3

$ 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]? 

継続するか確認してきますので、そのままリターンキーを入力します。

次に日本語フォントをインストールします。

$ sudo apt-get install ttf-takao-mincho
$ sudo apt-get install ttf-takao

同様にapt-fileをインストールします。

$ sudo apt-get install apt-file

apt-fileのデータベースも更新します。

$ sudo apt-file update

VNCサーバの起動

簡単にVNCサーバを起動できるようにコマンドを1個のスクリプトにまとめます。

$ cat <<EOF >StartVNC.sh
vncserver :1 -geometry 1024x728 -depth 24
EOF
$ chmod +x StartVNC.sh

VNCサーバを起動するときには、以下のように入力します。

$ ./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を操作する

ようやくVNCクライアントからpiにアクセスすることができるようになりました。

VNC-client.png

タイムゾーンの設定

正しい時刻を表示するようにタイムゾーンを設定します。

VNCクライアントを終了し、VNSサーバを起動したSSHの画面に戻ります。

$ 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を選択します。

これで起動後の設定は完了です。

コメント

選択肢 投票
おもしろかった 16  
そうでもない 0  
わかりずらい 0  

皆様のご意見、ご希望をお待ちしております。


(Input image string)

*1 最初の起動は、HMDIではなくアナログの信号で起動し、すぐにシャットダウンし、次にHMDI接続で起動し直すとデフォルトの起動としてアナログ信号になってセットされるので、Raspberry Pi単体で起動するときに便利です。
*2 不要なメモリを使用しないように設定を変更します
*3 続けて複数指定することも可能です

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
SmartDoc