Skip to content

Instantly share code, notes, and snippets.

@fvigotti
Created March 26, 2021 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fvigotti/7369344aca18056687adb1645695a203 to your computer and use it in GitHub Desktop.
Save fvigotti/7369344aca18056687adb1645695a203 to your computer and use it in GitHub Desktop.
rofi builder dockerized

hi to everyone, If you hade issues finding a compiled binary of rofi, and your package manager isn't updated.. you may need this useful

this create a temp docker container and build rofi, the built binary than is taken from the container and replaced in the host.. let me know if you have a better solution

docker run --rm -ti --name rofibuild ubuntu:20.04 bash 

apt update && apt upgrade &&  
apt install  -y rofi-dev qalc libtool  \
git \
pkg-config \
gcc make \
autoconf \
bison \
flex \
check \
libglib2.0-0 \
libtool \
libpango1.0-dev \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstartup-notification0 \
libstartup-notification0-dev \
librsvg2-bin \
libxcb-composite0 \
libxcb-randr0-dev \
libxcb-util-dev \
libxcb-xinerama0-dev \
libxinerama-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libxft-dev wget 

## some packages taken from : https://github.com/davatorium/rofi/blob/next/.travis.yml
apt install -y discount  doxygen  fluxbox  gdb  graphviz  jq  lcov  libpango1.0-dev  libstartup-notification0-dev  libxcb-ewmh-dev  libxcb-icccm4-dev  libxcb-randr0-dev  libxcb-util0-dev  libxcb-xinerama0-dev  libxcb-xkb-dev  libxcb-xrm-dev  libxkbcommon-dev  libxkbcommon-dev  libxkbcommon-x11-dev  ninja-build  python3-pip  python3-setuptools  python3-wheel  texi2html  texinfo  xdotool  xfonts-base  xterm  xutils-dev \
libgdk-pixbuf2.0-dev 

cd /
wget https://github.com/davatorium/rofi/releases/download/1.6.1/rofi-1.6.1.tar.gz

tar xzvf rofi-1.6.1.tar.gz

cd rofi-1.6.1 
autoreconf -i

mkdir build
cd build/
../configure --disable-check
make
ls la rofi
## make install ## not necessary 


### now from the host run : 
sudo -i

which rofi
mv /usr/bin/rofi /usr/bin/rofi_old 
docker cp rofibuild:/rofi-1.6.1/build/rofi /usr/bin/
rofi -show window

rofi -version
@alabnt
Copy link

alabnt commented Nov 6, 2021

https://github.com/davatorium/rofi/releases/download/1.7.0/rofi-1.7.0.tar.gz
For those of you who want rofi 1.7, use that link instead of the rofi-1.6.1.tar.gz and then edit the rest of the instructions accordingly

@alabnt
Copy link

alabnt commented Feb 6, 2022

Btw, make sure to install libxcb-cursor-dev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment