# 安裝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 連線桌面

![](https://529150212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh81JtaIQ84bwQqz_Wh%2F-LvIn2mmK7gS_9YkFZe6%2F-LvInmx-IRt08oT85pE8%2Fimage.png?alt=media\&token=f2007ad3-ecce-4326-98bb-42e09cabe6c2)

![](https://529150212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh81JtaIQ84bwQqz_Wh%2F-LvIn2mmK7gS_9YkFZe6%2F-LvIo2--VnsUIgheXb3Q%2Fimage.png?alt=media\&token=bfd2b94e-812c-46ba-b32c-e32c477f6a5f)

修改顯示

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

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