Ubuntu18.04 Jetson nx 的vnc远程桌面连接
由于我遇到的问题是setting中sharing点了没反应,有时没有,还有sharing点了有反应,但是左上角一直是off,网上的方法试过好多都没用,后来自己琢磨,记录一下这个错误
一. 设置desktop sharing
1.打开终端输入下面的命令
sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml
2.编辑:在文件的最后一段上面添加以下内容
<key name='enabled' type='b'>
<summary>Enable remote access to the desktop</summary>
<description>
If true, allows remote access to the desktop via the RFB
protocol. Users on remote machines may then connect to the
desktop using a VNC viewer.
</description>
<default>false</default>
</key>
由于18.04的nx上面缺少一项内容,导致sharing打不开
3.退出编辑模式保存,并输入以下命令重新编译
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
编译一般都不会出错,因为我之前修改过里面的东西导致有出现报错,直到编译不出错为止
有时候这里会报一个未定义vino什么的错误,只需要装上vino即可,在编译就没错了
此时就可以打开setting的sharing选项
二. 安装 vino ,打开vnc服务
sudo apt-get update
sudo apt-get -y install vino dconf-editor
三. 设置 dconf-editor
a.首先在应用中打开dconf-editor
b.依次点击org–>gnome–>desktop–>remote-access
c.关闭require-encryption,prompt-enabled
四.启动vnc服务,并设置自启
打开终端输入
/usr/lib/vino/vino-server
设置自启
打开应用找到这个程序
startup applications
点击add
在command里面输入要运行的脚本文件路径后保存
如下图
到这自启设置完成
五.ifconfig查看本机IP地址
六.Windows下载安装vnc
链接: vnc官网.
安装完成之后打开在这里输入上面查询的IP地址
通过WiFi连接直接输入即可。
WiFi连接需要Windows与Linux处于一个网络下
通过WiFi连接后 界面会很卡,再插上网线也是一个办法,或者直接通过网线连接可以避免。
如果通过网线连接后面可以加上5900,比如
192.168.1.xxx:5900
注意:先配置好通过WiFi进行远程连接,之后在配置网线连接就简单了
七.修改其他配置
如果没有显示器连接,默认 VNC 连接后的分辨率为 640x480,需要自己修改。
sudo vi /etc/X11/xorg.conf
添加以下内容:
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Tegra0"
SubSection "Display"
Depth 24
Virtual 1920 1080
EndSubSection
EndSection
第一次写的文章,会有不好的地方,望大家见谅。