Skip to main content

Post-Installation Optimization

Your desktop environment is running. Now configure it for daily use -- install a browser, set up shared storage between Android and Linux, create shortcuts, and tune performance so everything feels responsive on mobile hardware.

Install a Web Browserโ€‹

A desktop without a browser is not very useful. Firefox ESR is the recommended choice for ADL because it is well-tested on ARM processors, runs reliably under proot, and receives extended security updates without the frequent breaking changes that come with the rapid-release version.

Log into Ubuntu and install Firefox ESR:

$apt update && apt install firefox-esr -y
Expected Result

The download is approximately 60-80MB. After installation completes, you can launch Firefox from the Applications menu under "Web Browser" or by running firefox-esr from a terminal.

Why ESR instead of regular Firefox?

Firefox ESR (Extended Support Release) receives security patches for about a year per major version, but avoids the feature churn of the standard release cycle. This matters on ADL for two reasons:

  1. Stability -- new Firefox features sometimes introduce regressions on ARM or within proot environments. ESR gives the community time to catch and report these before you encounter them.
  2. Lower resource usage -- ESR tends to carry less experimental code, which translates to modestly lower memory consumption on devices where every megabyte counts.

If you specifically want the latest Firefox features, you can install the standard version with apt install firefox -y instead, but expect occasional rough edges.

๐Ÿ”งTroubleshooting
Firefox crashes immediately on launch or shows a black window
This is usually a shared-memory issue under proot. Try launching with: firefox-esr --no-remote 2>/dev/null &. If that still fails, ensure your Termux:X11 session is running and DISPLAY=:0 is set in your environment.
"Unable to locate package firefox-esr"
Run apt update first to refresh package lists. If the problem persists, check that your Ubuntu installation has the standard repositories enabled by running cat /etc/apt/sources.list.

Configure the File Managerโ€‹

XFCE ships with Thunar, a lightweight file manager that is already installed. A few configuration changes make it more useful for working with shared Android storage.

Open Thunar from the Applications menu or the panel, then:

  1. Show hidden files -- Go to View > Show Hidden Files (or press Ctrl+H). Many configuration files and the ~/storage symlinks you will set up later are hidden by default.
  2. Enable the side pane -- Go to View > Side Pane and select Shortcuts. This gives you quick access to bookmarked directories.
  3. Add bookmarks -- Once shared storage is configured (see below), drag important directories like ~/storage/shared into the side pane to bookmark them.
โœ…๐Ÿ’ก Tip

You can add custom actions to Thunar for tasks like opening a terminal in the current directory. Go to Edit > Configure custom actions and add an entry with the command xfce4-terminal --working-directory=%f.

Set Default Applicationsโ€‹

XFCE allows you to set preferred applications for common tasks so that links, files, and terminal commands open in the right program.

Open the settings from the Applications menu: Settings > Preferred Applications, or run:

$xfce4-settings-manager

In the Preferred Applications dialog:

  • Web Browser -- Select Firefox ESR (or Firefox Web Browser). This ensures that clicking links in other applications opens Firefox.
  • File Manager -- Should already be set to Thunar. Change it here if you install an alternative like PCManFM.
  • Terminal Emulator -- Set to XFCE Terminal. If you later install a different terminal (such as xterm or lxterminal), update this setting.

You can also set defaults from the command line:

$xdg-settings set default-web-browser firefox-esr.desktop
โ„น๏ธNote

The xdg-settings command relies on .desktop files installed in /usr/share/applications/. If a program does not appear in the Preferred Applications dialog, check that its .desktop file exists in that directory.

Create Desktop Shortcutsโ€‹

XFCE uses .desktop files to represent application launchers. You can place these on the desktop for quick access to your most-used programs.

Create a Firefox shortcut on your desktop:

$cp /usr/share/applications/firefox-esr.desktop ~/Desktop/
$chmod +x ~/Desktop/firefox-esr.desktop
Expected Result

A Firefox icon should appear on your XFCE desktop. If it shows as a plain file instead, right-click it, go to Properties > Permissions, and ensure "Allow this file to run as a program" is checked. Then right-click the desktop and select "Arrange Desktop Icons" to refresh.

To create a custom shortcut from scratch, write a .desktop file manually:

custom-shortcut.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=My Script
Comment=Run my custom script
Exec=/root/my-script.sh
Icon=utilities-terminal
Terminal=false
Categories=Utility;

Save it to ~/Desktop/, then make it executable with chmod +x. The Icon field can reference any icon name from the current icon theme, or an absolute path to an image file.

โญBest Practice

Keep your custom .desktop files in /usr/share/applications/ as well as ~/Desktop/ so they also appear in the Applications menu. This avoids having shortcuts that only work from the desktop.

Configure the Time Zoneโ€‹

The default time zone in a fresh Ubuntu proot installation is usually UTC. Set it to your local time zone so that file timestamps, logs, and any scheduled tasks use the correct time.

Interactive method -- walks you through region and city selection:

$dpkg-reconfigure tzdata
Expected Result

A text-based menu appears where you select your geographic area (e.g., America, Europe, Asia) and then your city. After confirmation, the system reports the new local time.

Direct method -- set the time zone in a single command if you know the identifier:

$ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime && echo 'America/New_York' > /etc/timezone

Replace America/New_York with your actual time zone. You can list all available identifiers:

$timedatectl list-timezones
โ„น๏ธNote

Under proot, timedatectl set-timezone may not work because it requires systemd. The ln -sf method above works reliably in all proot environments.

