Switch LibreOffice Backends: GTK3, GTK4, Qt5, Qt6

LibreOffice utilizes the Visual Class Library (VCL) plugin system on Linux to adapt its graphical interface to different desktop environments. By changing the SAL_USE_VCLPLUGIN environment variable, you can override the default UI rendering backend and switch between GTK3, GTK4, Qt5, and Qt6 (including KF5/KF6 for KDE Plasma). This guide provides the necessary steps to install the required backend packages, run LibreOffice with a specific backend temporarily via the terminal, set a permanent configuration, and verify the active rendering engine.

1. Install the Backend Packages

Before switching backends, ensure the corresponding VCL plugins are installed on your distribution.

2. Identify the VCL Plugin Names

Set the SAL_USE_VCLPLUGIN environment variable to any of the following supported identifiers:

3. Test Backends via Terminal

To launch LibreOffice with a specific backend temporarily, prepend the environment variable to the command:

4. Set the Backend Permanently

Method A: User Profile (Applies to all sessions)

Export the variable in your shell profile configuration (~/.profile, ~/.bashrc, or ~/.zshrc):

echo 'export SAL_USE_VCLPLUGIN=qt6' >> ~/.profile

Log out and log back in to apply the changes.

Method B: Desktop Launcher (Applies only to app menu launches)

  1. Copy the system desktop entry to your local application directory:

    cp /usr/share/applications/libreoffice-writer.desktop ~/.local/share/applications/
  2. Open ~/.local/share/applications/libreoffice-writer.desktop in a text editor.

  3. Modify the Exec line to define the variable:

    Exec=env SAL_USE_VCLPLUGIN=gtk3 libreoffice --writer %U

5. Verify the Active Backend

To confirm that LibreOffice is using the desired UI backend:

  1. Open LibreOffice.
  2. Navigate to Help > About LibreOffice.
  3. Locate the User Interface entry in the information box. It will display the active backend (e.g., UI render: default; VCL: gtk3 or VCL: qt6).