Git Product home page Git Product logo

tmoe-linux's Introduction

🍭Tmoe-linux

If you do not understand the following readme, please give me an issue to explain the situation,or open README.en.md

介绍 Introduction

🍭Without any basic knowledge of linux shell,🍹 you can run GNU/Linux on your android phone and windows PC, and you can easily install a graphical desktop environment and configure pulseaudio server.✨ You can also run Gentoo, Arch and other systems in WSL.

GNU/Linux 上一键安装 GNU/Linux chroot 容器。
Android Termux 上一键安装 GNU/Linux proot 容器。
WSL上一键安装桌面环境。

AndroidWin10还支持配置音频服务。

🍸 目前支持的容器: Supported containers:

  • Debian buster/sid
  • Ubuntu 20.04
  • Kali rolling
  • Arch
  • Fedora 31
  • CentOS 8
  • Gentoo
  • Funtoo
  • Alpine edge
  • OpenSUSE tumbleweed
  • Void
  • Raspbian buster
  • Mint tricia
  • Devuan ascii
  • Slackware
  • Armbian
    ✨ 安装完容器后,还能自动执行其它优化步骤。🍹
    配置和优化步骤仅适用于 Debian、Ubuntu、Kali、Arch、Fedora 和 Gentoo(x64)。
    All configuration and optimization steps only apply to Debian,Ubuntu,Kali,Arch and Fedora.

Capture__2020-02-16-02-23-49.png

支持一键安装图形界面。 Support one-key graphical user interface installation.

截图_2020-02-01_08-53-21.jpg

🍸 Supported GUI/DE 目前支持的桌面环境:

  • xfce4
  • lxde
  • mate
  • lxqt
  • kde plasma 5
  • cinnamon
  • gnome 3
  • deepin desktop

注 1:Only some systems support desktop environment installation.
仅部分系统支持
注 2:Prioritize XFCE
优先适配 xfce
注 3: 未打勾的选项在容器/远程桌面环境下存在一些问题
Some desktops may not display properly through the remote desktop

1.Arch + Deepin desktop 在 VNC 下会黑屏
下图的 Arch 是运行在 debian 里的 chroot 容器。 Snipaste_2020-04-12_05-09-13.png
2.如下图所示,Debian sid + KDE Plasma 5 转发 X11 后,窗口显示会出现问题。 注:在 RDP 下此问题未复现 Snipaste_2020-04-12_07-28-58.png

支持的架构 Supported architecture

Debian 容器支持 arm64(aarch64)、armhf、armel、amd64(x86_64) 、i386(x86)、s390x 和 ppc64el

可以支持,但不想支持的是 mipsel
In addition, the mipsel architecture is also supported! The developer has tested it on the router

2020-03-24 已经支持 mipsel 架构了!(已经在路由器上测试过了 🍥)

可能支持 RISC-V (由于现在暂时无法构建 risc-v 的基础容器镜像,故只能靠 qemu 在 risc-v 的设备上模拟其它架构的系统。)

这可能是你见过的为数不多的,全架构 、全平台 项目。 (win10 仅支持 wsl,不是全平台)

Containers other than debian may only support mainstream architectures, not s390x and ppc64el. 其它系统容器可能只支持主流的 amd64、arm64 等架构,不支持 s390x 和 ppc64el 等冷门架构。

不同平台的安装教程 Installation tutorials for different platforms

You can run this tool not only on Android, but also on GNU/Linux.

您不仅可以在 Android 手机上运行本工具,亦可在 GNU/Linux 上运行。

1.Windows10

Tutorial(教程):
我不知道怎么用
Q:I don't know how to use it?
以admin身份运行powershell
A:Run PowerShell as an administrator and enter the following command.

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

重启系统后再次以管理员身份运行 powershell ,然后输下面 wsl 开头的命令。
After restarting the system, run powershell again as an administrator, then press the following command.

wsl --set-default-version 2

