-
Notifications
You must be signed in to change notification settings - Fork 49
Compiling from source
Latest sources are available in the git repositories (note that you need both, since the plugins provide essential functionality):
https://github.com/Cairo-Dock/cairo-dock-core
https://github.com/Cairo-Dock/cairo-dock-plug-ins
Download them with git:
git clone https://github.com/Cairo-Dock/cairo-dock-core.git
git clone https://github.com/Cairo-Dock/cairo-dock-plug-ins.git
this will create two subdirectories, cairo-dock-core
and cairo-dock-plug-ins
. To update them, run the following command in both:
git pull
To switch to an older version (e.g. the latest stable version):
git checkout 3.5.2
To switch back to the latest (likely beta / development) version:
git checkout master
Compilation tools:
required: cmake make pkg-config gettext gcc (or any other C compiler)
optional, for Wayland support: extra-cmake-modules wayland-scanner wayland-protocols
optional, for some plugins: valac python3
Libraries for the core:
required: gtk+-3.0 glib-2.0 gthread-2.0 cairo librsvg-2.0 dbus-1 dbus-glib-1 libxml-2.0 xrender gl glu egl libcurl xtst xcomposite xrandr
optional, for Wayland support: libwayland-dev json-c gtk-layer-shell
Libraries for the plugins:
Required: cairo librsvg-2.0 dbus-1 dbus-glib-1 libxml-2.0 glib-2.0
Highly Recommended: libalsa libetpan libgnome-menu3 gio-2.0 libxklavier xrandr x11 xxf86vm
gvfs upower-glib zeitgeist-1.0 libexif vte(-2.90) lm_sensors curl wget dbusmenu-glib(-0.4) dbusmenu-gtk(3)(-0.4)
Suggested: ayatana-indicator3 libayatana-ido3 libical libpulse webkitgtk-3.0 ayatana-indicator-messages ayatana-indicator-sound
Optional: fftw3
On recent Debian / Ubuntu, these can be installed with the following command:
sudo apt install cmake make pkg-config gcc gettext build-essential libglib2.0-dev libcairo2-dev librsvg2-dev libdbus-glib-1-dev libxml2-dev libxrender-dev libglu1-mesa-dev libpango1.0-dev libxxf86vm-dev libxtst-dev libxrandr-dev libx11-dev libcurl4-gnutls-dev libgtk-3-dev libdbusmenu-gtk3-dev libasound2-dev libgnome-menu-3-dev libetpan-dev libxklavier-dev libwebkit-dev libexif-dev libvte-2.90-dev libzeitgeist-dev libayatana-ido3-dev libayatana-indicator3-dev libsensors4-dev libupower-glib-dev wget curl extra-cmake-modules libwayland-bin libwayland-dev libegl-dev wayland-protocols valac python3 libgtk-layer-shell-dev libjson-c-dev
cd cairo-dock-core
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -Denable-desktop-manager=True
make # or e.g. make -j 4 on a quad-core CPU
sudo make install # as root
cd ../..
This will install Cairo-Dock and related data under /usr/local
with all features (if available). Some useful options:
-
-DCMAKE_BUILD_TYPE=Debug
to compile with debug symbols -
-Denable-desktop-manager=[True/False]
whether to install files for a "desktop session" that can be selected from the login manager (uses X11, either Compiz or Metacity and components from gnome-session) -
-Denable-systemd-service=[True/False]
whether to install a Systemd service file (disabled by default) that can be used to auto-start Cairo-Dock -
-Denable-wayland-support=[True/False]
whether to enable Wayland support at all -
-Denable-wayland-protocols=[True/False]
whether to enable Wayland protocols such as foreign-toplevel-management that are required for the taskbar functionality -
-Denable-egl-support=[True/False]
whether to compile support for EGL (required for OpenGL on Wayland, can be used on X11) -
-Denable-x11-support=[True/False]
whether to enable support for X11 specific features at all -
-Denable-glx-support=[True/False]
whether to compile support for GLX (can be used for OpenGL on X11) -
-Denable-gtk-layer-shell=[True/False]
whether the enable using gtk-layer-shell (required for positioning docks on Wayland) -
-Dplugins-prefix={prefix}
separate prefix where plug-ins should be installed (by default, the same prefix will be used, see below)
After running cmake
, a summary will be printed with compilation options that will be used (and some issues, e.g. if a library is not found). Note that not finding an optional library will not result in an error, just disable the component that requires it.
cd cairo-dock-plug-ins
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_BUILD_TYPE=Release
make # or e.g. make -j 4 on a quad-core CPU
sudo make install # as root and if you had no errors
cd ../..
Notes:
- The prefix under plugins will be installed should be specified when configuring core, with the
-Dplugins-prefix
option. When configuring the plugin, you need to give the prefix under which you installed core with the-DCMAKE_PREFIX_PATH
; the prefix set for the plug-ins will be detected and set from it, so you should not use the-DCMAKE_INSTALL_PREFIX
option here. Giving the correct prefix here is especially important if you have multiple versions of Cairo-Dock installed. - Older versions of Cairo-Dock (before
3.5.99.rc3
) required to use the same prefix when installing core and the plugins, given by the-DCMAKE_INSTALL_PREFIX
argument to both. - If you have multiple Cairo-Dock versions installed AND you have the
PKG_CONFIG_PATH
environment variables set to include the installation prefix of at least one (as can happen e.g. on Arch Linux with/usr/local/lib/pkgconfig
), you may need to manually adjust it so that the correct version is prioritized (see below in more detail). - Individual plugins can be enabled or disabled by specific CMake options, e.g. use
-Denable-mail=False
to disable the "Mail" plugin. - Plugins will be disabled if their specific dependencies are not found (with a warning message about missing dependencies).
- The Dbus plugin provides a Python interface to interact with Cairo-Dock. It will install the required files under the prefix used for the plugins, and will adjust the
$PYTHONPATH
environment variable when loading external plugins written in Python.
For best results, it is recommended to install under /usr/local
which is considered "standard" and is well supported on most distributions. It is not recommended to install the dock in a prefix that is used by your system's package manager (e.g. /usr
). You may need to pay attention to the following:
- Make sure you provide the
-DCMAKE_PREFIX_PATH
variable when configuring the plugins and set it to the same path as given with-DCMAKE_INSTALL_PREFIX
when configuring the core. - If using an older version, you will likely also need to set the
PKG_CONFIG_PATH
environment variable to point to the appropriatepkgconfig
directory under the installation prefix when building the plugins (e.g./opt/lib/pkgconfig
). This is not required anymore on the latest master. - If you wish to install multiple versions of Cairo-Dock: if the
PKG_CONFIG_PATH
environment variable is set and points to a directory with agldi.pc
from an installed version of Cairo-Dock, it will be prioritized to what is set by CMake and thus you may end up with the wrong installation prefix for the plug-ins. In such cases, you need to explicitly setPKG_CONFIG_PATH
to list first the directory with the preferred version of Cairo-Dock. - If the binary directory is not in
PATH
, you will need to ensure that Cairo-Dock is started using the full path (e.g./opt/bin/cairo-dock
instead of justcairo-dock
). - On older versions, you will need to adjust the
LD_LIBRARY_PATH
environment variable to include the library path under the prefix. This is not required on the latest git master (version3.5.99.rc2
or later). - Using a custom prefix will typically mean that the
cairo-dock.desktop
file will not be in a location that is automatically picked up by other apps so that you will not have a "Cairo-Dock" entry in your menus. If you'd like to have a menu entry for Cairo-Dock, you will need to create a symlink from/usr/share/applications
or~/.local/share/applications/
- Also, the desktop session will likely not be available (as the session files will be installed in a non-standard location); you will need to manually copy / symlink files under
${prefix}/share/xsessions
(cairo-dock-*.desktop
) and${prefix}/share/gnome-session/sessions
(cairo-dock-*.session
) to the respective directories under/usr
or/usr/local
(i.e./usr/local/share/xsessions
and/usr/local/share/gnome-session/sessions
). - The same applies to systemd target files that are installed under
${prefix}/lib/systemd/user
:gnome-session-x11@cairo-dock-*.target
andcairo-dock.service
; these should be symlinked under/usr/local/lib/systemd/user
or under~/.local/systemd/user
. - When running under KWin (including KDE / Plasma) the taskbar will not work unless the
cairo-dock.desktop
file is placed in a "standard" location (i.e. under/usr/local/share/applications
); you will need to copy or symlink it from under the installation prefix (e.g./opt/share/applications/cairo-dock.desktop
)