LXQt - ArchWiki

Jump to content

# LXQt

From ArchWiki

Related articles

- LXDE
- Window manager

LXQt is a desktop environment built on Qt which derives from Razor-qt and LXDE components which were ported to Qt. While development is mainly focused on LXQt, the GTK 3 version of LXDE will see continued development.

Note This article primarily covers LXQt on X11. A Wayland session is available and no longer purely experimental, but is still evolving.

## Installation

First, install and configure Xorg. Then, install the lxqt group and an icon theme (e.g. breeze-icons or oxygen-icons).

For additional functionality, you may wish to install the following:

- nm-tray — A simple Qt based frontend for NetworkManager.

  https://github.com/palinek/nm-tray || nm-trayAUR

- SDDM — The recommended display manager for LXQt.

  https://github.com/sddm/sddm || sddm

- A screen locker, if needed. For example, slock or XScreenSaver. Both are confirmed to integrate with LXQt, others may too.
  - If you are using LightDM as your display manager, you can use light-locker.
  - If you want to disable screen locking upon suspend/sleep it is under LXQt > Preferences > LXQt Settings > Session Settings > Lock screen before suspending/hibernating checkbox.
    Tip LXQt by default uses xdg-screensaver from xdg-utils for screen locking which only works with XScreenSaver and xautolockAUR in LXQt session. A different custom screensaver can be set in Session Settings.
- For audio support, see General recommendations#Sound system.
- Some LXQt panel plugins require extra packages to function, check the optional dependencies for lxqt-panel.

## Starting the desktop

### Using xinit

Append the following line to Xinitrc:

    ~/.xinitrc

    exec startlxqt

### Graphical login

Choose LXQt Desktop from the menu in a display manager of choice.

## Configuration

LXQt in general tries to provide GUI applications to change its settings. Configuration files are in `~/.config/lxqt`. This directory is initialized automatically. The default configuration for new users is found in `/usr/share/lxqt`.

### Screen Brightness

If you find that LXQt uses screen contrast control instead of screen brightness control for the screen brightness keyboard shortcuts, you can change the command to use xbacklight instead under the LXQt configuration center > shortcut keys

    xbacklight -inc 10
    xbacklight -dec 10

If you are using the Intel kernel modesetting driver xbacklight will not work, but you can use the following command instead

    pkexec lxqt-backlight_backend --inc
    pkexec lxqt-backlight_backend --dec

You may need to create two scripts for screen brightness up and down and point the keyboard shortcut to the path of the scripts for it to work.

Another way to change screen brightness is to use brightnessctl

    brightnessctl -d intel_backlight set +5%
    brightnessctl -d intel_backlight set 5%-

### Panel widgets

If you cannot add the CPU and System Statistics widgets to the panel, make sure libstatgrab and libsysstat are installed.

### Use a different window manager

LXQt presents a dialog to pick the preferred window manager at the first login. After that, you can specify a different window manager to use with LXQt via Session Settings, `lxqt-config-session`; or by editing `~/.config/lxqt/session.conf`. Change the following line:

    window_manager=current_window_manager

to a window manager of choice:

    window_manager=your_window_manager

### Wayland session

To enable and use the Wayland session install lxqt-wayland-session and a supported Wayland compositor described below. The settings for the Wayland compositor and the screensaver can now be enabled under LXQt > Preferences > LXQt Settings > Session Settings (`lxqt-config-session`).

Supported stacking compositors are labwc, wayfire and kwin, while the tiling ones are hyprland, niri, river-classic and sway. For other compositors manual configuration is needed, as the compositor needs to start lxqt-session.

A conservative, lightweight choice is labwc, which is in some ways the successor to Openbox (X11) and is therefore very similar in configuration and behavior.

Note The configuration(s) of the selected compositor are installed to `~/.config/lxqt/wayland/` and will be created by default on first start, except for labwc and kwin_wayland where the default locations are used.

Supported screensavers are hyprlock, swaylock and waylock. If kwin_wayland is used, the command in Session Settings needs to be set to `loginctl lock-session` to use its screen locker.

Choose LXQt (Wayland) from the menu in a display manager which supports Wayland.

From a console the LXQt Wayland Session can be started directly with `startlxqtwayland`.

For mouse, keyboard, monitor and shortcuts/keybindings configuration LXQt offers only limited or no support so far; check instead your Wayland compositor and/or external tools designed for Wayland support.

