Roid is now purely desktop-oriented
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
# Roid: an easy Void Linux installation toolkit for Termux environments on top of Android OS
|
||||
# Roid: an easy Void Linux desktop installation toolkit for Termux environments on top of Android OS
|
||||
|
||||
The Roid toolkit allows you to turn any Android device that can run Termux (and Termux-X11, if you need a GUI desktop) into a full-featured [Void Linux](https://voidlinux.org/) PC.
|
||||
The Roid toolkit allows you to turn any Android device that can run Termux and Termux-X11 into a full-featured [Void Linux](https://voidlinux.org/) desktop PC.
|
||||
|
||||
Only tested on ARM64. Other hardware platforms may or may not work.
|
||||
|
||||
**Note: Roid is now GUI-oriented only**. For a much better CLI experience, please switch to [ri](https://luxferre.top/ri) instead of Roid, e.g. run it with `curl -fsSL luxferre.top/ri | sh`.
|
||||
|
||||
## Features
|
||||
|
||||
* Full (glibc-based) Void Linux installation for your smartphone/tablet architecture (usually ARM64)
|
||||
* Convenient shell aliases inside the environment (see [.roidrc](.roidrc))
|
||||
* Sound support out of the box (via PulseAudio)
|
||||
* A set of development tools out of the box (GCC, Make, Autotools, Perl, Tcl, Python, Janet, S-Lang, Lua, Expect etc)
|
||||
* (Opt-out) 3D-accelerated X11 GUI desktop environment (i3, st-sx, Fira Code, Noto Fonts etc)
|
||||
* 3D-accelerated X11 GUI desktop environment (i3, st-sx, Fira Code, Noto Fonts etc)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* Android 8 or later.
|
||||
* [Termux](https://termux.dev/en/) installed and prepared with `termux-change-repo` and `termux-setup-storage`. It's also strongly recommended to select "Acquire wakelock" in the notification bar before starting the installation.
|
||||
* [Termux-X11](https://github.com/termux/termux-x11) installed from GH releases in case you need a GUI desktop. **Note**: not all Android flavors are supported by Termux-X11.
|
||||
* Git installed within Termux itself: `pkg updrade -y && pkg install -y git`
|
||||
* At least 4.5 GiB of free space on the device.
|
||||
* [Termux](https://termux.dev/en/) installed and prepared with `termux-change-repo` and `termux-setup-storage`. It's also strongly recommended to select "Acquire wakelock" in the notification drawer and to run `pkg upgrade -y` before starting the installation.
|
||||
* [Termux-X11](https://github.com/termux/termux-x11) installed from GH releases. **Note**: not all Android flavors are supported by Termux-X11.
|
||||
* Git installed within Termux itself: `pkg install -y git`
|
||||
|
||||
**Note**: with the exception of Termux-X11 and Git, the same prerequisites apply to running [ri](https://luxferre.top/ri).
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -28,42 +33,24 @@ git clone --depth 1 https://codeberg.org/luxferre/roid.git ~/roid
|
||||
sh ~/roid/install
|
||||
```
|
||||
|
||||
In case you don't need a GUI desktop, run `NOX=y sh ~/roid/install` instead.
|
||||
After the process completes, you need to fully exit the Termux shell and re-enter it before you can start Void Linux.
|
||||
|
||||
After the process completes, you need to fully exit the Termux shell and re-enter it before you can start Void.
|
||||
|
||||
## Absolute minimum installation (no Git required on Termux side)
|
||||
|
||||
```sh
|
||||
curl -sSL https://luxferre.top/roid.sh | sh
|
||||
```
|
||||
|
||||
The [roid.sh](roid.sh) script installs a near-barebones, CLI-only, but still convenient Void Linux environment and also updates your Termux font to Fira Code Retina in order to enable ligatures. It uses a separate `.roidrc` file that's stored as [.roidrc-minimal](.roidrc-minimal) in this repo.
|
||||
|
||||
This is the author's preferred way of quickstarting a Void shell on any fresh device running Termux.
|
||||
|
||||
## CLI usage
|
||||
|
||||
From the Termux environment, just type `void` to enter the Void Linux shell. You're ready to go. Your original Termux home path is available in the `$TERMUX_HOME` environment variable.
|
||||
|
||||
Alternatively, if you don't want to enter the shell but just run a command inside Void Linux and then return to Termux, type `voidrun [command]` instead.
|
||||
|
||||
## Desktop GUI usage (requires Termux-X11)
|
||||
## Usage
|
||||
|
||||
1. Open Termux-X11 in the background.
|
||||
2. Switch to Termux (make sure the wakelock is on!) and type `voidgui` to enter the shell.
|
||||
2. Switch to Termux (make sure the wakelock is on!) and type `voidgui` to enter the desktop.
|
||||
3. Switch to Termux-X11 to start using the environment.
|
||||
4. Exit both the desktop and the CLI shell with Mod4+Shift+E.
|
||||
4. Terminate the desktop session and exit to Termux with Mod4+Shift+E or Ctrl+Alt+Backspace.
|
||||
|
||||
Alternatively, you can run `startx` (here, it's an alias) from your CLI environment and proceed as usual.
|
||||
Alternatively, you can type `void` to enter CLI and then run `startx` (here, it's an alias) and proceed as usual. In this case, the Void shell will still be there in Termux when you terminate the desktop session.
|
||||
|
||||
Having at least an external keyboard connected to your device is highly recommended for better desktop experience.
|
||||
Having at least an external keyboard connected to your device is highly recommended for better desktop experience. Both keyboard and mouse are preferred even more.
|
||||
|
||||
After exiting the Void Linux shell and before exiting Termux, it's advisable to run the `roidclean` command to stop the PulseAudio and 3D acceleration servers.
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To fully uninstall Void Linux set up by Roid, exit the Void shell and then run either this:
|
||||
To fully uninstall Void Linux set up by Roid, exit the Void session and then run either this:
|
||||
|
||||
```
|
||||
roidclean
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Roid: barebones Void Linux setup script for Termux environment
|
||||
# includes sound support via PulseAudio server
|
||||
# and X11 graphics support via Termux-X11 server
|
||||
# Set NOX=y to disable graphics package installation
|
||||
# and NOEXTRAS=y to disable extra CLI package installation
|
||||
# Created by Luxferre in 2026, released into the public domain
|
||||
|
||||
# Non-GUI packages
|
||||
@@ -16,22 +14,17 @@ X_APPS='dbus mesa mesa-dri mesa-demos mesa-vaapi glxinfo glmark2 i3 i3lock i3sta
|
||||
FONT_PKGS='noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji noto-fonts-ttf-variable liberation-fonts-ttf font-firacode fonts-roboto-ttf'
|
||||
|
||||
ALL_REPOS="void-repo-nonfree"
|
||||
ALL_PKGS="$BASE_PKGS"
|
||||
[ -z "$NOEXTRAS" ] && ALL_PKGS="$ALL_PKGS $EXTRA_PKGS"
|
||||
[ -z "$NOX" ] && ALL_PKGS="$ALL_PKGS $X11_PKGS $FONT_PKGS $X_APPS"
|
||||
ALL_PKGS="$BASE_PKGS $EXTRA_PKGS $X11_PKGS $FONT_PKGS $X_APPS"
|
||||
|
||||
echo 'Setting up host environment...'
|
||||
pkg upgrade -y
|
||||
pkg install -y proot-distro pulseaudio
|
||||
pkg install -y x11-repo
|
||||
pkg install -y proot-distro pulseaudio termux-x11-nightly virglrenderer-android
|
||||
cat >> $HOME/.profile <<'EOF'
|
||||
pulseaudio --start --exit-idle-time=-1 # ROID_INST
|
||||
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1 # ROID_INST
|
||||
virgl_test_server_android & # ROID_INST
|
||||
EOF
|
||||
if [ -z "$NOX" ]; then
|
||||
pkg install -y x11-repo
|
||||
pkg install -y termux-x11-nightly virglrenderer-android
|
||||
echo 'virgl_test_server_android & # ROID_INST' >> $HOME/.profile
|
||||
fi
|
||||
cat >> $HOME/.bashrc <<'EOF'
|
||||
alias void="proot-distro login -P -e TERMUX_HOME=$HOME void-glibc-full" # ROID_INST
|
||||
alias voidgui="proot-distro login -P -e TERMUX_HOME=$HOME -e GALLIUM_DRIVER=virpipe -e LC_ALL=C.UTF-8 -e LANG=C.UTF-8 -e GDK_SCALE=1 -e GTK_THEME=Adwaita:dark -e QT_AUTO_SCREEN_SCALE_FACTOR=1 -e QT_ENABLE_HIDPI_SCALING=1 void-glibc-full -- exec termux-x11 :0 +iglx -ac -force-sysvshm -legacy-drawing -xstartup 'dbus-launch --exit-with-session i3'" # ROID_INST
|
||||
@@ -40,15 +33,9 @@ alias roidclean='killall pulseaudio virgl_test_server_android' # ROID_INST
|
||||
EOF
|
||||
echo 'Installing Void Linux...'
|
||||
proot-distro install ghcr.io/void-linux/void-glibc-full
|
||||
echo 'Extra repository setup...'
|
||||
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_REPOS"
|
||||
echo 'Package setup...'
|
||||
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_PKGS"
|
||||
echo 'Post-installation steps (CLI)...'
|
||||
proot-distro run void-glibc-full -e TERMUX_HOME=$HOME -- sh $HOME/roid/postinstall-cli
|
||||
if [ -z "$NOX" ]; then
|
||||
echo 'Post-installation steps (GUI)...'
|
||||
proot-distro run void-glibc-full -- sh -c "ln -s $TMPDIR/.virgl_test /tmp/"
|
||||
proot-distro run void-glibc-full -e TERMUX_HOME=$HOME -- sh $HOME/roid/postinstall-gui
|
||||
fi
|
||||
echo 'Done. Restart the Termux shell to take effect, then type void to start the OS'
|
||||
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Suy $ALL_REPOS && xbps-install -Suy $ALL_PKGS"
|
||||
echo 'Post-installation steps ...'
|
||||
proot-distro run void-glibc-full -- sh -c "ln -s $TMPDIR/.virgl_test /tmp/"
|
||||
proot-distro run void-glibc-full -e TERMUX_HOME=$HOME -- sh $HOME/roid/postinstall
|
||||
echo 'Done. Restart the Termux shell to take effect, then type voidgui to start the OS and open Termux-X11 to see the display'
|
||||
|
||||
@@ -1,21 +1,34 @@
|
||||
#!/bin/sh
|
||||
# Roid post-installation steps for GUI desktop environment
|
||||
# Roid post-installation steps
|
||||
# !!!under construction!!!
|
||||
|
||||
# system DPI
|
||||
SYSDPI=216
|
||||
|
||||
cd /root
|
||||
|
||||
cat >> .bash_profile <<'EOF'
|
||||
cat > /root/.bash_profile <<'EOF'
|
||||
export LC_ALL=C.UTF-8
|
||||
export LANG=C.UTF-8
|
||||
export DISPLAY=:0
|
||||
export GALLIUM_DRIVER=virpipe
|
||||
export GDK_SCALE=1
|
||||
export GTK_THEME=Adwaita:dark
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
||||
export QT_ENABLE_HIGHDPI_SCALING=1
|
||||
[[ -f /root/.bashrc ]] && [[ $- == *i* ]] && . /root/.bashrc
|
||||
EOF
|
||||
|
||||
cat > /root/.bashrc <<'EOF'
|
||||
PS1='\W # '
|
||||
. /root/.roidrc
|
||||
EOF
|
||||
|
||||
cp $TERMUX_HOME/roid/.roidrc /root/.roidrc
|
||||
|
||||
echo 'Janet module setup...'
|
||||
jpm install spork jurl sqlite3
|
||||
|
||||
cd /root
|
||||
|
||||
# install st
|
||||
echo 'Installing st...'
|
||||
git clone https://github.com/veltza/st-sx.git
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Roid post-installation steps for CLI environment
|
||||
|
||||
cat > /root/.bash_profile <<'EOF'
|
||||
export LC_ALL=C.UTF-8
|
||||
export LANG=C.UTF-8
|
||||
[[ -f /root/.bashrc ]] && [[ $- == *i* ]] && . /root/.bashrc
|
||||
EOF
|
||||
|
||||
cat > /root/.bashrc <<'EOF'
|
||||
PS1='\W # '
|
||||
. /root/.roidrc
|
||||
EOF
|
||||
|
||||
cp $TERMUX_HOME/roid/.roidrc /root/.roidrc
|
||||
|
||||
echo 'Janet module setup...'
|
||||
jpm install spork jurl sqlite3
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Roid toolset setup script
|
||||
# Should work on any Void Linux installation, not just specific to Roid
|
||||
# Installs the following tools and development packages:
|
||||
# - Shell tools: jq, yq, mlr, ag, fzf, dtach, dialog, progress, discount, HTop, Nano, MC, Zip, 7-Zip
|
||||
# - Multimedia tools: ImageMagick, pngcrush, SoX, FFmpeg, MPG123, DUMBplay
|
||||
# - Network tools: cURL, Socat, RSync, Wget, GSocket, Lynx, Netcat, Offpunk, aria2c, Outport, Multicities
|
||||
# - Security tools: GnuPG, Pass, NMap, THC Hydra, John the Ripper, Hashcat, SQLMAP, Gobuster, BlueShift
|
||||
# - Dev tools: Git, SQlite3, CMake
|
||||
# - Languages: Go, Tcl (+ Tcllib, TclTLS, SQLite-Tcl), Janet (+ JPM, Spork, Jurl, Janet-SQLite3)
|
||||
# - Fun tools and games: Frotz, FIGlet (+ extra fonts), BSD Games, Netris, Nudoku, Scoundrel-Bash,
|
||||
# Rogue, Cataclysm: Dark Days Ahead (min. 80x24 terminal size required for it and Rogue)
|
||||
# Created by Luxferre in 2026, released into the public domain
|
||||
|
||||
# Local single-script installation helper
|
||||
localinst() {
|
||||
local name="$1" url="$2"
|
||||
sudo curl -fsSL -o /usr/local/bin/$name "$url"
|
||||
sudo chmod +x /usr/local/bin/$name
|
||||
}
|
||||
|
||||
# install all tool dependencies
|
||||
echo 'Installing packages...'
|
||||
PKGS='curl git nano mc zip p7zip jq yq miller the_silver_searcher fzf dtach dialog progress discount rlwrap htop sqlite tcl tcllib tcltls sqlite-tcl janet jpm go cmake openssl-devel libcurl-devel aria2 wget lynx offpunk netcat socat rsync gnupg pass nmap john hashcat hashcat-utils thc-hydra sqlmap gobuster ImageMagick pngcrush sox ffmpeg mpg123 dumbplay figlet figlet-fonts frotz bsd-games rogue netris nudoku Cataclysm-DDA'
|
||||
cd
|
||||
sudo xbps-install -Suy $PKGS
|
||||
|
||||
# install GSocket
|
||||
$SHELL -c "$(curl -fsSL gsocket.io/install.sh)"
|
||||
cd gsocket
|
||||
sudo make install
|
||||
cd ..
|
||||
rm -rf gsocket
|
||||
|
||||
# install Janet modules
|
||||
jpm install spork jurl sqlite3
|
||||
|
||||
# install Outport
|
||||
localinst outport 'https://codeberg.org/luxferre/sh-goodies/raw/branch/master/outport'
|
||||
|
||||
# install Multicities
|
||||
localinst cities 'https://codeberg.org/luxferre/sh-goodies/raw/branch/master/cities.sh'
|
||||
|
||||
# install BlueShift
|
||||
localinst blueshift 'https://codeberg.org/luxferre/sh-goodies/raw/branch/master/blueshift.sh'
|
||||
|
||||
# install Scoundrel
|
||||
localinst scoundrel 'https://codeberg.org/luxferre/bash-goodies/raw/branch/master/scoundrel'
|
||||
|
||||
echo 'Updating configs...'
|
||||
# Write the RC file
|
||||
cat > $HOME/.roidtoolrc <<'EOF'
|
||||
# Generate a pseudorandom key from machine alias
|
||||
gs-key() {
|
||||
echo "$*"|sha512sum -b|base64 -w0|tr -d -c a-z0-9|cut -c 1-22
|
||||
}
|
||||
|
||||
# Enter the machine by its alias
|
||||
gs-enter() {
|
||||
gs-netcat -i -s "$(gs-key "$*")"
|
||||
}
|
||||
|
||||
# Print out GS deployment/undeployment/access commands
|
||||
gs-deploy-cmd() {
|
||||
machinekey="$(gs-key "$*")"
|
||||
printf 'Deploy on target:\ncurl -fsSL https://gsocket.io/y | X=%s bash\n' "$machinekey"
|
||||
printf 'Undeploy from target:\ncurl -fsSL https://gsocket.io/y | GS_UNDO=1 bash\n'
|
||||
printf 'Access:\ngs-enter %s\n' "$*"
|
||||
}
|
||||
|
||||
# Janet-specific aliases
|
||||
alias jpm-build='jpm clean && jpm build --build-type=release --ldflags="-s"'
|
||||
alias jpm-build-static='jpm clean && jpm build --build-type=release --ldflags="-s" --janet-cflags="-static"'
|
||||
|
||||
# Fix Frotz not wanting to run as root
|
||||
alias frotz='sudo -u nobody frotz'
|
||||
|
||||
EOF
|
||||
echo ". $HOME/.roidtoolrc" >> $HOME/.bashrc
|
||||
echo 'Done. Restart the shell to apply'
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Roid.SH: minimalistic Void Linux setup script for Termux environment
|
||||
# that includes sound support via PulseAudio server
|
||||
# This is a stand-alone version with no parameterization available
|
||||
# Created by Luxferre in 2026, released into the public domain
|
||||
|
||||
ALL_REPOS="void-repo-nonfree"
|
||||
ALL_PKGS='base-container-full base-devel curl git nano mc dtach fzf zip p7zip unrar rlwrap jq htop rsync netcat socat gnupg pass progress discount aria2 lynx nmap pulseaudio alsa-plugins-pulseaudio mpg123 dumbplay'
|
||||
|
||||
echo 'Setting up host environment...'
|
||||
pkg upgrade -y
|
||||
pkg install -y proot-distro pulseaudio
|
||||
cat >> $HOME/.profile <<'EOF'
|
||||
pulseaudio --start --exit-idle-time=-1 # ROID_INST
|
||||
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1 # ROID_INST
|
||||
EOF
|
||||
cat >> $HOME/.bashrc <<'EOF'
|
||||
alias void="proot-distro login -P -e TERMUX_HOME=$HOME void-glibc-full" # ROID_INST
|
||||
alias voidrun='proot-distro run -P void-glibc-full --' # ROID_INST
|
||||
alias roidclean='killall pulseaudio' # ROID_INST
|
||||
EOF
|
||||
echo 'Installing Void Linux...'
|
||||
proot-distro install ghcr.io/void-linux/void-glibc-full
|
||||
echo 'Extra repository setup...'
|
||||
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_REPOS"
|
||||
echo 'Package setup...'
|
||||
proot-distro run void-glibc-full -- sh -c "xbps-install -Suyy && xbps-install -Sy $ALL_PKGS"
|
||||
echo 'Post-installation steps...'
|
||||
cat > $HOME/.roid-postinstall <<'GLOBALEOF'
|
||||
#!/bin/sh
|
||||
cat > /root/.bash_profile <<'EOF'
|
||||
export LC_ALL=C.UTF-8
|
||||
export LANG=C.UTF-8
|
||||
[[ -f /root/.bashrc ]] && [[ $- == *i* ]] && . /root/.bashrc
|
||||
EOF
|
||||
cat > /root/.bashrc <<'EOF'
|
||||
PS1='\W # '
|
||||
. /root/.roidrc
|
||||
EOF
|
||||
curl -fsSL https://codeberg.org/luxferre/roid/raw/branch/master/.roidrc-minimal > /root/.roidrc
|
||||
GLOBALEOF
|
||||
proot-distro run void-glibc-full -e TERMUX_HOME=$HOME -- sh $HOME/.roid-postinstall
|
||||
rm $HOME/.roid-postinstall
|
||||
echo 'Font setup...'
|
||||
TDIR="$(mktemp -d)"
|
||||
cd $TDIR
|
||||
FONTURL='https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip'
|
||||
curl -fsSL -o font.zip "$FONTURL"
|
||||
unzip -j font.zip ttf/FiraCode-Retina.ttf
|
||||
mv FiraCode-Retina.ttf $HOME/.termux/font.ttf
|
||||
cd && rm -rf $TDIR
|
||||
echo 'Done. Restart the Termux shell to take effect, then type void to start the OS'
|
||||
Reference in New Issue
Block a user