2013-09-28 00:45阅读: 37评论: 0推荐: 0

树莓派Raspberry Pi 入门之HowTo

1.      Login

 

 


2.      安装nvcserver,提供远程桌面服务

 
 
 


3.      设置nvcserver分辨率,启动一个nvcserver实例


New ‘X’ desktop is raspberrypi: 1  远程桌面连接默认接受端口是5901.
再次使用nvcserver –geometry 1024x768 的时候,意味着New ‘X’ desktop is raspberrypi: 2,默认开启的远程桌面连接默认接受端口为5902
You will require a password to access your desktops. Password:123456
Would you like to enter a view-only password (y/x)?  n



4.      计算机上安装tightvnc(使用其提供的TightNVC Viewer远程桌面连接raspberrypi)



本机没有必要向外提供远程桌面服务,所以使用自定义模式安装,只安装TightNVC Viewer就OK了。



5.      使用TightVNC Viewer远程桌面到raspberrypi

 
 这里要求输入认证密码。
注意:这里要求输入的认证密码,是你在raspberrypi上面设置的远程桌面访问的密码。
 


6.      成功连接上raspberrypi的桌面


 
 


7.      树莓派使用USB无线网卡
插入USB无线网卡,启动raspberrypi
命令sudo lsusb 查看usb设备


 最后一个usb接口上的设备即是我插上的usb无线网卡:RTL8188CUS 802.11n WLAN Adapter


命令:sudo iwlist wlan0 scan  查看搜到的无线信号

回显如下:
wlan0     Scan completed :
          Cell 01   ….
          Cell 02  ….
          Cell 03   ….
 
可以发现,找到了三个无线网络:Cell1、Cell2、Cell3,分别对应的无线网络信号名称,也就是ESSID为:MyWifi、TP-LINK_B8AC78、TP-1810.  其中MyWifi是我家里的无线网络。
        
命令: sudo nano/etc/wpa_supplicant/wpa_supplicant.conf  创建或打开,并编辑如下内容: 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="MyWifi"
psk="*********"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
id_str="raspberrypi_wireless"
}
Ctrl+x、 y、回车,可以退出、保存
其中ssid、psk是我家的无线网络的名称和密码。Id_str则随意取。
 
 
命令:sudo nano /etc/network/interfaces  编辑网络的接口信息如图.
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface defaultinet dhcp
之后如果改变无线网络或者密码,只需修改/etc/wpa_supplicant/wpa_supplicant.conf
 
 
更简单的配置无线网卡的方法是,先用双绞线连接raspberrypi与路由器,进入路由器查看raspberrypi分配到的IP地址,使用TightNVCViewer远程桌面到你的raspberrypi,然后从桌面的图表中配置WIFI
 
Tips:
为了方便ssh登录上raspberrypi,可以在你的路由器上配置将树莓派以及无线网卡的这两个MAC使用绑定分配IP,这样就不用每次ssh之前去路由器上查看IP地址了。
 
 

本文作者:北鱼扶摇

本文链接:https://www.cnblogs.com/xxcbdhxx/p/17274653.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   北鱼扶摇  阅读(37)  评论(0编辑  收藏  举报  
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.