[Android General] jenneh:
Hello Friends~!

Today I wanted to teach you how to remotely connect to your phone, or any android device, using Termux and a PC. This example assumes your android device is on the same wireless network as your pc. In order to remote into our device, we need to install a GUI within Termux. Two good options are the termux packages "fluxbox" or "xfce4".

METHOD 1: FLUXBOX

Fluxbox is a fast and light on resources "Windows Manager" GUI that takes up far less storage space than XFCE4 (266MB) But requires the use of TightVNC on our PC to connect to. (I couldn't get RDC to natively connect)

Spoiler content hidden.

WRITTEN GUIDE:

Run these commands in Termux:

pkg install x11-repo
pkg update -y
pkg install aterm fluxbox tigervnc -y
vncserver -localhost
vncserver -kill :1
vncserver
ifconfig

Take note of the ip address ifconfig gave us.

Spoiler content hidden.

Type in the ip address with the port number in TightVNC and then you will be asked for the password you set.

Spoiler content hidden.

When you connect, type in:

fluxbox&

Then you will have a full GUI environment!

WEBSITE:

Fluxbox

Officical site of the fluxbox windowmanager.

fluxbox.org

METHOD 2: XFCE4

XFCE4 is a "Desktop Environment" GUI, with it's own unique background and features, but takes up more storage space and takes longer to install (1270MB). This setup can be used in both TightVNC and Windows built in Remote Desktop Connection.

Spoiler content hidden.

WRITTEN GUIDE:

In Termux run these commands:

pkg install x11-repo
pkg update -y
pkg install xfce4 xfce4-goodies tigervnc xrdp -y

Then we need to run this code to be able to edit the rdp port:

nano ../usr/etc/xrdp/xrdp.ini

Scroll to the bottom and set to port 5901 (change the -1 to 5901) Now we need to press the ctrl key and type "o" and press enter to write out or save the changes and then ctrl + x to quit out of vim. ( ^ is CTRL )

Spoiler content hidden.

Now run:

xrdp
vncserver -xstartup ../usr/bin/startxfce4 -listen tcp :1
ifconfig

Take note of the ip address ifconfig gave us.

Spoiler content hidden.

Type in the ip address with the port number in TightVNC and then you will be asked for the password you set.

Spoiler content hidden.

If you want to use Windows RDC instead, just type your IP address without the port number.

Spoiler content hidden.

WEBSITE:

Xfce Desktop Environment

Xfce is a lightweight desktop environment for UNIX-like operating systems. It aims to be fast and low on system resources, while still being visually appealing and user friendly.

www.xfce.org

DOWNLOADS:

Termux Apk for Phone or Android Device - DIRECT DOWNLOAD LINK

TightVNC for Windows - DIRECT DOWNLOAD LINK

You can run the command "termux-setup-storage" and see that it sends the command to your phone in the background without showing the command was ran in the terminal, and it will ask you to grant permission. You can do so and you will have more control over your phone's remote session.

I have some theories on other ways to use these remote connections, outside of building linux environments, will post updates in the comments when we get there.

This guide is all thanks to @ze7zez for asking about this in the thread below, and then educating us on connecting to our devices in a different and much more storage efficient way :> They also shared how to connect VIA USB

HOW TO INSTALL LINUX ENVIRONMENTS ON YOUR PHONE AND REMOTE INTO THEM

View attachment 5889479