mirror of
http://junepve.top:3000/chicrobot/termux.git
synced 2026-10-29 21:21:29 +08:00
更新 笔记备份
This commit is contained in:
1 parent
d1e44f8747
commit
3ae4de9fac
1 file changed
+179
-1
@@ -5,4 +5,182 @@ wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/D
|
||||
一、安装termux
|
||||
https://github.com/termux/termux-app/releases
|
||||
|
||||
|
||||
使用debug版安装包避免安装后还需在服务器下载bootstrap包。
|
||||
https://github.com/termux/termux-app/releases/download/v0.118.0/termux-app_v0.118.0+github-debug_universal.apk
|
||||
二、安装termux-x11
|
||||
https://github.com/termux/termux-x11/releases
|
||||
|
||||
同样选择通用debug版本安装包
|
||||
https://github.com/termux/termux-x11/releases/download/nightly/app-universal-debug.apk
|
||||
在temux中安装x11-repo、termux-x11-nightly:
|
||||
pkg install x11-repo
|
||||
pkg install termux-x11-nightly
|
||||
|
||||
(安装不了时更新后尝试:pkg update)
|
||||
三、安装桌面环境
|
||||
debian系统+xfce4图形界面+中文
|
||||
连接设备存储空间:
|
||||
termux-setup-storage
|
||||
|
||||
安装vim编辑器:
|
||||
pkg install vim
|
||||
安装Proot-distro以安装debian:
|
||||
pkg install proot-distro
|
||||
1、debian系统
|
||||
使用proot安装debian:
|
||||
proot-distro install debian
|
||||
登录debian,用户为root,并将termux的tmp目录挂载到proot内部以共享资源:
|
||||
proot-distro login debian --user root --shared-tmp
|
||||
debian中安装sudo,vim,firefox:
|
||||
apt update
|
||||
apt install sudo vim firefox-esr
|
||||
(debian下载速度过慢时可选择更换源)
|
||||
修改root密码:
|
||||
passwd
|
||||
新增wheel和video组:
|
||||
groupadd storage
|
||||
groupadd wheel
|
||||
groupadd video
|
||||
新建普通用户user并修改密码:
|
||||
useradd -m -g users -G wheel,audio,video,storage -s /bin/bash user
|
||||
passwd user
|
||||
将user添加到sudo组,编辑/etc/sudoers文件:
|
||||
visudo
|
||||
按i进入编辑模式,在root ALL=(ALL:ALL) ALL下一行添加:
|
||||
user ALL=(ALL:ALL) ALL
|
||||
完成后按esc键退出编辑模式,并保存:
|
||||
:wq
|
||||
切换普通用户:
|
||||
su user
|
||||
2、xfce4桌面环境
|
||||
在普通用户下安装xfce4:
|
||||
sudo apt install xfce4 xfce4-goodies
|
||||
3、中文
|
||||
时区设置为东八区台北,与北京时间同步:
|
||||
sudo ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
|
||||
安装locales,fcitx输入法,涵盖大部分unicode的no tofu字体族:
|
||||
sudo apt install locales fcitx5* fonts-noto-cjk
|
||||
生成中文语言
|
||||
locale-gen
|
||||
echo "LANG=zh_CN.UTF-8" > /etc/locale.conf
|
||||
4、退出debian:
|
||||
exit
|
||||
四、手动进入桌面环境
|
||||
1、在termux中安装PulseAudio用于声音:
|
||||
pkg install pulseaudio
|
||||
2、安装virglrenderer用于硬件加速:
|
||||
pkg install virglrenderer-android
|
||||
3、启动termux-x11应用,启动termux应用,在termux中执行PulseAudio,termux x11,virglrenderer:
|
||||
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
|
||||
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
|
||||
export DISPLAY=:0
|
||||
termux-x11 :0 &
|
||||
virgl_test_server_android &
|
||||
4、使用普通用户user登录debian:
|
||||
proot-distro login --user user debian --shared-tmp
|
||||
5、启动pulseaudio,fcitx5,xfce4:
|
||||
export DISPLAY=:0
|
||||
PULSE_SERVER=tcp:127.0.0.1
|
||||
fcitx5 &
|
||||
dbus-launch --exit-with-session startxfce4 &
|
||||
6、打开termux-x11应用
|
||||
(1、启动debian:
|
||||
proot-distro login --user user debian --shared-tmp
|
||||
2、启动x11:
|
||||
termux-x11 :0 -xstartup "dbus-launch --exit-with-session xfce4-session")
|
||||
五、安装codeserver
|
||||
六、一键启动脚本准备
|
||||
|
||||
|
||||
莫老师的附件表(Github Pages):
|
||||
编号EP145
|
||||
https://gitee.com/zxmls/zxmls
|
||||
https://zxmls520.github.io/zxmls/#/
|
||||
|
||||
bash -c "$(curl -L l.tmoe.me)"
|
||||
继续吗,回车
|
||||
旧版本继续吗,y,回车
|
||||
从gitee获取文件,回车
|
||||
获取文件权限,回车
|
||||
选择语言,简体中文,回车
|
||||
proot容器,回车,回车
|
||||
安装bash-completion、libandroid-selinux等,y回车
|
||||
openssl,y回车
|
||||
motd,y回车,y回车
|
||||
init-termux-propertise,y回车
|
||||
sources.list,y回车
|
||||
bash.bashrc,y回车
|
||||
proot容器,回车,回车
|
||||
proot容器,回车
|
||||
终端配色,neon,回车
|
||||
终端字体,niconsolata-go(粗),回车
|
||||
创建termux.properties,回车
|
||||
dns,[240c::6666](CFIEC),回车,回车
|
||||
文心一言,回车
|
||||
时区,上海,回车
|
||||
sd挂载,/sdcard/download,回车(或创建文件夹,自定义如:/storage/emulated/0/A_linux)
|
||||
宿主目录,/data/data/com.termux/files/home,回车,回车,回车
|
||||
arm发行版列表,回车
|
||||
Ubuntu,回车
|
||||
22.04,回车
|
||||
启动,回车,回车
|
||||
后台运行,允许
|
||||
新建sudo用户,是,w
|
||||
密码55555555,回车
|
||||
设为默认,no,回车
|
||||
为root配置zsh,是
|
||||
设置完后删除zsh.sh和zsh-i.sh,是
|
||||
启动tmoe-tools,是,回车,回车
|
||||
zlogin,y,回车
|
||||
zshenv,y,回车
|
||||
GUI图形页面,回车,回车
|
||||
rootless_DE,回车
|
||||
lxde,回车,回车
|
||||
普通版core,回车
|
||||
软件包,否
|
||||
选择启动的vnc服务器,tiger
|
||||
vnc访问密码,123456
|
||||
vnc端口,5902,回车
|
||||
多个vnc服务x11,回车
|
||||
配置novnc,回车
|
||||
|
||||
防止安卓12以后版本的杀后台:
|
||||
分屏termux与开发者选项
|
||||
进入无线调试,打开调试开关
|
||||
记下端口号1,点击使用配对码配对设备,显示端口号2与pin码
|
||||
apt install git -y
|
||||
git clone https://github.com/SaicharanKandukuri/termux-android12-phantom-fix
|
||||
cd termux-android12-phantom-fix
|
||||
bash runme.sh
|
||||
输入端口2,输入pin码,输入端口1
|
||||
|
||||
重启后命令行输入startvnc,跳转vncviewer应用,连接localhost:5902,密码123456,取消勾选每次警告我,勾选记住密码
|
||||
|
||||
美化:apt install lxappearance
|
||||
|
||||
换源
|
||||
备份原有文件:
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
sed将默认替换为清华源:
|
||||
sudo sed -i.bak -e 's|//\(archive\|security\)\.ubuntu\.com|//mirrors.aliyun.com|g' /etc/apt/sources.list
|
||||
更新:
|
||||
sudo apt update
|
||||
|
||||
安装浏览器,Firefox,使用tmoe安装时,源使用的是ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main firefox arm64 136.0.4
|
||||
|
||||
vim ~/.local/share/applications/code-server.desktop
|
||||
|
||||
|
||||
[Desktop Entry]
|
||||
Name=Code Server
|
||||
Comment=Launch code-server on port 18080
|
||||
Exec=/usr/bin/code-server --bind-addr 0.0.0.0:18080
|
||||
Icon=/path/to/icon.png # 可选,例如使用VS Code图标:/usr/share/icons/hicolor/256x256/apps/code.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Development;
|
||||
|
||||
chmod +x ~/.local/share/applications/code-server.desktop
|
||||
|
||||
rm ~/.local/share/applications/code-server.desktop
|
||||
|
||||
Reference in new issue
Block a user