# 安裝Linux桌面

使用最簡易工具，無須root

{% embed url="<https://play.google.com/store/apps/details?id=studio.com.techriz.andronix&hl=zh_TW>" %}

./start-debian.sh

```
 apt-get install gnupg bash-completion dialog locales sudo iproute2 nano net-tools python3-pip rsync 
```

安裝ssh server

```
passwd root
apt install ssh
nano /etc/ssh/sshd_config
------------------------
Port 2222
..........
PermitRootLogin yes
------------------------
service ssh restart
```

&#x20;連線ssh server

```
ssh termuxIP -p 2222 -l root
```

安裝mongodb

```
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
apt-get update
apt install mongodb-org
```

啟動mongodb

```
mongod -f /etc/mongod.conf &
```

修改啟動程式

nano start-debian.sh

```
command+=" -b /data/data/com.termux/files/home:/root"
## uncomment the following line to mount /sdcard directly to / 
#command+=" -b /sdcard"
command+=" -b /storage/emulated/0/:/storage"
```

{% embed url="<https://github.com/nodesource/distributions/blob/master/README.md#deb>" %}

```
apt update && apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
```

### 安裝桌面環境

### ./start-debian.sh

### bash xfce4\_de.sh

```
Configuring keyboard-configuration
----------------------------------

Please select the layout matching the keyboard for this machine.

  1. English (US)

Running vncserver-start
 
 
 
To Kill VNC Server just run vncserver-stop
 
 
 

You will require a password to access your desktops.

Password: 
Warning: password truncated to the length of 8.
Verify:   
Would you like to enter a view-only password (y/n)? n

netstat -ltn | grep 5901
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN  
```

VNC 連線桌面

![](/files/-LvInmx-IRt08oT85pE8)

![](/files/-LvIo2--VnsUIgheXb3Q)

修改顯示

```
nano /usr/local/bin/vncserver-start
export USER=root
export HOME=/root

vncserver -geometry 1366x768 -depth 24 -name remote-desktop :1
```


---

# 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://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/an-zhuang-linux-zhuo-mian.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.
