2014-07-27 10:46:00 +00:00
|
|
|
# Installation guide
|
2014-07-27 07:54:10 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
This guide explains how to install rofi using its build system and how you can
|
|
|
|
make debug builds.
|
2017-03-24 08:44:08 +00:00
|
|
|
|
|
|
|
Rofi uses autotools (GNU Build system), for more information see
|
|
|
|
[here](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html).
|
2019-03-26 12:58:37 +00:00
|
|
|
You can also use [Meson](https://mesonbuild.com/) as an alternative.
|
2017-03-24 08:44:08 +00:00
|
|
|
|
2014-07-27 07:54:10 +00:00
|
|
|
## DEPENDENCY
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
### For building
|
2014-07-27 07:54:10 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
- C compiler that supports the c99 standard. (gcc or clang)
|
|
|
|
|
|
|
|
- make
|
|
|
|
|
|
|
|
- autoconf
|
|
|
|
|
|
|
|
- automake (1.11.3 or up)
|
|
|
|
|
|
|
|
- pkg-config
|
|
|
|
|
|
|
|
- flex 2.5.39 or higher
|
|
|
|
|
|
|
|
- bison
|
|
|
|
|
|
|
|
- check (Can be disabled using the `--disable-check` configure flag)
|
2021-01-17 15:43:16 +00:00
|
|
|
check is used for build-time tests and does not affect functionality.
|
2023-03-26 22:24:51 +00:00
|
|
|
|
|
|
|
- Developer packages of the external libraries
|
|
|
|
|
|
|
|
- glib-compile-resources
|
2014-07-27 07:54:10 +00:00
|
|
|
|
|
|
|
### External libraries
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
- libpango >= 1.50
|
|
|
|
|
|
|
|
- libpangocairo
|
|
|
|
|
|
|
|
- libcairo
|
|
|
|
|
|
|
|
- libcairo-xcb
|
|
|
|
|
2024-02-27 19:46:34 +00:00
|
|
|
- libglib2.0 >= 2.72
|
2023-03-26 22:24:51 +00:00
|
|
|
- gmodule-2.0
|
|
|
|
- gio-unix-2.0
|
|
|
|
|
|
|
|
- libgdk-pixbuf-2.0
|
|
|
|
|
|
|
|
- libstartup-notification-1.0
|
|
|
|
|
|
|
|
- libxkbcommon >= 0.4.1
|
|
|
|
|
|
|
|
- libxkbcommon-x11
|
|
|
|
|
|
|
|
- libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr
|
|
|
|
libxcb-xinerama)
|
|
|
|
|
|
|
|
- xcb-util
|
|
|
|
|
|
|
|
- xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm)
|
|
|
|
|
|
|
|
- xcb-util-cursor
|
|
|
|
|
|
|
|
- xcb-imdkit (optional, 1.0.3 or up preferred)
|
|
|
|
|
|
|
|
On debian based systems, the developer packages are in the form of:
|
|
|
|
`<package>-dev` on rpm based `<package>-devel`.
|
2015-05-25 08:30:32 +00:00
|
|
|
|
2014-07-27 10:46:00 +00:00
|
|
|
## Install from a release
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2024-02-10 20:41:40 +00:00
|
|
|
When downloading from the github release page, make sure to grab the archive
|
|
|
|
`rofi-{version}.tar.[g|x]z`. The auto-attached files `source code (zip|tar.gz)`
|
|
|
|
by github do not contain a valid release. It misses a setup build system and
|
|
|
|
includes irrelevant files.
|
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
### Autotools
|
|
|
|
|
|
|
|
Create a build directory and enter it:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
mkdir build && cd build
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2014-07-21 14:41:31 +00:00
|
|
|
Check dependencies and configure build system:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
../configure
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
|
|
|
Build Rofi:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
make
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
|
|
|
The actual install, execute as root (if needed):
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
make install
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
The default installation prefix is: `/usr/local/` use `./configure
|
|
|
|
--prefix={prefix}` to install into another location.
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2019-05-10 18:05:38 +00:00
|
|
|
### Meson
|
|
|
|
|
|
|
|
Check dependencies and configure build system:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
meson setup build
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2019-05-10 18:05:38 +00:00
|
|
|
|
|
|
|
Build Rofi:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
ninja -C build
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2019-05-10 18:05:38 +00:00
|
|
|
|
|
|
|
The actual install, execute as root (if needed):
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
ninja -C build install
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2019-05-10 18:05:38 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
The default installation prefix is: `/usr/local/` use `meson setup build
|
|
|
|
--prefix={prefix}` to install into another location.
|
2019-05-10 18:05:38 +00:00
|
|
|
|
2014-07-27 10:46:00 +00:00
|
|
|
## Install a checkout from git
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2016-03-27 03:04:03 +00:00
|
|
|
The GitHub Pages version of these directions may be out of date. Please use
|
|
|
|
[INSTALL.md from the online repo][master-install] or your local repository.
|
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
If you don't have a checkout:
|
2017-03-24 08:44:08 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
git clone --recursive https://github.com/DaveDavenport/rofi
|
|
|
|
cd rofi/
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2017-03-24 08:44:08 +00:00
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
If you already have a checkout:
|
2016-03-05 12:36:18 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
cd rofi/
|
|
|
|
git pull
|
|
|
|
git submodule update --init
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2016-03-05 12:36:18 +00:00
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
For Autotools you have an extra step, to generate build system:
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
autoreconf -i
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
From this point, use the same steps you use for a release.
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2014-07-27 10:46:00 +00:00
|
|
|
## Options for configure
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
When you run the configure step there are several options you can configure.
|
2022-11-17 14:36:13 +00:00
|
|
|
|
2019-03-26 12:58:37 +00:00
|
|
|
For Autotools, you can see the full list with `./configure --help`.
|
2022-11-17 14:36:13 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
For Meson, before the initial setup, you can see rofi options in
|
|
|
|
`meson_options.txt` and Meson options with `meson setup --help`. Meson's
|
|
|
|
built-in options can be set using regular command line arguments, like so:
|
|
|
|
`meson setup build --option=value`. Rofi-specific options can be set using the
|
|
|
|
`-D` argument, like so: `meson setup build -Doption=value`. After the build dir
|
|
|
|
is set up by `meson setup build`, the `meson configure build` command can be
|
|
|
|
used to configure options, by the same means.
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2022-11-17 14:36:13 +00:00
|
|
|
The most useful one to set is the installation prefix:
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
../configure --prefix=<installation path>
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson
|
|
|
|
meson setup build --prefix <installation path>
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
|
|
|
f.e.
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
../configure --prefix=/usr/
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson
|
|
|
|
meson setup build --prefix /usr
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2014-07-27 10:46:00 +00:00
|
|
|
### Install locally
|
|
|
|
|
2014-07-21 14:41:31 +00:00
|
|
|
or to install locally:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
../configure --prefix=${HOME}/.local/
|
2014-07-21 14:41:31 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson
|
|
|
|
meson setup build --prefix ${HOME}/.local
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2014-07-27 10:46:00 +00:00
|
|
|
|
2015-03-24 15:02:03 +00:00
|
|
|
## Options for make
|
|
|
|
|
|
|
|
When you run make you can tweak the build process a little.
|
|
|
|
|
|
|
|
### Verbose output
|
|
|
|
|
|
|
|
Show the commands called:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
make V=1
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson
|
|
|
|
ninja -C build -v
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2015-03-24 15:02:03 +00:00
|
|
|
|
|
|
|
### Debug build
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
Compile with debug symbols and no optimization, this is useful for making
|
|
|
|
backtraces:
|
2015-03-24 15:02:03 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
make CFLAGS="-O0 -g3" clean rofi
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson
|
|
|
|
meson configure build --debug
|
|
|
|
ninja -C build
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2015-03-24 15:02:03 +00:00
|
|
|
|
2015-03-28 16:04:34 +00:00
|
|
|
### Get a backtrace
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
|
|
|
|
grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
|
|
|
|
to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
|
|
|
|
crash. You can then load the core in GDB.
|
2015-03-28 16:04:34 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
# Autotools
|
|
|
|
gdb rofi core
|
2019-03-26 12:58:37 +00:00
|
|
|
|
2021-01-17 15:43:16 +00:00
|
|
|
# Meson (because it uses a separate build directory)
|
|
|
|
gdb build/rofi core
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
2015-10-25 12:54:41 +00:00
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
> Where the core file is located and what its exact name is different on each
|
|
|
|
> distributions. Please consult the relevant documentation.
|
2017-03-24 08:44:08 +00:00
|
|
|
|
2022-12-31 12:15:01 +00:00
|
|
|
For more information see the rofi-debugging(5) manpage.
|
|
|
|
|
2015-10-25 12:54:41 +00:00
|
|
|
## Install distribution
|
|
|
|
|
|
|
|
### Debian or Ubuntu
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
apt install rofi
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2015-10-25 12:54:41 +00:00
|
|
|
|
|
|
|
### Fedora
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-21 14:13:50 +00:00
|
|
|
dnf install rofi
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2015-10-25 12:54:41 +00:00
|
|
|
|
2017-03-24 08:44:08 +00:00
|
|
|
### ArchLinux
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
pacman -S rofi
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2017-10-02 11:13:04 +00:00
|
|
|
|
|
|
|
### Gentoo
|
|
|
|
|
|
|
|
An ebuild is available, `x11-misc/rofi`. It's up to date, but you may need to
|
|
|
|
enable ~arch to get the latest release:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2017-10-02 11:13:04 +00:00
|
|
|
|
|
|
|
for amd64 or:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2017-10-02 11:13:04 +00:00
|
|
|
|
|
|
|
for i386.
|
|
|
|
|
|
|
|
To install it, simply issue `emerge rofi`.
|
2019-03-01 14:49:34 +00:00
|
|
|
|
|
|
|
### openSUSE
|
|
|
|
|
|
|
|
On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using:
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
sudo zypper install rofi
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2020-05-27 12:02:29 +00:00
|
|
|
|
|
|
|
### FreeBSD
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2021-01-17 15:43:16 +00:00
|
|
|
sudo pkg install rofi
|
2024-02-10 21:14:08 +00:00
|
|
|
```
|
2022-07-30 07:50:26 +00:00
|
|
|
|
|
|
|
### macOS
|
|
|
|
|
|
|
|
On macOS rofi can be installed via [MacPorts](https://www.macports.org):
|
|
|
|
|
2023-03-26 22:24:51 +00:00
|
|
|
```bash
|
2022-07-30 07:50:26 +00:00
|
|
|
sudo port install rofi
|
2023-03-26 22:24:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
[master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git
|