> For the complete documentation index, see [llms.txt](https://termux-wiki.zsxwz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://termux-wiki.zsxwz.com/an-zhuang-linux-fa-hang-ban/zhuo-mian-ji-vnc-yuan-cheng.md).

# 桌面及vnc远程

termux安装vnc远程图形界面，可以使用tigervnc

```
pkg install x11-repo tigervnc

# 安装xfce桌面
pkg install xfce openbox aterm

# 设置启动文件，分辨率可以根据自己的需求修改
echo -e "#\!/bin/bash -e\nam start com.realvnc.viewer.android/com.realvnc.viewer.android.app.ConnectionChooserActivity\nexport DISPLAY=:1\nXvnc -geometry 720x1440 --SecurityTypes=None \$DISPLAY&\nsleep 1s\nopenbox-session&\nthunar&\nstartxfce4">~/startvnc

# 设置权限
chmod +x ~/startvnc

mv -f ~/startvnc $PREFIX/bin/

# 启动
startvnc
```

之后手机就可以安装vnc-viewer，远程链接了。端口默认5901

可以使用`ifconfig`，查看自己的ip地址。

可以参考：

[termux安装图形界面](https://bbs.zsxwz.com/thread-1989.htm)

不同的linux发行版，安装vnc稍微有一点不同，但都差不多。还可以使用脚本安装ubuntu19及桌面，可以参考：

[安卓无需root安装ubuntu19及图形界面及谷歌浏览器](https://zsxwz.com/2019/12/29/%e5%ae%89%e5%8d%93%e6%97%a0%e9%9c%80root%e5%ae%89%e8%a3%85ubuntu19%e5%8f%8a%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e5%8f%8a%e8%b0%b7%e6%ad%8c%e6%b5%8f%e8%a7%88%e5%99%a8%e5%8f%8a%e5%85%b6%e4%bb%96/)
