This section describes how to build the minimum desktop environment for using Android Studio published earlier. There is no Japanese input, but I think it can be built in the shortest time instead.
→ Described the setting procedure for Japanese input in the desktop environment. I want to use the Ubuntu desktop environment on Android for the time being (Termux version-Japanese input in the desktop environment)
Installing a desktop environment (LXDE or Xfce) can take several hours. I think it is better to secure time before implementing.
Install Termux and XSDL on the Play Store. Termux is an environment in which a type of OS called Linux runs. Since Android is also an OS, it is a bit complicated environment where the OS runs on the OS. XSDL is the application responsible for the desktop screen. Termux only supports up to the command line, so get XSDL to support your desktop screen.
Start Termux and update the package (like a warehouse of Linux applications) with the following command:
#Package update
pkg upgrade
pkg is a wrapper for the apt command. The apt command refers to a program for manipulating packages. Termux basically uses pkg to install the application.
Then run termux-setup-storage to allow files to be exchanged between Termux and Android.
#Make files handled by Android available from Termux
termux-setup-storage
A dialog will appear asking if Termux can access it, so select OK.
Describes the correspondence between Termux and Android directories. Please refer to the delivery of files.
Termux | Android |
---|---|
/data/data/com.termux/files/home/storage/shared/ | (Main body side)/sdcard/ |
/data/data/com.termux/files/home/storage/downloads/ | (Main body side)/sdcard/Download/ |
/data/data/com.termux/files/home/storage/external-1/ | (SD Card side)/storage/(SD Card name)/Android/data/com.termux/files/ |
/storage/(SD Card name)/ | (SD Card side)/storage/(SD Card name)/ |
Next, build the Ubuntu environment on Termux. Ubuntu is also a type of OS. It is a form of building Linux called Ubuntu on top of Linux called Termux, and putting Linux on top of Linux. It's not the official website, but it does show you how to install Ubuntu. This time I will use this method. At the following site, execute the command in the place where Installation steps are written.
https://github.com/MFDGaming/ubuntu-in-termux
Describes the correspondence between Ubuntu and Android directories. Please refer to the delivery of files.
Ubuntu | Android |
---|---|
/sdcard/ | (Main body side)/sdcard/ |
/storage/(SD Card name)/ | (SD Card side)/storage/(SD Card name)/ |
The official website below describes how to install Ubuntu, but I didn't know how to share files with Android such as SD Card, so I won't use it this time.
https://wiki.termux.com/wiki/Ubuntu
As described in 10.Now just start ubuntu: in Installation steps of the above site, the command to start Ubuntu from Termux is described.
cd
cd ubuntu-in-termu
./startubuntu.sh
From here, it will be the operation on Ubuntu.
First, update the package with apt.
apt update
apt upgrade -y
Next, install the desktop environment. As far as I checked, I can use two types, LXDE and Xfce. It seems that LXDE is lighter, but Xfce looks better and is not as light as LXDE, but it is light enough. I think you can choose here as you like.
It will take several hours here, depending on the speed of the network and smartphone. The settings described below will appear in the middle (although a little later) rather than at the beginning or end. The recommended method is to start the installation, leave it for a few hours, configure it, and then leave it for a few hours again.
· LXDE installation
apt install -y lxde
#Since there is a question about the area on the way, select it by operating 6 → Enter → 79 → Enter. The meaning of the numbers is 6:Asis、79:It will be Tokyo.
#Next, I have a keyboard question, but select it by operating 31 → Enter → 1 → Enter. The meaning of the numbers is 31:America(US)、1:Engrish(US)Will be. If you like software keyboards, this is Hacker'Since I use the s Keyboard, I think this choice is correct.
#You will be asked to choose the desktop managers gdm3 and lightgdm, but if you are not particular about it, you should choose the light lightgdm.
・ Installation of XFCE
apt install -y xfce4
Launch XSDL and wait for a while. At the end, a screen displaying a character string will appear, so make a note of the following.
The following string should appear on the second line from the top. Make a note of the DISPLAY port number.
export DISPLAY = (some IP address): (port number)
The following string should appear on the third line from the top. Make a note of the PULSE_SERVER port number as well.
export PULSE_SERVER = (IP address of something): (port number)
You don't have to write down the IP address. Go back to Ubuntu on Termux again. In order to connect to XSDL, write down the port number and local IP address you wrote down earlier in the configuration file.
#If you don't have the text editor vim installed, install it
apt install -y vim
# .Describe the XDSL connection settings in bashrc
cd
vim .bashrc
Also at the bottom of .bashrc, write the following:
export DISPLAY =: (the DISPLAY port number you noted earlier) export PULSE_SERVER = 127.0.0.1: (PULSE_SERVER port number you noted earlier)
If you don't know how to use vim, just remember the following.
Keyboard keys | role |
---|---|
i | Enter input mode from command mode |
ESC | Exit input mode and return to command mode |
:wq | Save and exit. Operate in command mode. |
Only this time, manually execute the settings described earlier. From the next time, it will be executed automatically, so the following operations will not be necessary.
source .bashrc
First, launch XSDL. Wait until the screen where the port number etc. appears. Then go back to Termux and run the following command on Ubuntu.
・ For LXDE
startlxde
・ For Xfce
startxfce4
Go back to XSDL and wait for a while and you should see the Ubuntu desktop environment up and running.
UserLAnd, which launches the desktop environment with the touch of a button, is easier around here.
Linux environment UserLAnd running on Android supports XServer XSDL
Recommended military art for Termux while commuting
Install Ubuntu on Android tablet
Recommended Posts