Installing GNOME 46 (Rawhide) on Fedora with Termux
In this extensive guide, we will walk through the process of setting up and installing GNOME 46 (currently available in Fedora Rawhide, Manjaro unstable, and Debian Experimental for arm64) on Termux. This tutorial assumes that you already have Termux installed on your Android device. If you haven’t yet, please download it from F-Droid or Google Play Store.
Before starting the installation procedure, make sure your Termux application has been granted external storage permissions. You can do so by updating and upgrading Termux as follows:
$ pkg update && pkg upgrade -y && pkg install termux-x11-nightly pulseaudio proot-distro -y && termux-setup-storage
Now follow these steps to configure and install GNOME 46 on Fedora within Termux:
- Install Termux X11. For universal APK support, visit Termux X11 Releases. Afterward, open Termux and execute the following commands:
- Configure PulseAudio settings for better sound performance:
- Choose a base distribution and install it. We recommend using Fedora since it provides easy access to newer software versions such as GNOME 46. To install Fedora, use the following commands:
- Sign into your newly created environment:
- Perform an initial package update and prepare the system for GNOME 46 installation:
- Address potential issues related to systemd and user sessions:
- Prepare a script to launch GNOME 46 automatically:
- Start GNOME 46:
$ nano $HOME/.termux/termux.properties
# Remove the '#' character at the beginning of the line below:
allow-external-apps = true
# Save and exit. Press 'Ctrl+X', followed by 'Y'.
$ nano $PREFIX/etc/pulse/default.pa
# Add the following lines under "[General]":
load-module module-sles-sink
# Exit and save changes using 'Ctrl+X' and 'Y'.
Next, adjust the idle timeout value for PulseAudio:
$ nano $PREFIX/etc/pulse/daemon.conf
# Set 'exit-idle-time' property to '-1':
exit-idle-time = -1
# Save and close the editor with 'Ctrl+X' and 'Y'.
# List all supported distributions:
pd list
# Proceed with Fedora installation:
pd install fedora
$ pd login fedora
# Update repository information and upgrade existing packages:
$ sudo dnf update -y
# Obtain dependencies required for the graphical session:
$ sudo dnf groupinstall -y "GNOME" --skip-broken
# Ensure D-Bus communication over X11 protocol works properly:
$ sudo dnf install -y dbus-x11
# Locate and remove all instances of *login1* files:
find /usr -type f -iname "*login1*" -exec rm -f {} \;
# Create a new directory for storing D-Bus runtime data:
sudo mkdir /run/dbus
$ nano ~/gnome.sh
#!/data/data/com.termux/files/home/gnome.sh
kill -9 $(pgrep -f "termux.x11") 2>/dev/null
pulseaudio --start
export XDG_RUNTIME_DIR=$TMPDIR
termux-x11 :0 >/dev/null &
sleep 3
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity
sleep 1
proot-distro login fedora --shared-tmp -- \
/bin/bash -c '\
export DISPLAY=:0 PULSE_SERVER=127.0.0.1 XDG_CURRENT_DESKTOP="GNOME";\
rm -rf /run/dbus/pid;\
dbus-daemon --system;\
dbus-launch gnome-shell --x11'
Make the script executable:
$ chmod +x ~/gnome.sh
$ ./gnome.sh
To end the GNOME 46 session, simply force quit the Termux app or hit ‘Ctrl+C’.