enable
store
When you download the subsystem from the Microsoft Store, be sure to choose Ubuntu, Kali and Debian.
若无法连接 Microsoft Store,那么也可以手动安装。
请从以下三者中选择:
Debian
Kali
Ubuntu

Open the subsystem and update the Linux kernel of WSL2 according to the prompt. After the update is complete, when prompted to enter the user name of the UNIX account, if you do not care about security issues, then you can close the window directly. The advantage of this is that you do not need to enter the sudo password.
打开子系统,然后根据提示更新 WSL2 的 linux 内核。更新完成后,当提示输普通账号用户名时,直接关掉窗口。

注:这样子默认就是 root 账号,可以省下输 sudo 密码的步骤,之后可以使用 adduser 命令来单独增加普通账号。默认以非管理员身份运行的子系统 root 账号并没有 windows 管理员权限哦!只拥有 linux 的 root 权限而已,要是以管理员身份运行子系统的话,就真的要谨慎操作了。PC 用 root 账号的问题不大,又不是服务器。

Restart the subsystem 重新打开子系统

If you do not live in China, please enter

    sudo apt update
    sudo apt install -y wget
    bash -c "$(wget -O- git.io/linux.sh)"

如果你在国内,那么请输

    sudo apt update
    sudo apt install -y wget
    bash -c "$(wget -O- l.tmoe.me)"

注:前后两者调用的内容是不一样的,二选一即可。
区别在于后者对国内的网络进行了优化。

最后按方向键和回车键进行操作。
Finally, press Enter and arrow keys to operate.

注:WSL 请选择安装工具
When prompted Tool/Manager, please select Tool

000
Just press enter and arrow keys, it won't be so simple, you are really adorkable!
001
How can you scold me?
002
I'm not talking about you!
01
How to start the X server?
02
Just enter startxsdl, it should be ok
03 How to start the VNC?
04
Just enter startvnc
And you can also enter debian-i to start the tmoe-linux tool
05

后期注:建议 WSL 用户直接安装 gui ,不要在里面先套娃安装 chroot 容器,再装 gui,因为这将导致 windows 程序调用失败。

停止VNC
How to stop VNC?
stopvnc
Oh,I know,enter stopvnc
06
Can anyone tell me how to modify the resolution?
07
Nobody answered, only read the readme written by the developer.
08
09
Wow! This is too complicated, I can't remember the order at all.
10
WSL users only need to remember startxsdl
Android users only need to remember startvnc.
11
12

14
I think the script you wrote is garbage, I don’t want to use it!
perfect

If you don’t like it, you don’t have to use it.But few peope integrate win10 and linux so perfectly.

2.Android-Termux

1.Go to google play, then install Termux and Termux:api
2.Open termux and enter the following command.

1.安装安卓版TermuxTermux:api
2.打开 termux,输入下面 bash 开头的命令

If you do not live in China, please enter

    bash -c "$(curl -Lv https://git.io/linux.sh)"

如果你在国内,那么请输

    bash -c "$(curl -Lv l.tmoe.me)"

3-EN.Goto Google Play,then install VNC client or X server

3-CN.如需使用 gui,可能还需要安装 VNC apk,您可以前往 Google play 或使用 Tmoe-linux 的 debian-i 来下载。
注:web 端的 novnc 无需安装 apk,但触控操作体验不佳。

3.Debian/Ubuntu/Mint/Kali/Deepin/Devuan/MX 等 deb 系发行版

If you do not live in China, please enter

    sudo apt update
    sudo apt install -y wget
    bash -c "$(wget -O- https://git.io/linux.sh)"

如果你在国内,那么请输

     sudo apt update
     sudo apt install -y wget
     bash -c "$(wget -O- l.tmoe.me)"

4.RedHat/Fedora/CentOS

    dnf install -y curl || yum install -y curl
    bash -c "$(curl -Lv https://git.io/linux.sh)"

