I have a headless build; which has no x11 server nor any desktop manager.

I would like to run some music applications; so I can use a small touch screen that I recently found; and I was wondering if there is a way to run an application from terminal, that launch a UI, without install the ton of packages required to run a X11 server.

My whole system run on 2 GB; I would like to use this configuration (board plus touchscreen) as controller for a midi keyboard; so I can have a stand alone synthesizer basically; and use the touchscreen to change banks, samples, midi instruments or parameters.

Not sure if this is even possible; I always ran applications via X11 on linux, but I thought that asking here may give me some ideas.

The final objective is to have the board to run connected to a midi keyboard as standalone; if I need to flash again the sd card that's fine; I can use a larger one, if there is a distribution that works for my case; otherwise I don't mind to geek out on the file system and make changes to make it happen; although I am not able to find much on the subject.


2 Answers 2


You don't need X11 or a desktop environment to have a user interface (UI). X11 is just one (widely used) option if you want a graphical user interface. The desktop environments for Linux usually build on X11, and provide many other functions, a window manager is just one of those.

If you have just one application in mind, a desktop environment is certainly overkill.

If you write your application yourself, you can just address the screen yourself. But it may be easier to just install the X Server without many of the fancy libraries, and just pass the commands to draw on the screen to the X Server, because that is the purpose of the X Server.

However, if you don't write your application yourself, you must install whatever the application needs. But there are also applications like aplay that can play a sound and don't need X11.

Regarding the size, 2GB should be enough for an X11 installation.

  • Thanks; I do write my applications, but in this case, I can't write my own audio applications, so I am going to rely to what I find online. I would favor GUI apps but due to the fact that I want to keep my distro lean, I thought that going for terminal based apps was OK; as long as I can actually drive those via GUI. I thought of python executing shell calls and use something like QT or Tkinter to get the UI going, but I was not sure about the requirements. I will look further into console apps;most of the apps I found, do have a very complex UI, which won't fit on my small 3.5 LCD
    – rataplan
    Jun 9, 2019 at 17:54

I run a minimal X11 desktop using the icewm window manager and xdm for display manager on Raspbian. Starting with Stretch Lite, I install the following packages:

apt-get install xserver-xorg xserver-xorg-core xserver-common xdm icewm xterm x11-apps \ 
        xfonts-base xfonts-100dpi xfonts-75dpi xfonts-scalable

Not sure how much space these require, but it's definitely a LOT less than any full-blown desktop environment. If you also want to use VNC with this, you can install tigervnc-standalone-server and use the configuration details described in How To Install and Configure efficient LAN-based VNC on raspbian

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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