### Autostart

To have applications start on login, click the main menu from the LXQt > Preferences > LXQt Settings > Session Settings. Alternatively, this can be launched with:

    $ lxqt-config-session

From this window, click on AutoStart on the left side. Here you can add a new application to either the global autostart (launched in all sessions implementing the XDG Autostart specification) or your local autostart (labelled LXQt Autostart). For each item you add, `lxqt-config-session` will create a Desktop entry (.desktop file) in the appropriate XDG Autostart directory.

The distinction between "Global Autostart" and "LXQt Autostart" does not depend on the directory in which the corresponding .desktop file is located, but rather on the `OnlyShowIn` setting. If it is `OnlyShowIn=true`, it is considered an "LXQt Autostart". Furthermore, if `X-LXQt-Module=true`, the item is not shown in `lxqt-config-session`.

### Set-up environment variables

Environment variables for LXQt session can be defined in Session Settings.

### Editing the Application Menu

It is possible to edit menu entries by editing their .desktop files stored in `/usr/share/applications/lxqt-*.desktop` files. See Desktop entries.

## Tips and tricks

### Screen Compositor (x11)

You can add a compositor like picom to autostart applications with a command like the following

    picom --vsync -r 12 --no-fading-openclose -b

### Customizing Leave

The options available under Leave can be customized by copying the respective package provided `.desktop` file to `~/.local/share/applications` and modifying it to contain the `NoDisplay=true` directive. Reference: #876.

Complete list of files to consider masking include:

    lxqt-hibernate.desktop
    lxqt-leave.desktop
    lxqt-lockscreen.desktop
    lxqt-logout.desktop
    lxqt-reboot.desktop
    lxqt-shutdown.desktop
    lxqt-suspend.desktop

Example: remove hibernate option.

    $ mkdir -p ~/.local/share/applications
    $ sed '/OnlyShowIn/aNoDisplay=true' </usr/share/applications/lxqt-hibernate.desktop >~/.local/share/applications/lxqt-hibernate.desktop

### Hyprland

#### Running without xorg or labwc

Create:

    ~/.config/lxqt/session.conf

    [General]
    __userfile__=true
    compositor=/usr/bin/start-hyprland

Copy `/usr/share/lxqt/wayland/lxqt-hyprland.lua` to `~/.config/hypr/hyprland.lua`.

If there is a previously configured `hyprland.lua`, the files can be merged, take special attention to the sections `AUTOSTART`, `ENVIRONMENT VARIABLES` and `MISC`, since these contain the bare-minimum, `MY PROGRAMS` and `WINDOWS AND WORKSPACES` deal with which programs are used and how windows tile and float. `KEYBINDINGS`, bring some lxqt shortcuts and the other sections are mainly hyprland's defaults.

#### Removing qt6-tools (lxqt-qdbus) dependency in lxqt's hyprland.lua

##### Start fancy menu

Set keybind:

    ~/.config/hypr/hyprland.lua

    hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd("~/.local/bin/lxqt-open-menu"), {release = true})

    ~/.local/bin/lxqt-open-menu

    #!/bin/sh
    busctl --user call "$(busctl --user list | \
    awk '/lxqt-panel/ {print $1; exit}')" \
    /global_key_shortcuts/panel/fancymenu/show_hide \
    org.lxqt.global_key_shortcuts.client activated

## Troubleshooting

### Desktop icons are grouped together

When moving icons on the desktop it is possible to place them a bit too close to each other making them connected. If unable to separate them Stop Desktop from Session Settings, remove `~/.config/pcmanfm-qt/lxqt/desktop-items-0.conf` and Start Desktop again.

### Run LXQt with xrdp

Running LXQt with xrdp for remote login has the benefit of being fast and convenient, while minimizing resource consumption on the server. Setting up xrdp is rather painless, and only requires a user to adjust the `~/.xinitrc`. Since LXQt appears to rely on some D-Bus service functionality, that file should have the following line at the end [1]:

    exec dbus-run-session -- startlxqt

### Mouse cursor has different sizes on different windows (X11)

Install xorg-xrdb. LXQt saves cursor info to .Xresources and to read this info you need this package.

## See also

- LXQt homepage
- LXQt wiki
- LXQt development
- PCManFM

Category:

- Desktop environments

LXQt
Add topic