5.Arch/Manjaro

    pacman -Syu --noconfirm curl
    bash -c "$(curl -Lv https://git.io/linux.sh)"

6.OpenWRT/Entware

    opkg update
    opkg install libustream-openssl ca-bundle ca-certificates wget bash
    bash -c "$(wget --no-check-certificate -O- https://git.io/linux.sh)"

7.Alpine

    apk add wget
    ash -c "$(wget -O- https://git.io/linux.sh)"

8.Void

    xbps-install -S
    xbps-install -y wget
    bash -c "$(wget -O- https://git.io/linux.sh)"

9.Gentoo/Funtoo

    emerge -avk net-misc/wget
    bash -c "$(wget -O- https://git.io/linux.sh)"

10.其它 system 未测试,以下系统请自行解决依赖关系

例如:OpenSuseGuixSD等发行版。

相关依赖为 git aria2 pv wget curl grep procps less tar xz newt(whiptail)


使用说明

简易版说明(萌新专用)Novice tutorial

  • 1.安装 Tmoe GNU/Linux 管理工具的命令(仅支持在原系统内输)
  • Enter the following command in the terminal.
bash -c "$(curl -Lv https://git.io/linux.sh)"

After executing the command, press the enter and arrow keys to operate, basically all operations have prompts.
进入工具后,按方向键和回车键进行操作,基本上所有操作都有提示。

Snipaste_2020-03-20_17-10-48.png

  • 2.Command to enter the container
  • 启动命令(仅支持在原系统内输)
debian
  • 3.Command to remove the container
  • 卸载命令(仅支持在原系统内输)
debian-rm
  • 4.Start the toolbox, which can be executed in the original system and container, but the management content is different.
  • 启动工具箱(同时支持,但管理的内容不同)
debian-i
  • 5.Command to start vnc
  • 启动 vnc 命令(同时支持)
startvnc
  • 6.Command to stop vnc
  • 停止 vnc 命令(同时支持)
 stopvnc

完整版说明(Full description)

Step1. Install GNU/Linux container

1-1. You can use the following command to install Tmoe GNU/Linux tool

安装 Tmoe GNU/Linux 管理工具的命令是

apt update
apt install -y wget
bash -c "$(wget -O- https://git.io/linux.sh)"

(旧版)视频教程链接 提取码: debb

1-2.安装后的步骤

If you want to start GNU/Linux next time, you can just type debian.
下次启动 GNU/Linux 的命令是
debian

关于 GNU/Linux 的重新安装与移除

debian-i 启动工具箱,并自行选择重装和其它选项。 您也可以手动输debian-rm来移除已经安装的 GNU/Linux 容器。

Step2.安装图形化桌面环境

2-1.安装前(关于桌面环境的安装与卸载)

进入 GNU/Linux 容器后,请从 xfce、lxde、mate 中选择一种。

gnomekde 是用来卖萌用的,不要安装。如需安装,请自行解决依赖关系和其它问题。 四选一!千万不要一下子装两个桌面!

后期注:KDE 已经在 chroot 环境中测试成功,但由于操作流畅度堪忧,且存在 bug,故和 lxqt 一样移除了支持,但您仍然可以使用主目录下的脚本进行安装。

2-2.安装中

安装过程会提示选择键盘布局,请直接按回车。 初次启动 vnc 服务,会提示输 6 至 8 位(不可见)的密码,输两遍。

当提示 Would you like to enter a view-only password ?
n

2-3.安装后

startvnc启动 vnc 服务, 输stopvnc停止 vnc 服务。 完成后,打开 vnc viewer 客户端,输 localhost:5901

其它说明

  • 1.若无法退出 GNU/Linux 容器,则请在原系统内输stopvnc
  • 2.若 zsh 配置失败,则请输./zsh.sh进行重新配置。
  • 3.主目录下的 sh 文件可以删除,但 sd、tf 和 termux 三个目录不要删
  • 因为这三个目录挂载了设备存储空间,分别和内置存储、tf 卡(termux 专有目录)以及 termux 主目录联动。

