Graphical Environment on Termux

In this article, we are going to see how we can install Graphical Environment on termux. Then, you may ask yourself what is the graphical environment.

A graphics environment file contains commands that specify exactly how a graph is produced.

Advertisement

Termux provides support for programs that use X Window System. However, there no hardware acceleration for rendering, and the user will have to install a third-party application to view the graphical output. Before we continue let us see some definitions of keywords that we are going to use in this article.

What is X Window System?

The X Window System is a network-transparent window system that runs on a wide range of computing and graphics machines. X Window System servers run on computers with bitmap displays. The X server distributes user input to and accepts output requests from several client programs through a variety of different inter-process communication channels. Also, the most common case is for the client on networking and remote applications.

graphical environment on termux

What is a VNC viewer?

VNC® Viewer turns your phone into a remote desktop, giving you instant access to your Mac, Windows, and Linux computers. You can view your computer’s desktop remotely, and control its mouse and keyboard as though you were sitting down in front of it.

vnc viewer

Who can run Graphical Environment on Termux?

Then, as you know already keywords, let us see who can run Graphical Environment on termux. Termux is a free app that everyone who has an android device can get from the play store.

in the previous article, we discussed Best android apps Termux learner in 2021 from play store. You can see in that article the best apps that will teach you termux command and discover the best apps for hacking.

First, if you don’t have termux download it from the play store. last it’s applicable only to Termux installations running on Android 7.0 or higher

Enabling the X11 Repository – Graphical Environment on Termux

To use X11-enabled programs, please, make sure that at least one of the following programs is installed. In this article we are going to use VNC Viewer:

  • VNC Viewer – the best choice for interacting with the graphical environment. Requires a running VNC server.
  • XServer XSDL – this one may be unstable but it provides a standalone Xorg server so you don’t have to set up VNC.

Also, know that X11 packages are available in a separate APT repository. You can enable it by running the following command:

pkg install x11-repo

this command will automatically add appropriate sources.list file and PGP key.

You may also like to know the differences between termux and linux

Setting up VNC Viewer – Graphical Environment on Termux

Server

As we said we are going to use VNC Viewer in this post then, let us configure it for the graphical output.

  • Install tigervnc in termux.
installation of tigervnc on termux
pkg install tigervnc
  • After, installation you can now execute tigervnc with this command :
vncserver -localhost

At first time, you will be prompted for setting up passwords. Then, set your password must be 6 or 8 characters and  passwords are not visible when you are typing them.

Then, after you finish to set up your password, if everything is okay you will see this:

execution of tigervnc on ternux

It means that X (vnc) server is available on display ‘localhost:2’. Finally, to make programs do graphical output to the display ‘localhost:1’, set environment variable like shown here (yes, without specifying ‘localhost’):

vncserver

Check if the VncServer is running or not. if it’s not running go back on previous step.

check if vncserver is running

Client

Now it’s time to install VNC Viewer from the playstore. Then, if you have finished to install VNC Viewer, open it and start configuration.

vnc viewer

Now in the Address field Type localhost:1, Remember next time you run the server you need to change the localhost to 2 or 3. or You can type vncserver -list and you can see your localhost number there.

setup new connexion

Next, press create and it will create the connexion with your termux. Then, In the next step click on the green button and last click on the name of your connection.

open connexion

Then, press ok to allow connection.

allow connection

Now the time of puting your authenfication is there. put the password you set in the previous step.

authentification

You may also like Best professional hacking tools on termux for ethical hacker

Window Managers

Then, as we have configured the connection let us see how to manage the window. Also, the Simplest way to get a working graphical environment is to install Fluxbox:

fluxbox
$ pkg install fluxbox

Then, if you want you can set fluxbox to started automatically on VNC server startup. To do this, edit file ~/.vnc/xstartup.

Desktop environment (XFCE)

xfce on termux

Also, It is possible to set up a full-blown desktop environment in Termux. Only XFCE is supported, porting of other environments is not being planned. Now let us see how to install XFCE.

pkg install xfce4
VNC server startup configuration (~/.vnc/xstartup)
#!/data/data/com.termux/files/usr/bin/sh
xfce4-session & 

Conclusion

Hope now you are having Graphical Environment on your termux, if there is an issue during installation let us know to help you solve that issue. thanks

6 Responses

  1. Edeh Daniel says:

    Good

  1. 7 April 2021

    […] You may also like to know how to install graphical environment in Termux […]

  2. 8 April 2021

    […] You may like also to know how to install graphical environment on termux […]

  3. 8 June 2021

    […] Then, after we have done to install Kali Linux or KALIMUX in termux. Also, we need to download the VNC viewer from the play store. and for more details read Graphical Environment on Termux […]

  4. 3 July 2021

    […] Graphical Environment on termux […]

  5. 17 September 2021

    […] Graphical Environment on termux […]

Leave a Reply

Your email address will not be published. Required fields are marked *