Use GLava to embed audio visualization tools on the Linux desktop background (PPA installation and configuration guide)


Grava It is an OpenGL audio spectrum visualizer for Linux (X11). Using it, you can make the real-time audio visualizer look as if it is embedded in the desktop background.
Wallpaper Engine / Rainmeter may not be available on Linux, but there are other ways to get animated wallpapers on the Linux desktop. GLava is one of them, ideal for those who want a configurable audio visualizer for desktop background display. GLava displays the audio spectrum visualizer above the wallpaper, making it look as if you are using a live wallpaper, and has the added benefit that you can still place icons on the desktop because GLava can choose to allow its window to be clicked (while running GLava Automatic activation --desktop).
GLava uses PulseAudio to synchronize the desktop audio visualization program with any music source you are using, including audio players (such as Audacious or Rhythmbox, Spotify) and web browsers (such as Chrome or Firefox).

The desktop audio visualizer application supports most EWMH-compliant window managers. This includes Mutter (Gnome, Budgie), KWin (KDE), Unity, Openbox (LXDE), Xfwm (XFCE), Fluxbox, IceWM or Bspwm. Some of them have some minor known problems, while others (such as the Enlightenment) need to be tested. You can visit the following URL to see a list of supported window managers and their status This linkYou may also like: eDEX-UI: The fully functional Sci-Fi computer interface inspired by TRON LegacyGLava requires X11 (Xext, Xcomposite and Xrender) and PulseAudio, and it comes with 5 different visualization tools:

  • Bar: Kava-style vertical bar visualizer
  • Radial: Similar to a bar chart, except that the bar chart is drawn around a circle
  • graph: draw a vertical solid line graph of fft output data
  • wave: Draw the original left audio wave received from PulseAudio
  • circle: draw a circular visualization tool, where the radius is the amplitude of the visualization tool

I should also mention that the tool includes many customization options, although there is no GUI to easily adjust its settings. Instead, the GLava option is in its rc.glsl Configuration file. In this file, you can enable or disable window prompts, use native, xroot or not use window opacity, specify window background color, etc. You can also set the window geometry in this file so that the audio spectrum visualizer can be properly aligned with the desktop and / or placed on the desired monitor in a multi-monitor setup.
Each display stand type (called “mod”) can also be customized-you can change the color, transparency, etc. These can be changed by modifying the mod file (circle.glsl, bars.glsl, and many more).
Before using GLava to embed real-time audio visualization programs on the desktop background, I should note that GLava may consume a lot of CPU. On my 8-core system, the CPU usage is about 3.3% (or a CPU core is about 25-30%, as reported by htop).
In the screenshot at the top of this article, I am using 2 GLava audio visualization tools to embed on my desktop: radial (the middle one) and bar (bottom). Here is another screenshot, this time using only one OpenGL audio spectrum visualizer-graphics:
OpenGL Spectrum Audio Visualizer Linux Wallpaper

Since simple screenshots are not enough to implement audio visualization tools, the following are video The video recorded by the GLava developer shows multiple GLava audio visualization programs running simultaneously on the desktop background (bar at the bottom, circle on the left, radial lines on the right, and graphics on the top of the screen):

You may also be interested in the following: How to embed Google Calendar on a Linux desktop background.

Install and configure GLava OpenGL audio spectrum visualizer

As I mentioned earlier, I created PPA for the application I use, but it is not available in Ubuntu. PPA is growing slowly, and today it has a new software package GLava.
GLava can be installed in Linux Uprising Apps PPA on Ubuntu 19.04, 18.10 or 18.04, Linux Mint 19 * (there is no dependency in Ubuntu 16.04 / Linux Mint 18, so it cannot be used in this Ubuntu version) and others based on Ubuntu 18.04 Linux distribution, such as basic OS 5.0 Juno:

sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
sudo apt install glava

You can also choose downloading Your Ubuntu version of the DEB package (using the Ubuntu Bionic package in Linux Mint 19 or basic OS 5.0 Juno) instead of adding PPA. Fedora users can install GLava using the following command ycollet / linuxmao Copr database. Add it and install GLava using the following command:

sudo dnf copr enable ycollet/linuxmao
sudo dnf install glava

If you are not using Ubuntu / Linux Mint or Fedora, you can find instructions on installing GLava from the source code (and a link to the AUR package) on it. Project page.
Now that GLava is installed, it’s time to set it up.

1. Initial GLava configuration

The first thing you need to do is copy its default configuration file to your home directory (~/.config/glava). This can be done automatically by running GLava with the following command --copy-config The options in the terminal are as follows:

glava --copy-config

2. Change the GLava window geometry to match your desktop resolution (and move it to the desired monitor in the multi-monitor setup)

To embed the GLava OpenGL audio spectrum visualization tool on the desktop background, use --desktop flag. By detecting the desktop environment and setting appropriate properties, this flag can run Glava as a desktop window. With this feature, the GLava window will not be displayed on your application launcher / dock, it does not have any window borders, the window will be set to allow clicking it, and so on. Always use --desktopUnless you want to run it in a regular window.
Let’s use --desktop flag:

glava --desktop

Play some audio in any application, you should see Glava audio visualizer on your desktop. Its size and location are probably wrong. Let us solve this problem.
It can be configured by editing GLava rc.glsl Configuration file, which is located at ~/.config/glava Folder (created here after running GLava with the following command --copy-config, As described above). Open the file manager and navigate to ~/.config/glavaAnd then open rc.glsl Open the file with a text editor.
Find the line that starts with #request setgeometry. Here, you can specify the size of the GLava embedded window and its X and Y offset, so if you have multiple monitor settings, you can set them on the desired monitor.
If there is only one display, leave the first two values ​​(X and Y) as 0, and then modify the last two values ​​(width and height) to the screen resolution. For example, if there is only one monitor with a resolution of 1920×1080, you must set #request setgeometry like this: #request setgeometry 0 0 1920 1080.
X and Y (the first two values) are the horizontal and vertical offset (0 0 is the upper left corner). On multiple monitors, if you want to move the GLava window on another monitor, you must change the X (first) value. Using “0” will display the GLava visualizer on the leftmost monitor. Change the X value to the resolution of the left monitor to move the GLava window on the monitor to the right. For example use #request setgeometry 1920 0 1920 1080 Display on the second monitor (from left to right).
You can also increase the GLava window by changing the Y (second) value so that it does not start at the bottom of the screen, which is useful if you have some bases at the bottom and want to display the GLava audio visualizer above. For example, if you do n’t see the GLava visualizer on your desktop, try setting Y Value -150.
After change ~/.config/glava/rc.glsl Configuration file, close GLava (use Ctrl + C Send an interrupt signal in the terminal), and then run again to see your changes.
There are various other options in the GLava configuration file with appropriate descriptions, so please review and change these options to suit your needs. However, with the exception of window geometry and visualizer types, most default options should be sufficient for most users.
The next customization is optional, which is why I did n’t number them. If you want to change some GLava options or use different audio visualization tools to run multiple instances without knowing where to start, please complete the following:

glava --desktop

Playing some music, GLava should now display an animated audio visualizer on top of the wallpaper.
(Note that please always connect GLava with --desktop Mark, otherwise the visualization tool does not seem to be embedded in your desktop wallpaper, but will display a normal but transparent window, which appears in the application launcher, has a window border, etc., may not be what you want. )

(Optional) How to add GLava to startup

It is best to delay running GLava at startup to load the desktop before starting the application, otherwise it may not work properly. Therefore, we will use the following start command: sh -c 'sleep 10 && glava --desktop' (Where “10” is a 10 second delay before running Glava, and the GLava start command is glava --desktop, But if you want to start it with a specific configuration file (see below), etc., you can modify it.
To add GLava to startup, start “Start Application” or similar program from the application menu, and add a new startup item named “GLava” as a startup command: sh -c 'sleep 10 && glava --desktop'.
You can also create a file called glava.desktop In ~/.config/autostart/ Has the following content:

[Desktop Entry]
Type=Application
Exec=sh -c 'sleep 10 && glava --desktop'
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=GLava

(Optional) How to change the GLava music visualizer type

Another thing you might want to change in the GLava configuration file is the visualizer type. bars Used by default, but you can change it to radial, graph, wave Or circle. To change this setting, open the same ~/.config/glava/rc.glsl File and change bars From #request mod bars Connect the wire to one of the visualization tools I mentioned above.

(Optional) How to display multiple GLava visualizers (with different visualizer types) on the desktop background

There are two ways to display multiple GLava visualizers (with different visualizer types) at the same time. It is useful if you want to embed multiple music visualizers in the desktop background.
The first one involves creating a new configuration .glsl Filed in ~/.config/glava. You can copy the original rc.glsl File (using a different name) and then change it. Then use to run a new GLava instance --entry Tag followed by the name of the new configuration file (no file path-the new configuration file must be placed ~/.config/glava). E.g:

glava --desktop --entry=mycustomconfig.glsl

Another way to run another GLava instance with a different type of visualizer than specified in the default settings rc.glsl The configuration file is used to specify the type of visualizer (“mod”) on the second (and third etc.) instance, use --force-mod flag. For example, to run a new GLava instance using a circular visualizer, run the following command:

glava --desktop --force-mod=circle

Where --force-mod Value can be bars, radial, graph, wave Or circle.

(Optional) How to change individual visualizer type (mod) settings

GLava supports changing various settings for each of its visualization tool mods (bar graph, radial graph, graph, waveform or circle). These settings are not included in the main configuration file (rc.glsl), But in a separate file.
In the GLava configuration folder (~/.config/glava), You should find a file for each module called bars.glsl, circle.gls, graph.glsl and many more. Depending on the mod type, in these files, you can change the visualizer settings, such as color, transparency, magnification, etc.
Each of these options is directly described in each option .glsl File, so open the Visualizer Mod file that you want to change, and then review the comments to see what each option does.

Source

Sidebar