可选步骤

1.修改 vnc 分辨率的方法
  • 1-1.工具修改

在 GNU/Linux 容器内输debian-i打开工具箱,然后选择相关选项,需要注意的只有一点,x 为英文小写,不是乘号。

  • 1-2.手动修改
apt install -y nano
nano $(which startvnc)

1440x720(竖屏)改成你需要的分辨率,例如 1920x10780(横屏) 修改完成后,按Ctrl+S 保存,Ctrl+X退出。

2.你可以装个浏览器来玩玩

./firefox.sh安装 firefox 浏览器,输./firefox.sh rm卸载

chromium 浏览器的启动命令是 chromium --no-sandbox

相关软件的安装选项已经整合进debian-i


更新日志

2019-11、12 月

本文首发于酷安网@萌系生物研究员 旧版脚本部分命令借鉴了 atilo-cn 和 AnLinux,除此之外,大部分都是本人手打的。 可能会有出错的地方,欢迎指正。

2020-02-15

完全重写脚本! 和别人写的脚本已经完全不一样了,重点不在于安装的方式,而在于配置优化以及与安卓原系统的联动,难点在于一些鬼点子。

本来是不想维护的,但是我发现了一个很严重的 bug,所以干脆重写一遍。 本次更新的内容真的有点多,而且真的很强哦 ✨ ο(=•ω <=)ρ⌒☆,我自己都觉得太强了! 脚本文件已经达到了 40 多 KB 了。

2020-02-15 更新内容
  • 1.获取镜像途径依旧是清华镜像站,但把下载工具从 wget 换成了 aria2,从原本的单线程变成现在的 16 线程,加快了下载速度。

  • ​ 2.自动配置中文环境,默认就是中文,无需手动配置。

  • ​ 3.修复旧版脚本中非 xfce 桌面的 xstartup 文件问题。

  • ​ 4.新增自动配置 zsh 的功能,初次启动会出现提示,若在指定时间内无操作会自动开始安装并配置 zsh。

  • ​ 包含主题和语法高亮、语法历史记录插件。

  • ​ 5.简化安装流程,且不再需要某种很神奇的 internet 工具。

  • ​ 6.将 debian 10 buster (stable)换成 sid bullseye(unstable),滚动升级,一直都是新版。

  • ​ 7.修复 chromium 浏览器的启动问题,使用 ./chromium.sh 安装的版本,可以直接点击图标启动,在 root 环境下无需加--no-sandbox 参数。

  • ​ 8.加入对 armhf 和 x86_64(amd64)的支持。

  • ​ 9.支持一键更换为 kali 源,debian 变身 kali 就是这么简单!

  • ​ 10.简化卸载流程,安装脚本也可以执行卸载操作。

  • ​ 11.根据当前 linux shell 环境自动修改 proot 启动脚本。

  • ​ 12.修复启动 vnc 后,debian 无法正常关闭的 bug ,(请在 termux 原系统内输 stopvnc)

  • ​ 13.简化启动流程,你可以在 termux 原系统里输 startvnc 来启动 debian+vnc 客户端

  • ​ 14.vnc 支持自动获取本机局域网 ip,地址格式类似于 192.168.123.3:5901


之后的更新内容真的是太多了,有空的话会从酷安原帖搬过来的。其中最突出的更新内容是将安装 gui 和其它软件、管理远程桌面配置等内容整合在 GNU/Linux 容器内的 debian-i 里,以及修复了 VNC 音频传输中可能存在的一些问题。


2020-02-16 至 2020-03-22 的更新日志待补


2020-03-23 更新日志

