Build LXDE-Qt From Source

From LXDE.org
Jump to: navigation, search

Introduction

Since the original LXDE and razor-qt projects decided to merge the effort and work together on the same project, we formed lxde-qt, or lxqt. Some effort was made to merge existing codebases and components, but things are still in an early stage so there is no public release yet. For preview purpose, here is a guide for the brave to build lxde-qt from git source code. Please note, since this is a work in progress, things are subject to frequent changes. So be prepared and don't expect too much. Things will improve, but it takes time. :-)

Get the source code from git

git clone https://github.com/lxde/lxqt
cd lxqt
git submodule init
git submodule update
git submodule foreach git checkout master
git submodule foreach git pull --rebase
  • To build all of the code at once, you may optionally use the build_all.sh script:
LXQT_PREFIX=/usr ./build_all.sh
  • If your distro is 64 bit and it installs libraries to lib64 rather than lib, try LIB_SUFFIX=64 environment variable. The script is a quick and simple hack and may not work correctly. Building all of the components manually is safer at the moment.
  • To build with Qt5 support, do the following:
LXQT_PREFIX=/usr USE_QT5=ON ./build_all.sh

Qt5 support

To build lxqt components with Qt5, you need:

  • cmake >= 2.8.11
  • Qt >= 5.1
  • pass -DUSE_QT5=ON flag to cmake to turn on Qt5 support

LLVM/Clang

To build with LLVM/Clang (the default compiler of FreeBSD), you need to do this.

cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..

These two cmake parameters can be used to override the default detection of compilers.

Build the base libraries

mimetypes (Qt4 Only)

  • Mimetypes provider for the Qt4 build of libqtxdg
  • Prerequisite: qt >= 4.7.2
  • Build:
cd mimetypes
qmake
make
sudo make install
  • This library is only needed for the Qt4 build.

libqtxdg

  • Library providing freedesktop.org specs implementations for Qt.
  • Prerequisite:
    • for Qt4: cmake >= 2.8.5, qt >= 4.7.2 and QtMimeTypes,
    • for Qt5: cmake >= 2.8.5 and qt >= 5.0.0.
  • Build: see below.
mkdir build
cd build
cmake ..
make
sudo make install

liblxqt

  • Common base library for most lxde-qt components
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6, libqtxdg, Xlib
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

liblxqt-mount

  • Library used to manage removable devices
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-globalkeys

  • Daemon and library for global keyboard shortcuts registration
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6, Xlib, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-notificationd

  • Notification daemon and library
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

libsysstat

  • Library used to query system statistics (net status, system resource usage, ...etc)
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

menu-cache

  • Prerequisite: automake >= 1.9, pkg-config, libglib >= ?
  • Build:
./autogen.sh
./configure
make
sudo make install
sudo ldconfig

libfm

  • Prerequisite: automake >= 1.9, intltool, gtk-doctools, pkg-config, glib >= 2.16, libexif (for thumbnails), menu-cache >= 0.5, valac >= 0.14 (optional, for actions support, only needs for build and has no runtime dep)
  • Build:
./autogen.sh
./configure --without-gtk --sysconfdir=/etc
make
sudo make install
sudo ldconfig
  • Notice
    • You may have to use --sysconfdir=/etc for some systems (such as Linux); otherwise config files will be install to /usr/local/etc by GNU automake.
    • The flag --without-gtk is also required here since we don't need to build libfm-gtk library.
    • If you install menu-cache in /usr/local, do this prior to running configure
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  • Special configure flags:
    • --enable-debug: (add -g -O0, and other compiler flags required for debugging, disable optimization and generate debug symbols)
    • --enable-demo: also build a small demo program libfm-demo for testing libfm.
  • Runtime dependencies:
    • gvfs (optional, trash can, remote filesystem mounting, and volume management requires gvfs)
    • lxmenu-data (optional, required for menu://application to work, if you have gnome-menus package or other application menu definition files installed, this is not needed).

Build major components

lxqt-panel

  • Desktop panel
  • Prerequisite: cmake >= 2.8.9, qt >= 4.6, libqtxdg, liblxqt, lxqt-globalkeys, liblxqt-mount, Xlib
  • Optional dependencies: libicu (weather plugin), alsa, pulseaudio, menu-cache
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

pcmanfm-qt

  • file manager + desktop manager
  • Prerequisite: libfm >= 1.2, menu-cache >= 0.4, qt >= 4.6, cmake >= 2.8.3, pkg-config
    • If you install menu-cache or libfm in /usr/local, do this prior to running cmake
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Notice: PCManFM-Qt package also install a companion library, libfm-qt, which is the Qt binding of libfm.

lxqt-session

  • session manager
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt, libX11
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-runner

  • Launch applications quickly by typing commands
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt, lxqt-globalkeys
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-qtplugin

  • LxQt platform integration plugin for Qt 4 (let all Qt programs apply LxQt settings)
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-policykit

  • Policykit authentication agent
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt, libqtxdg, polkit-qt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-openssh-askpass

  • Tool used with openssh to prompt the user for password
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-powermanagement

  • Daemon use for power management and auto-suspend
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, xcb, x11-xcb, xcb-screensaver, xcb-dpms, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lximage-qt

  • Image viewer
  • Prerequisite: pcmanfm-qt >= 1.2 (will be used for thumbnail generation and others), qt >= 4.6, cmake >= 2.8.3, pkg-config
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-config

  • System configuration (control center)
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, Xlib, liblxqt, libqtxdg
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-config-randr

  • Simple monitor configuration
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, libX11, Xrandr
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

obconf-qt

  • Window manager configuration (for Openbox)
  • Prerequisite: qt >= 4.6, cmake >= 2.8.3, pkg-config, openbox development libs
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

compton-conf

  • X composite manager configuration (for compton)
  • Prerequisite: qt >= 4.6, cmake >= 2.8.3, pkg-config, libconfig
  • Runtime dependency: compton (running with dbus support turned on)
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-about

  • About dialog for lxde-qt
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

Install data files

lxqt-common

  • Common data file required for running an lxde-qt session
  • Prerequisite: cmake >= 2.8.9
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxmenu-data

  • Data files for application menu
  • Prerequisite: automake >= 1.9
  • Build:
./autogen.sh
./configure --sysconfdir=/etc
make
sudo make install
  • Note: on some other distros, xdg config dir is not /etc/xdg, then pass appropriate --sysconfdir to the configure script according to the OS you use.

Deprecated components

The following components were used in LXQt previously. They still work now, but they might not get future update.

lxinput-qt

Now, lxinput-qt is merged to lxqt-config.

* Keyboard and mouse configuration

  • Prerequisite: qt >= 4.6, cmake >= 2.8.3, Xlib, pkg-config
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-appswitcher

  • Applications switcher
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt, lxqt-globalkeys, libX11
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install

lxqt-lightdm-greeter

  • lxde-qt front-end for lightdm
  • Prerequisite: qt >= 4.6, cmake >= 2.8.9, liblxqt
  • Build:
mkdir build
cd build
cmake ..
make
sudo make install
  • Configure: Open /etc/lightdm/lightdm.conf in an editor (with root privileges - eg. sudo vim /etc/lightdm/lightdm.conf) and make the 'greeter-session' line in the SeatDefaults section look like:
greeter-session=lxqt-lightdm-greeter

After restarting lightdm the greeter should show up.