I am running the TermUX application on an Android 10 smartphone, and can type in it with my Logitech K480 keyboard. I want to run a window manager like fvwm (see fvwm.org).

I have found an article on the internet which seems to mention i can run VNC server and client or XSDL although the latter is unstable, but as far as I understand I can only do this if i have a separate computer running the server, and then my Android smartphone can run the client window manager from TermUX after changing the DISPLAY environment variable

Is this correct?

How can I run an X Server in TermUX and then simply run the window manager with the startx command like in Linux?


  • 2
    Termux is a terminal emulator. Original implementation of X Server runs on a Virtual Terminal (kernel console). Is your kernel built with VTs and Framebuffer Console (physical display) support? Most probably no. So you need an Android specific X Server (like the almost abandoned XServer XSDL app) or need to run the original X Server in headless mode which directs its output to a virtual display like VNC. You can then run a VNC client app on localhost (the Android device itself) or some other host on the network (like a PC) to receive the display and interact with the GUI environment. Feb 21 '21 at 14:42
  • 1
    Btw X Server programs are built for PCs. Most of them aren't very usable even on a 10-inch tablet screen. So X server running on a phone isn't of much practical use. That's what my experience is. I run Linux distros on Android devices but only with CLI controls. Feb 21 '21 at 14:48
  • 1
  • 1
    Termux officially supports the two methods I mentioned above to run X Server: github.com/termux/x11-packages#using-x11-on-termux. But if your device is rooted and want to try your luck with the existing framebuffer support, start from here: github.com/meefik/linuxdeploy/…. However FB isn't very likely to work with the standard Linux tools because its functionality is very limited or non-standard in many cases and Android relies on closed-source HALs provided by OEMs for most of its interaction with hardware components. Feb 21 '21 at 15:47
  • Afaik what OP is asking for is not possible, however the hacky solution @Irfan Latif mentioned is, and is also given in the termux wiki(wiki.termux.com/wiki/Graphical_Environment) Feb 22 '21 at 4:13

You can run either an x-server or a vnc-client on the same Android device you have installed termux on. You don't have to use another device for that.

Instructions are available here https://wiki.termux.com/wiki/Graphical_Environment

I suggest you use VNC instead of an x-server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.