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.
UserLAnd seems to be the easiest way to build an Ubuntu environment on Android. You can do it with Termux, but UserLAnd is less hassle. Instead, it's slower than Termux. I think you should choose which is better depending on the speed and taste of your smartphone.
Installing a desktop environment (LXDE or Xfce) can take several hours. I think it is better to secure time before implementing.
Install UserLAnd and XSDL on the Play Store. UserLAnd is an application that makes it easy to build Linux environments such as Debian and Ubuntu. XSDL is the application responsible for the desktop screen. UserLAnd only supports up to the command line, so get XSDL to support your desktop screen.
Launch UserLAnd and tap the item labeled Ubuntu. Enter your user ID and password and tap CONTINUE. You will be prompted to select SSH, VNC, XSDL as the connection type, select SSH and tap CONTINUE.
It depends on the environment, but I think you will have to wait an hour.
From here, it will be the operation on Ubuntu.
First, use apt to update the package (like a warehouse of Linux applications).
sudo apt update
sudo 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.
· LXDE installation
sudo apt install -y lxde
・ Installation of XFCE
sudo 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 UserLAnd's Ubuntu 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
sudo apt install -y vim
#Describe the XDSL connection settings in startXDSL
vim /support/startXSDLServerSteo2.sh
Correct the 4th, 8th, and 16th lines.
#Around the 4th line. Replace the value of 4721 with the DISPLAY port number you wrote down.
DISPLAY=:4721
↓ After rewriting
DISPLAY=:(The DISPLAY port number you wrote down earlier)
#Around the 8th line. PULSE with a note of the value of 4721_Rewrite to the port number of SERVER.
PULSE_SERVER=localhost:4721
↓ After rewriting
PULSE_SERVER=localhost:(PULSE that I wrote down earlier_SERVER port number)
#Around the 16th line./usr/bin/Rewrite the value of twm to exec startlxde or exec startyxfce4. If you do not add exec, it will not work, so please add it.
echo '/usr/bin/twm' > /home/$INITIAL_USERNAME/.xinitrc
↓ After rewriting
#When using LXDE
echo 'exec startlxde' > /home/$INITIAL_USERNAME/.xinitrc
#When using Xfce
echo 'exec startxfce4' > /home/$INITIAL_USERNAME/.xinitrc
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. |
Go back to UserLAnd, press and hold Ubuntu and select Stop App to exit. (If you don't want to exit, press and hold Ubuntu under Sessions and select Stop Session.) Press and hold Ubuntu again, select App Info and select XSDL. Press Apps below and then Ubuntu to boot. After a while, the Ubuntu desktop environment will start up.
In the case of UserLAnd, it will even launch XSDL, so there is no need to manually launch XSDL.
https://www.hiroom2.com/2018/05/06/ubuntu-1804-xfce-ja/
Recommended Posts