The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

How to build and install i3 from sources?

asked 2012-06-06 19:47:46 +0000

updated 2012-06-07 10:00:48 +0000

Hi,

I have tried to find instructions on installing i3 from sources in the Git repository. It seems, the procedure is not explained anywhere in:

The only instructions I found is compilation of details from:

  • PACKAGE-MAINTAINER and DEPENDS files in the Git repository
  • and my own experience with building software on Linux :)

I wonder, is it intentional not to provide users with "Install i3 from source" How-To?

EDIT:

I have found the following note from the features list on the i3wm front page complements the philosophy:

  • Do not use programs such as autoconf/automake for configuration and creating unreadable/broken makefiles.
  • Also, document the dependencies properly, so that package maintainers have an easy job packaging i3.
edit retag flag offensive close merge delete

7 answers

Sort by » oldest newest most voted
3

answered 2012-06-06 20:01:44 +0000

Michael gravatar image

Yes, it is. People are supposed to install the packages in their distribution. If there are no packages yet, they should create one (or request creation). That way, only one person per distribution has to do the work, and all the users benefit.

Apart from that, if you really really need to compile i3 yourself for some reason, the mechanism used to install i3 is well-known amongst any UNIX user: make && sudo make install (we don’t have a configure script).

edit flag offensive delete link more

Comments

How do I request creation of missing packages, lets say, for Ubuntu 12.04? I for one like trying out development versions of i3 and there are unmet dependencies for Ubuntu 12.04 and i3 4.7 development branch. I'll be happy to put in a request for these packages for Ubuntu 12.04. Thanks!

i3er gravatar imagei3er ( 2014-01-19 18:58:57 +0000 )edit
3

answered 2013-04-03 10:48:34 +0000

Hibou57 gravatar image

updated 2013-04-03 10:50:49 +0000

It may indeed be needed to build from source, whenever your platform only provides an obsolete version of i3 (the same for DMenu by the way).

Here are the compilation dependencies I could determine for a successful build on Ubuntu Precise (Ubuntu 12.04):

  • libxcb1-dev
  • libxcb-keysyms1-dev
  • libxcb-util0-dev
  • libxcb-icccm4-dev
  • libyajl-dev
  • libstartup-notification0-dev
  • libxcb-randr0-dev
  • libev-dev
  • libxcb-xinerama0-dev

These are not the same as those listed in DEPENDS, which does not match.

If you want to install locally in your account, you will have to edit common.mk and change this:

ifndef PREFIX
  PREFIX=/usr
endif

into as an example

ifndef PREFIX
  PREFIX=$(HOME)/apps/i3
endif

You will also have to manually copy i3.applications.desktop into /usr/share/xsessions as i3.desktop (you need to use sudo or to be root for that).

edit flag offensive delete link more

Comments

1

Note that we provide repositories for ubuntu, so what you describe is entirely unnecessary. See http://i3wm.org/docs/repositories.html

Michael gravatar imageMichael ( 2013-04-03 10:51:07 +0000 )edit
1

OK, thanks for the tip. I installed from the official Ubuntu repositories, and did not knew there was one here. Is this the same for DMenu?

Hibou57 gravatar imageHibou57 ( 2013-04-03 10:54:02 +0000 )edit
1

I can put dmenu into my repository as well if people request it.

sur5r gravatar imagesur5r ( 2013-04-03 11:26:41 +0000 )edit
2

