# 桌面及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/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://termux-wiki.zsxwz.com/an-zhuang-linux-fa-hang-ban/zhuo-mian-ji-vnc-yuan-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
