Skip to content

Instantly share code, notes, and snippets.

@douglascodes
Created May 7, 2015 02:26
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save douglascodes/0b760ffec372cf032bca to your computer and use it in GitHub Desktop.
Save douglascodes/0b760ffec372cf032bca to your computer and use it in GitHub Desktop.
Installation instructions for getting i3-wm to compile on CentOS 7
yum update
#Install for compiling and configuring needs
yum install nano bzip2 gcc git pkgconfig autoconf automake libtool gperf byacc libxslt bison flex
#If in a VM you will need to install files for kernel dev to load Guest additions (VirtualBox)
yum install kernel-devel
#Mount the guest additions CD and install
sudo mount /dev/sr0 /media
sudo /media/VBoxLinuxAdditions.run
#Install for X window system reqs
yum groupinstall "X Window System"
#Install needed and available development libraries
yum install libxcb-devel libXcursor-devel pango-devel pcre-devel perl-Data-Dumper perl-Pod-Parser startup-notification-devel xcb-util-keysyms-devel xcb-util-devel xcb-util-wm-devel yajl-devel check-devel gettext-devel xterm
yum install xorg-x11-xkb-extras xorg-x11-xkb-utils-devel libxkbfile-devel libev-devel
#Add the following lines to a new file at the below location
#/etc/profile.d/pclib.sh
export XORG_CONFIG=/etc/X11/
export PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig/:/usr/lib64/pkgconfig/
export PKG_CONFIG_PATH=/usr/share/pkgconfig/:/usr/local/share/pkgconfig/
export ACLOCAL_PATH=/usr/local/share/aclocal/
export LD_LIBRARY_PATH=/usr/local/lib/
#Restart the machine so kernel and env vars take place.
#! /bin/bash
mkdir ~/Source
cd ~/Source/
git clone http://cgit.freedesktop.org/xorg/util/macros/
git clone http://cgit.freedesktop.org/xcb/util-renderutil/
git clone http://cgit.freedesktop.org/xcb/util-image/
git clone http://cgit.freedesktop.org/xcb/util-cursor/
git clone http://cgit.freedesktop.org/xcb/proto/
git clone http://cgit.freedesktop.org/xcb/libxcb/
git clone https://github.com/xkbcommon/libxkbcommon.git
git clone http://git.savannah.gnu.org/r/confuse.git
git clone https://github.com/i3/i3.git
# Macros
cd macros
git tag -l
git checkout tags/util-macros-1.19.0
./autogen.sh
make
sudo make install
#util-render
cd ../util-renderutil/
git submodule update --init
git tag -l
git checkout tags/0.3.9
./autogen.sh
make
sudo make install
#util-image
cd ../util-image/
git submodule update --init
git tag -l
git checkout tags/0.4.0
./autogen.sh
make
sudo make install
#util-cursor
cd ../util-cursor/
git submodule update --init
git tag -l
git checkout tags/0.1.2
./autogen.sh
make
sudo make install
#proto
cd ../proto/
git tag -l
git checkout tags/1.11
./autogen.sh
make
sudo make install
#libxcb
cd ../libxcb/
git tag -l
git checkout tags/1.11
./autogen.sh
make
sudo make install
#xkbcommon
cd ../libxkbcommon/
git tag -l
git checkout tags/xkbcommon-0.5.0
./autogen.sh
make
sudo make install
#confuse
cd ../confuse/
git tag -l
git checkout tags/V2_7
./autogen.sh
make
sudo make install
#i3
cd ../i3/
git tag -l
git checkout tags/4.10.2
make
sudo make install
#i3status
cd ~/Source/
sudo yum install pulseaudio-libs-devel alsa-lib-devel asciidoc
git clone https://github.com/i3/i3status.git
curl -GL -O http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.tar.gz
tar xvf wireless_tools.29.tar.gz
cd wireless_tools.29
make
sudo make install
cd ../i3status/
make
sudo make install
#echo "exec i3" > ~/.xinitrc
echo "exec ssh-agent i3" > ~/.xinitrc
@douglascodes
Copy link
Author

echo "exec i3" > ~/.xinitrc

echo "exec ssh-agent i3" > ~/.xinitrc

cat /etc/i3/config | sed 's/Mod1/$mod/g' > ~/.i3/config

nano ~/.i3/config

Comment OUT last line

set $mod by using one of these lines at the start

set $mod Mod4 (win)

or

'set $mod Mod1' (alt)

@daberkow
Copy link

For i3status I needed
sudo yum install libnl3-devel.x86_64

Also to get i3 to launch correctly I had to create a folder and soft link.
mkdir /usr/local/share/X11
sudo ln -s /usr/share/X11/xkb /usr/local/share/X11/xkb

@chombium
Copy link

chombium commented Jun 25, 2016

I compiled succesfully the latest version of i3wm and i3status on RHEL 7.2

i3 version 4.12 (2016-03-06, branch "4.12") © 2009 Michael Stapelberg and contributors
i3status 2.10-21-g0a2d4d8 (2016-05-13) © 2008 Michael Stapelberg and contributors

As @dabetkow suggested, I needed also to install libnl3-devel package.
I also had a problem that i3status did not start and was throwing the following error:
"i3status: error while loading shared libraries: libconfuse.so.0: cannot open shared object file: No such file or directory"

To solve this issue I needed to add LDFLAGS+=-rpath,/usr/local/lib/ after the LDFLAGS+=-L/usr/local/lib/ line in the Makefile and build it once again.

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