The DMenu provided with SuckLessTools has an issue with fonts. So I compiled `dmenu-4.5` from source with an applied patch named `dmenu-4.5-xft.diff` I found on the web (seems I can't post a link, sorry). I did not check if the remaining of SuckLessTools is OK or not.

Hibou57 gravatar imageHibou57 ( 2013-04-03 13:28:34 +0000 )edit
2

Still about dmenu, there exist another useful patch on the suckless.org development mailing list: `dmenu-4.5-fuzzy.diff`, for fuzzy matching with dmenu with a `-z` option. But it does not work well on long lists, making some items unreachable whenever an item is a fuzzy match of another longer.

Hibou57 gravatar imageHibou57 ( 2013-04-05 08:47:44 +0000 )edit
2

answered 2013-09-18 12:41:54 +0000

cee gravatar image

For me on a vanilla xubuntu install (with build-essential) two other dependencies have been necessary.

libpango1.0-dev libxcursor-dev

(Yes I know that there is a package for (x)ubuntu, but still wanted to try to build it myself...)

edit flag offensive delete link more
1

answered 2012-06-08 23:30:06 +0000

updated 2013-09-21 10:03:43 +0000

If your distribution is Slackware, have a look at this or this for i3 master branch. Even if it isn't, you can have a look at the slackbuild script and get the idea.

edit flag offensive delete link more

Comments

I use Arch Linux, but the Slackware approach is an interesting resource to learn from too.

mloskot gravatar imagemloskot ( 2012-06-09 00:17:11 +0000 )edit
1

On Arch Linux it's even simpler. Just grab the PKGBUILD (for example this one from the git build: https://aur.archlinux.org/packages/i3-git/) and makepkg

badboy_ gravatar imagebadboy_ ( 2013-01-06 18:00:18 +0000 )edit
0

answered 2014-01-19 14:06:48 +0000

As of i3 v 4.7, I had to add one additional dependency to make compilation work:

  • libev-dev
  • libpango1.0-dev
  • libstartup-notification0-dev
  • libxcb1-dev
  • libxcb-cursor-dev
  • libxcb-icccm4-dev
  • libxcb-keysyms1-dev
  • libxcb-randr0-dev
  • libxcb-util0-dev
  • libxcb-xinerama0-dev
  • libxcursor-dev
  • libyajl-dev
edit flag offensive delete link more

Comments

Which platform/version? Thanks.

joepd gravatar imagejoepd ( 2014-01-19 20:21:09 +0000 )edit

Oh, sorry. Debian 7.3. Maybe libxcursor-dev is no longer necessary? I haven't checked that.

Marco Hunsicker gravatar imageMarco Hunsicker ( 2014-01-19 20:40:24 +0000 )edit
0

answered 2015-05-06 20:37:29 +0000

erikdubois gravatar image

Hi

Installed your i3 on arch moved my codes to Linux Mint 17.1 and come to the conclusion that I got errors for different shortcuts. Linux Mint is on an older version in the repo. With the help of Marco above and some googling. This is how i installed the version of MAY 2015 on an LINUX MINT 17.1 Cinnamon.

git clone https://github.com/i3/i3.git

installing dependancies

sudo apt-get install libxcb1-dev 
sudo apt-get install libxcb-keysyms1-dev 
sudo apt-get install libxcb-util0-dev 
sudo apt-get install libxcb-icccm4-dev 
sudo apt-get install libyajl-dev 
sudo apt-get install libstartup-notification0-dev  
sudo apt-get install libxcb-randr0-dev 
sudo apt-get install libev-dev 
sudo apt-get install libxcb-xinerama0-dev 
sudo apt-get install libpango1.0-dev 
sudo apt-get install libxcursor-dev 
sudo apt-get install libxcb-cursor-dev
sudo apt-get install libxcb-xkb-dev
sudo apt-get install libxkbcommon-dev
sudo apt-get install libxkbcommon-x11-dev

go to the directory

make && sudo make install

edit flag offensive delete link more
0

answered 2013-06-30 11:39:54 +0000

I needed to build i3 from sources to check if a bug was fixed and found the dependency list above most helpful, thanks. I wrote myself a little script for the task, which also takes care of the dependencies. I thought I'd leave this here if others want to build i3 themselves: build-i3.sh

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-06-06 19:47:46 +0000

Seen: 6,060 times

Last updated: May 06