How To install Ubuntu Xfce Desktop On Android

Ubuntu Xfce Desktop On Android

Hello guys welcome back, in today's article I'm gonna show you how to install Ubuntu on your Android phone and setup the desktop and a functional browser, though I have made a tutorial on this previously but since the update of ubuntu on proot-distro, the devs decided to hold gvfs-daemons From the installation script, so in this tutorial we're gonna correct that and install Ubuntu and it's Desktop environment without the gvfs-daemons error.

NOTE : you need to watch the video at the end of this article to fully understand this article and how to use it 

prerequisites : 

Termux 

vnc viewer 

How To install Ubuntu 

after installing the Termux application on your Android phone, we launch the app and first we upgrade the app repositories, to do that type the command

  • apt update && apt upgrade

as we've talked about in our previous blog tutorials, one of the best ways to install Linux distros on Termux is by using proot-distro, to install proot-distro type the command:

  • apt install proot-distro
Before proceeding with the installation of Ubuntu we need to manually configure the installation script of Ubuntu and release gvfs-daemons, to do that use the commands below
  • cd $PREFIX/etc/proot-distro/
Now we re-write the ubuntu installation script to do that type the command nano ubuntu.sh  and then you erase gvfs-daemons From the hold comments in the installation script. Just as shown in the image below.
Removing Hold gvfs-daemons From the installation script
Ubuntu installation script 

Write out the script by using Ctrl + o to save and Ctrl + x to exit

 now you install Ubuntu by typing the command :

  • proot-distro install ubuntu

once the installation is complete we login with the command:

  • proot-distro login ubuntu

after that we upgrade Ubuntu repositories with the command

  • apt update

now we proceed to the desktop Install :

  copy the commands below and paste them in your terminal :

  • apt update 
  • apt install udisks2
  • rm /var/lib/dpkg/info/udisks2.postinst
  • echo >> /var/lib/dpkg/info/udisks2.postinst
  • apt-mark hold udisks2
  • apt install xfce4 xfce4-terminal xfce4-whiskermenu-plugin
  • apt install Firefox gedit vlc dbus-x11 tigervnc-standalone-server

After the Ubuntu Desktop has been completely installed the next thing you're going to do is open a new terminal session and in the new "terminal 2" we're going to install vncserver and some other packages on Termux itself, the reason for doing this is because we want to connect to ubuntu Using a TCP protocol to avoid unnecessary disconnection while using Ubuntu, so on your termux terminal 2, type the command :

  • pkg update

then we install the x11-repo using the command:

  • pkg install x11-repo

the next thing you're going to do is install vncserver using the command

  • pkg install tigervnc xorg-xhost

you're going to be required to create a new password, create any 6ix digits password of your choice. After that we're going to launch vncserver using the command:

  • vncserver -geometry 1600x720 -listen tcp :1

then we disable access control using the command:

  • DISPLAY=:1 xhost +

After that switch back to your Ubuntu session "session 1" and connect ubuntu to the TCP server using the command:

  • DISPLAY=:1 xfce4-session

now you can launch your vnc viewer application and connect using the localhost :1

Now that you're logged in to your desktop, you'd realize that the default browser isn't working so we'd have to fix that by installing Mozilla Firefox browser On the Desktop.

How To install Mozilla Firefox On Ubuntu

The first thing we're going to do is make sure our repositories are up to date, to do that type the command
  • apt update
After that we're going to uninstall the old Firefox from our Ubuntu to do that, launch your terminal and type the command
  • apt autoremove firefox
Now we're going to make sure out Gnupg is up to date or installed, to do that type the command
  • apt Install gnupg
Now we're going to add Debian repository to our ubuntu sources repo, to do that, type or copy the command
  • echo "deb http://ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list
now to update the newly added Debian repository we type the command sudo apt update, and now we should get an error that says "the following signatures couldn't be verified because the public key is not available" .

To fix that copy or type the commands below in your terminal 

  1. apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
  2. apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
  3. apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 605C66F00D6C9793
after that you can now update your repository again by using the command
  • apt update
Now we're going to install mozilla Firefox again by using the command
  • apt Install firefox-esr
And this should fix the Ubuntu browser issue and now you can go ahead and customize your terminal to your satisfaction. 

Ubuntu 22.04 Default Wallpaper

Ubuntu Jammy (jellyfish) Wallpaper
That is going to be all for this tutorial, if you have any questions you can let me know in the comments section below. Bye for now and stay safe.

Watch the video here 



2 Comments

  1. How to stop and start the vnc server .

    ReplyDelete
  2. Starting: $ vncserver -geometry 1600x700 -listen tcp :1
    $ DISPLAY=:1 xhost +

    Stopping: $ vncserver -geometry 1600x700 -listen tcp :1 -kill :1

    ReplyDelete
Previous Post Next Post