Date: Tuesday, April 15, 2025 at 10:20:59 PM KST
This guide details the steps to set up the Quest 2 host environment and then install Ubuntu (expected to be 24.04 LTS) with the XFCE4 desktop environment inside Termux on a Meta Quest 2 headset. Access to the graphical desktop is achieved using a VNC client connecting over a Tailscale secure network. It includes instructions for Firefox ESR and Korean language support.
Disclaimer:
- Performance: Expect sluggish performance compared to a native PC setup. This runs via compatibility layers (
proot
) within Android. Firefox ESR, while stable, can still be demanding. - Usability: Interacting with a desktop UI in VR can be challenging. A Bluetooth keyboard and mouse connected to the Quest 2 are highly recommended.
- Third-Party Software: This guide involves SideQuest and, optionally, APKPure. Use third-party sources and sideloading responsibly and at your own risk. Getting Termux directly from F-Droid or GitHub is strongly recommended over using APKPure.
- Ubuntu Version: Using
proot-distro install ubuntu
typically installs the latest LTS version (24.04 as of this writing). Useproot-distro list
in Termux to confirm available aliases if needed.
These steps prepare your Quest 2 headset. You need a PC for SideQuest and ADB commands.
A1. Enable Developer Mode on Quest 2
- Register as a developer on the Meta Quest developer website: https://developer.oculus.com/
- Open the Meta Quest App on your phone connected to your headset.
- Go to Menu -> Devices -> Select your Headset -> Headset Settings -> Developer Mode.
- Toggle Developer Mode ON.
- Reboot your Quest 2 headset.
A2. Install SideQuest on PC
- Download and install SideQuest (Advanced Installer) on your Windows PC from the official site: https://sidequestvr.com/setup-howto
- Follow their setup instructions, which involve connecting your Quest 2 to your PC via USB cable.
- Inside the headset, Allow USB Debugging and trust the connected computer when prompted. SideQuest should show "Connected" status.
A3. Sideload APKPure via SideQuest
- WARNING: APKPure is an unofficial app source. Proceed with caution and understand the security risks. Download the latest APKPure APK file from their official website (e.g.,
apkpure.com
) onto your PC. - In SideQuest on your PC, look for an icon that looks like a box with a down arrow, usually labelled "Install APK file from folder".
- Click this icon, navigate to, and select the downloaded APKPure
.apk
file. - SideQuest will install the APKPure app onto your Quest 2.
A4. Install Apps via APKPure (on Quest 2)
- Put on your Quest 2 headset.
- Navigate to your App Library.
- In the top-right filter dropdown, select Unknown Sources.
- Launch the APKPure app.
- Inside APKPure, search for and install the following apps:
- Tailscale: (Needed for the secure network connection)
- Termux: (WARNING: Installing Termux this way is not recommended. Use the official F-Droid or GitHub release instead for verified builds: https://github.com/termux/termux-app#installation)
- Gboard - the Google Keyboard: (Needed for the ADB input method steps below).
A5. Configure via ADB
- Ensure your Quest 2 is still connected via USB to your PC, Developer Mode is ON, and USB Debugging is allowed for the PC.
- Ensure you have ADB (Android Debug Bridge) working on your PC (part of Android SDK Platform Tools).
- Verify ADB connection: Run
adb devices
. You should see your Quest 2 listed as 'device'. - Set Gboard as Default Input Method: This can improve keyboard input within Termux/VNC and is required for the next command.
# (Run on PC Command Prompt/PowerShell) adb shell ime enable com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME adb shell ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
- Explanation: Enables Gboard and sets it as the active default keyboard. This may allow easier IME switching (like for Korean input later using Ctrl+Space, if Gboard handles it).
- Apply Android 12 Phantom Process Fix: Helps prevent Android from aggressively killing background processes like Termux.
# (Run on PC Command Prompt/PowerShell) adb shell device_config put activity_manager max_phantom_processes 214181594
- Explanation: Sets the background process limit very high, effectively disabling the Android 12+ feature that could prematurely kill Termux.
Your Quest 2 host environment should now be prepared.
Now we proceed with setting up Termux itself and installing Ubuntu.
B1. Initial Termux Setup
- Open Termux on your Quest 2.
- Update Termux packages:
# (Termux) pkg update && pkg upgrade -y
- Install
proot-distro
:# (Termux) pkg install proot-distro -y
B2. Install Ubuntu
- Install the Ubuntu root filesystem using
proot-distro
. Usingubuntu
typically installs the latest LTS (currently 24.04).(This may take some time. If# (Termux) proot-distro install ubuntu
ubuntu
installs an unexpected version, useproot-distro list
to find the specific alias for 24.04, e.g.,ubuntu-24.04
orubuntu-noble
, then remove and reinstall using that alias).
B3. Ubuntu Initial Configuration
- Log into the Ubuntu environment:
# (Termux) proot-distro login ubuntu
- All subsequent commands are run inside Ubuntu unless noted.
- Update Ubuntu's package list:
# (Ubuntu) apt update
- Install essential utilities and
sudo
:# (Ubuntu) apt install -y sudo nano wget curl software-properties-common apt-utils dialog locales dbus-x11 gpg apt-transport-https ca-certificates
- Configure basic English locale:
# (Ubuntu) locale-gen en_US.UTF-8 update-locale LANG=en_US.UTF-8
B4. Install XFCE4 Desktop
- Install the XFCE4 core packages and extras:
# (Ubuntu) sudo apt update # Ensure lists are fresh before big install sudo apt install -y xfce4 xfce4-goodies xfce4-terminal
B5. Install Firefox ESR (Extended Support Release - PPA Method)
This method uses the Mozilla Team PPA to install the ESR version, which prioritizes stability.
- Add the Mozilla Team PPA: (
software-properties-common
was installed in B3).# (Ubuntu) sudo add-apt-repository ppa:mozillateam/ppa -y
- Update your package list:
# (Ubuntu) sudo apt update
- Install Firefox ESR:
(If this fails with "no installation candidate", the PPA may not support Ubuntu 24.04/arm64 yet for ESR. In that case, you might have to reconsider Firefox stable via the Mozilla Repo method detailed previously or try manual installation.)
# (Ubuntu) sudo apt install firefox-esr
- (Optional) Install ESR Language Packs: (Example for Korean)
# (Ubuntu) sudo apt install firefox-esr-l10n-ko
B6. Enable Korean Language Support
- Install Korean language packs:
# (Ubuntu) sudo apt install -y language-pack-ko language-pack-gnome-ko
- Install necessary fonts:
# (Ubuntu) sudo apt install -y fonts-noto-cjk fonts-nanum
- Install the Fcitx5 Input Method Engine (IME) and Hangul support:
# (Ubuntu) sudo apt install -y fcitx5 fcitx5-hangul fcitx5-config-qt # Or fcitx5-configtool
- Configure environment variables for IME. Edit
/etc/environment
:Add these lines:# (Ubuntu) sudo nano /etc/environment
Save and exit (Ctrl+X, Y, Enter). Changes apply on next login/session start.GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx
- (Optional) Set Default System Locale to Korean: Changes UI language.
# (Ubuntu) # sudo locale-gen ko_KR.UTF-8 # sudo update-locale LANG=ko_KR.UTF-8
- Using Korean Input: In the XFCE session, use the panel keyboard icon or shortcut (e.g., Ctrl+Space) to toggle input. Configure via
fcitx5-config-qt
orfcitx5-configtool
.
B7. Install TigerVNC Server
- Install the TigerVNC standalone server:
(Remember: Ignore the
# (Ubuntu) sudo apt install -y tigervnc-standalone-server tigervnc-common
setpriv: setresgid failed
error during install)
B8. Configure VNC Server
- Set your VNC password (as root or your user
ikko
if created and granted sudo):(Run this as the user who will start the vncserver)# (Ubuntu) vncpasswd
- Create the VNC configuration directory for that user:
# (Ubuntu - run as the user who will start vncserver, e.g., root or ikko) mkdir -p ~/.vnc
- Create and edit the VNC startup script (
~/.vnc/xstartup
):# (Ubuntu - run as the user who will start vncserver) nano ~/.vnc/xstartup
- Paste the following content (using
dbus-launch
):#!/bin/bash unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources dbus-launch --exit-with-session startxfce4
- Save and exit (Ctrl+X, Y, Enter).
- Make the script executable:
(Troubleshooting Note: If VNC server exits early, ensure this script uses
# (Ubuntu - run as the user who will start vncserver) chmod +x ~/.vnc/xstartup
dbus-launch...
and has execute permissions for the correct user)
B9. Setup Tailscale & Find IP
- Ensure Tailscale is installed, logged in, and active on both your Windows PC and your Quest 2 (Android app).
- Find the Tailscale IP address of your Quest 2 (e.g.,
100.x.y.z
). Use the Tailscale app on Quest,tailscale status
on Windows, or the Admin Console.
B10. Start VNC Server for Tailscale Access
- Log into your Ubuntu environment on the Quest 2 (as the user who configured
~/.vnc/xstartup
, e.g.,root
orikko
). - Kill any old VNC server instance for display
:1
:# (Ubuntu) vncserver -kill :1
- Start the VNC server using display
:1
(port 5901) and crucial flags:# (Ubuntu) vncserver :1 -localhost no -geometry 1280x720 -depth 24
-localhost no
: Essential for Tailscale access.
B11. Connect from Windows VNC Client via Tailscale
- Open your VNC client software on Windows 11.
- Enter the Quest 2's Tailscale IP and port (
5901
for display:1
):100.x.y.z:5901
(Use actual IP). - Connect and enter the VNC password set in Step B8.
(Troubleshooting Note: If connection is refused, double-check the server is running inside Ubuntu and the
-localhost no
flag was used)
B12. Stopping the VNC Server
- Stop the VNC server from within the Ubuntu environment:
# (Ubuntu) vncserver -kill :1
- You can then
exit
Ubuntu and Termux/SSH.
B13. Recommended Windows VNC Clients (Open Source)
- TigerVNC Viewer: Solid, performant, matches server. https://tigervnc.org/
- UltraVNC: Feature-rich (file transfer), Windows-focused. https://uvnc.com/
- mRemoteNG: Excellent multi-protocol manager (VNC, RDP, SSH). https://mremoteng.org/
This method uses the Termux-X11 app (acting as an X server on Android) to display the XFCE desktop directly on the Quest 2 screen without needing a separate VNC client app. Often provides better performance than VNC.
C1: Install Termux-X11 Components
- In Termux (Host Environment): Install the X11 repo and companion package.
# (Termux) pkg install x11-repo -y pkg install termux-x11-nightly -y
- On Quest 2 (Android): Download and install the Termux:X11 Android app APK from the official GitHub releases page: https://github.com/termux/termux-x11/releases. (Requires sideloading via SideQuest or similar).
C2: Ensure Ubuntu Prerequisites
The necessary dbus-x11
package should already be installed as part of the XFCE setup.
C3: Launch the XFCE Session
- Start the Termux:X11 Android app on your Quest 2. It will likely show a black screen initially and may display a notification indicating the display number (usually
:0
). - Open Termux and log into your Ubuntu proot environment: Use the flags recommended for Termux-X11 compatibility.
# (Termux) proot-distro login ubuntu --user root --shared-tmp --no-sysvipc
(Adjust --user root if you prefer to log in as a different user like ikko, ensuring that user exists)
- Inside the Ubuntu session, set the DISPLAY variable and launch XFCE:
# (Ubuntu - run as the logged-in user) export DISPLAY=:0 # Use the display number from Termux:X11 notification if different dbus-launch --exit-with-session xfce4-session
- Switch focus back to the Termux:X11 app window on your Quest 2. The XFCE desktop should load.
C4: Stop the Session
You can usually stop the session by:
- Logging out from the XFCE menu inside the Termux-X11 window.
- Closing the Termux:X11 app.
- Killing the
xfce4-session
process from the Termux/Ubuntu terminal.
This method runs graphical applications inside Ubuntu but displays their windows on an X server running on a separate computer (Windows/macOS/Linux) connected via SSH. Good for running individual applications remotely, less ideal for a full desktop session due to potential slowness.
D1: Install SSH Server & Xauth (Inside Ubuntu)
If not already installed:
# (Ubuntu)
sudo apt update
sudo apt install -y openssh-server xauth
D2: Configure SSH Server (Inside Ubuntu)
- Edit the SSH daemon configuration:
# (Ubuntu) sudo nano /etc/ssh/sshd_config
- Ensure the following line exists and is set to
yes
(uncomment if needed):X11Forwarding yes
- Save and exit (
Ctrl+X
,Y
,Enter
). - Restart the SSH service:
# (Ubuntu) sudo systemctl restart sshd # Or if systemctl is problematic in proot: # sudo service ssh restart
D3: Prepare Client PC
Ensure you have an X server application installed and running on the PC you will connect from:
Linux: Usually built-in.
macOS: Install XQuartz.
Windows: Install and run VcXsrv or Xming.
D4: Connect via SSH with X11 Forwarding
Open a terminal on your PC and connect to your Quest 2 (using its local network IP or Tailscale IP) using the -X
flag:
# (On PC Terminal)
ssh -X your_user@<Quest_IP_Address>
(Replace your_user with your username inside Ubuntu, e.g., ikko or root, and <Quest_IP_Address>).
D5: Launch Graphical Applications
Once connected via SSH, simply run graphical commands from the terminal. Their windows should appear on your PC's desktop via the X server.
# (SSH Session connected to Ubuntu)
xfce4-terminal &
firefox-esr &
mousepad &
(Running startxfce4 for the full desktop via SSH -X is possible but often slow and may have rendering issues).
The packages required for all three methods (TigerVNC Server, Termux-X11 components in Termux, OpenSSH Server/Xauth in Ubuntu) can be installed simultaneously without conflicting.
You can choose which method to use at any time:
- Start
vncserver
to enable VNC connections. - Start the Termux-X11 app and launch the session via
dbus-launch
for local display. - Connect via
ssh -X
to use X11 forwarding to your PC.
While technically possible to run VNC (on :1
) and Termux-X11 (on :0
) concurrently, it's usually less confusing to use one primary graphical access method at a time.
This document provides the complete walkthrough focusing on Firefox ESR and incorporating the requested host setup steps. Remember the cautions about unofficial software sources and potential performance limits. Good luck!