本次更新专注于用户体验方面的优化。

  • 1.zsh 加入新插件:aloxaf开发的fzf-tab
    这是一款非常出色的补全插件! Snipaste_2020-03-24_07-48-22.png

  • 2.将默认主题更换为 powerlevel 10k,并同时修复 termux 和 xfce4 终端的字体显示问题。

  • 3.加入 Command-not-found 插件。
    当您未安装相关软件时,输入的是错误的命令。例如输 sshd 时,会出现apt install openssh-server的提示,而不是单纯的显示:Command not found.

后期注:宿主机为 OpenWRT 的路由器,不会加载上述部分插件,且默认主题非 p10k。

2020-03-24 更新日志
  • 1.支持 mipsel 架构,已在路由器上测试过了。

Snipaste_2020-03-24_05-36-44.png

  • 2.尝试让 RISC-V 架构的设备能运行 debian 容器,需要宿主机原系统为 deb 系。 当检测到设备为 riscv 架构时,将下载 arm64 架构版的容器镜像。 调用 qemu+chroot 来实现跨 CPU 架构运行容器,这是一个理论性操作,未实际测试。
2020-03-25 更新日志
  • 1.在 iOS 13.3 上发现致命 bug,不再对 iOS-iSH 提供支持。
  • 请勿在苹果 iOS 设备上使用本脚本!
  • 注:iSH为苹果 iOS 上的 Alpine Linux i686 模拟器。
2020-03-26 更新日志
  • 1.全面适配 WSL2 (第二代 windows 的 linux 子系统)
  • 注:在 WSL1 中出现严重 bug,但在 WSL2 中却没有复现。
  • 1-1.输startxsdl能同时启动 windows 的 X 服务
  • 1-2.支持 WSL 的音频传输
  • 2.修复 novnc 在非 Android 系统上重复安装的问题
  • 3.在软件商店中加入了网易云音乐和百度网盘
2020-03-27 至 2020-04-01 更新日志
  • 1.加入测试功能,可在工具内手动安装输入法(如 sunpinyin 和 sogou-pinyin)、电子书阅读器、视频剪辑(openshot)、数字绘图(krita)、社交应用(如 Wechat 和 Telegram) 等等。
  • 2.全面优化 Windows 平台的 pulseaudio(音频传输)服务
  • 3.对于 WSL 的常见问题,给出了解决方案,部分内容还附有截图。
  • 4.加入了修复度盘客户端无法打开的功能

对 WSL2 的支持已经称得上完善了!
最关键的地方在于脚本大量调用了 win10 原系统的程序。
在 win10 2004 下同时运行 linux 和 windows 程序的预览截图GlyxZ8.png
WSL2 与宿主机原系统(win10)的交互联动要比普通虚拟机强数倍,在 linux 子系统下可以直接调用 powershell.exe 等 windows 程序。
如上图所示,目前已经可以接近完美地将 win10 和 GNU/Linux 融为一体。

2020-04-02 更新日志
  • 1.支持非 root 用户配置 vnc 服务
  • 2.修复大量 bug
2020-04-10 更新日志
  • 1.加入测试版容器 arch,fedora,centos.raspbian,mint 等等
2020-04-11 更新日志
  • 1.加入测试版桌面 lxqt,kde,gnome 等。
  • 2.除 deb 系外,还支持给其它发行版安装 gui。
  • 3.支持修复 vnc 闪退。
  • 注 1:由于在这几天的更新中给所有的桌面都加入了 dbus-launch,故在部分安卓设备的 Proot 容器上出现了兼容性问题,容易造成不稳定的状况。
  • 注 2:该操作在 linux 虚拟机及 win10 子系统上没有任何问题
  • 注 3:在最新更新的版本(容器安装方式)中已加入检测功能,理论上不会再出现此问题。你也可以在更新 debian-i 后,单独进行修复。
2020-04-12 更新日志
  • 1.支持切换 VNC 音频传输方式。
2020-04-13 至 2020-04-19 更新日志
  • 1.优化并适配 Arch,Fedrora 系统
  • 2.Gentoo 和 OpenSUSE 仅优化 x64 版
  • 3.加入更多发行版的容器,例如 Slackware,Armbian 等
