树莓派 系统连接

树莓派支持远程连接

首先获取树莓派的IP,如果使用的是动态IP:

1.在树莓派的终端下执行命令: ifconfig-a,查看树莓派的IP。

2.可以在windows电脑命令行执行命令 : arp -a ,查看动态ip。

树莓派默认用户名:pi 密码:raspberry

A:SSH远程连接,可以使用putty,pytty.org连不上,下载地址:http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

连接树莓派IP,输入用户名、密码raspberry,就出现终端界面。

最新的raspberry系统是默认关闭ssh服务的,打开方法:

进入树莓派的配置 sudo raspi-config, 然后选择interfacing options ,然后选择开启ssh

网上据说直接到根目录,新建一个名为ssh的空白文件也可以,没试过


B:远程桌面连接
终端下执行命令:sudo apt-get install xrdp ,安装远程桌面支持。
在windows电脑上使用mstsc,输入树莓派IP,用户名、密码连接。

出现错误error - problem connecting

xrdp-sesman.log打印:
[INFO ] starting Xvnc session...
[ERROR] X server for display 10 startup timeout[INFO ] starting xrdp-sessvc - xpid=2924 - wmpid=2923
[ERROR] X server for display 10 startup timeout
[ERROR] another Xserver is already active on display 10
[DEBUG] aborting connection...

解决方法:

apt-get purge tightvnc xrdp
apt-get install tightvncserver xrdp

最后启动xrdp服务,sudo /etc/init.d/xrdp restart

一般情况就不需要用鼠标键盘和显示器连接树莓派

原文地址:https://www.cnblogs.com/arwen-spy/p/6537427.html