Set Up Shared Storage Between Android and Linuxโ€‹

One of the most practical features of ADL is the ability to access your Android files from inside Linux and vice versa. This is handled through Termux's storage setup and bind mounts in your launch script.

Step 1: Grant Termux Storage Accessโ€‹

If you have not already done so, run this command in Termux (not inside Ubuntu):

$termux-setup-storage
Expected Result

Android shows a permission dialog asking to allow Termux to access files. After granting access, a ~/storage directory appears in your Termux home with symlinks to key Android directories.

The ~/storage directory contains these symlinks:

SymlinkPoints to
~/storage/sharedAndroid's internal shared storage (what you see in Files app)
~/storage/downloadsAndroid Downloads folder
~/storage/dcimCamera photos and videos
~/storage/musicMusic directory
~/storage/picturesPictures directory

Step 2: Make Android Storage Accessible Inside Ubuntuโ€‹

By default, proot-distro does not automatically share Termux's storage directory with Ubuntu. You need to add a bind mount to your launch script.

Edit your start script:

$nano ~/start-desktop.sh

Update the proot-distro login line to include a bind mount:

start-desktop.sh (updated)
#!/bin/bash

# Kill any existing X11 processes
termux-x11 -ac &
sleep 2

# Start Ubuntu with XFCE and shared storage
proot-distro login ubuntu --shared-tmp --bind /storage/emulated/0:/root/storage -- bash -c "export DISPLAY=:0; dbus-launch --exit-with-session startxfce4"

The --bind flag maps Android's internal storage to /root/storage inside Ubuntu. After restarting your desktop session, you can browse, edit, and save files directly to your Android storage from any Linux application.

โš ๏ธFile Permission Differences

Android and Linux handle file permissions differently. Files created from Linux inside the shared storage directory may not have the permissions Android apps expect. If an Android app cannot open a file you created from Linux, try copying it to the Android Downloads folder instead of editing it in place.

โญBest Practice

Bookmark /root/storage in Thunar's side pane for quick access. You can also create a symbolic link for convenience: ln -s /root/storage ~/android-files.

Performance Tweaksโ€‹

Mobile devices have limited CPU, GPU, and memory compared to a laptop or desktop. These tweaks reduce the load XFCE places on your hardware.

Disable the XFCE Compositorโ€‹

The compositor adds window shadows, transparency effects, and smooth transitions. On most Android devices running ADL, it consumes significant resources for minimal visual benefit.

Disable it through the GUI: Settings > Window Manager Tweaks > Compositor tab > uncheck "Enable display compositing".

Or disable it from the command line:

$xfconf-query -c xfwm4 -p /general/use_compositing -s false
๐ŸŸกPerformance โ€” Medium Impact

Disabling the compositor is the single most impactful performance improvement you can make. On mid-range devices, expect noticeably faster window dragging, smoother application launching, and reduced battery consumption. The trade-off is purely cosmetic -- you lose window shadows and transparency effects, but everything feels faster.

Reduce Animations and Visual Effectsโ€‹

Further reduce the visual overhead by simplifying window behavior:

$xfconf-query -c xfwm4 -p /general/box_move -s true

This switches window movement to outline mode, where only the window border is drawn while dragging instead of redrawing the entire window contents.

Disable window preview in the taskbar to save additional rendering:

$xfconf-query -c xfce4-panel -p /plugins/plugin-1/show-tooltips -s false

Configure Swap Spaceโ€‹

If your device has limited RAM (4GB or less), adding swap space can prevent applications from being killed when memory runs low. Under proot, traditional swap partitions are not available, but you can create a swap file if your kernel supports it.

$fallocate -l 1G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
โš ๏ธSwap May Not Work Under Proot

Many Android kernels do not allow user-space processes to configure swap. If the swapon command fails with "Operation not permitted", your kernel does not support this. The command is harmless to attempt -- it will simply fail without causing damage. If swap is not available, focus on the other memory-saving tips in this section instead.

To verify whether swap is active:

$free -h
Expected Result

If swap is working, you will see a "Swap" line with a non-zero total. If swap activation failed, the Swap line shows all zeros.

Adjust Panel Settingsโ€‹

The default XFCE panel configuration can be simplified to use fewer resources:

  1. Remove unused panel plugins -- Right-click the panel, select Panel > Panel Preferences, go to the Items tab, and remove plugins you do not use (such as weather, CPU monitor, or workspace switcher).
  2. Reduce panel size -- In Panel Preferences, decrease the row size from the default (usually 30-48 pixels) to 26-28 pixels. This frees up screen space, which is especially valuable on smaller phone screens.
  3. Use a single panel -- If XFCE created two panels (top and bottom), consider removing the bottom panel to reduce rendering overhead and gain screen real estate.
โœ…๐Ÿ’ก Tip

If you are using Samsung DeX with an external monitor, you have more screen space and processing headroom. You can afford to keep the compositor enabled and use larger panels in that scenario.

Post-Installation Checklistโ€‹

Use this checklist to confirm you have completed all major setup and optimization steps from the entire installation track:

ADL Installation Complete6/14 (43%)

Next Stepsโ€‹

Your ADL installation is fully configured and optimized. From here:

  • Samsung DeX users -- See the Samsung DeX Quick Setup for external display and keyboard configuration.
  • Device-specific tuning -- Check the device-specific guides if available for your hardware, as some phones and tablets benefit from additional optimizations.
  • If you ever need to remove ADL -- The Uninstall Guide walks through cleanly removing Ubuntu, XFCE, and all related packages without affecting the rest of your Android device.