2020-04-20 更新日志
  • 1.支持安装其它版本的 VSCode,包括 VS Codium,VS Code OSS,以及官方版的 VScode。
  • 自动识别除 i*86 外的主流架构,自动获取最新链接,对 deb 系和红帽系进行分别适配,其它发行版以 tar 压缩包形式进行安装,解压至/usr/local/bin 目录。
  • 2.在服务器上实现了自动构建(获取最新版+重新打包配置) VSCode Server (web 版)。
    每隔一两周,当检测到新版时,远程服务器就会自动更新,完成后将自动同步至国内的 gitee 仓库。因此远程始终都是新版,但是本地的话,得要根据你下载的时间而定,不会自动更新。
2020-04-22 更新日志
  • 1.修复赋予 proot 容器真实 root 权限后,vnc 出现的权限问题。
2020-04-24 更新日志
  • 1.给 ArchLinux 容器添加了 archlinuxcn 源,并将自动安装 yay
2020-04-29 更新日志
  • 1.应 gitee 的小伙伴要求,在测试功能中支持 WPS office 的安装。
2020-05-01 更新日志
  • 1.支持解析视频网站链接,与原版 annie 最大的区别是支持解析 b23.tv ,并且无需完整链接,就能直接解析 BV 号。
2020-05-02 更新日志
  • 1.支持搭建个人云网盘(来自 github 开源项目filebrowser),配合我写的配置脚本来实现简易化管理。
2020-05-03 更新日志
  • 1.支持搭建并配置 WebDAV(nginx)服务,可以非常方便地配置和管理端口号、访问目录、访问账号、日志和进程等内容。
  • 2.支持在工具内配置 VSCode Server 的访问密码。
2020-05-04 更新日志
  • 1.增加 fedora 32 容器,由于在测试过程中发现某些问题,故保留了之前的 31,可以自由选择版本。
2020-05-05 更新日志
  • 1.优化代码,增加高亮提示。

  • 2.在 beta_features 中支持 docker 和 virtualbox 的安装。

  • 其中,当 deb 系发行版初次安装后者时,将会自动获取清华源的最新 deb 包。第二次才会提示是否将其添加至软件源列表。

  • 3.对已支持的所有系统正式开放测试功能!但由于未做过多测试,故 gentoo 、opensuse 和 alpine 等发行版可能会出现未找到匹配软件的错误信息。

2020-05-06 更新日志
  • 1.自动修复 proot 容器环境下,安装 xfce4 桌面时 gvfs 和 udisks2 配置失败的问题,原先是需要在 FAQ 里手动修复的。
  • 2.添加 xrdp 的配置选项,并适配更多桌面。
2020-05-07 至 2020-05-08 更新日志
  • 1.支持给所有已支持的桌面配置 xwayland!(仅支持 Android,不支持 win10)
  • 说明
  • 需要先在 termux 进行配置,并安装 wayland 服务端软件,再进入 GNU/Linux 容器内选择需要配置的桌面环境。
  • 其中后者只是在我之前写的 xorg+xrdp 的配置方案的基础上进行了修改而已。
  • 配置完成后,需要先打开 wayland 服务端,点击start,然后在容器内输startw启动。
  • 注:我仅测试了 xfce4。未测试的桌面可以配置,但可能存在无法连接的问题。
  • 特点:可以打开 X11VNC 无法打开的某些应用,但是 bug 超级多。
  • 由于 bug 实在过多,故我已经不想维护了。 Screenshot_20200507-193422_1.png Screenshot_20200507-222532.png 触控操作体验极差!建议使用蓝牙鼠标进行操作!
    由于目前在 Android 手机上暂时无法使用 gpu 硬件渲染加速,故实际体验非常糟糕! 不建议配置该服务!
    等 wayland 完善之后,再来继续优化吧!

tmoe-linux's People

Contributors

2moe avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.