SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-06-21 02:20:09

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

How To Build And Install Conky

How To Build And Install The Current Stable Version of Conky

This is a walkthrough of how to build the current stable version of conky from git.
These instructions will work with the latest release, v1.9.0, or the current stable version in git v1.9.1.

These instructions are a work in progress..
Please post any problems you have here so I can try to help you through them.

I highly recommend you build v1.9.1 since it has bug fixes not found in v1.9.0.

Step 0: Remove Current Conky
    It is recommended but not required that you uninstall any other versions of conky you have installed now (from a package or somewhere else).
    You will be warned when you must uninstall your current conky to proceed.

Step 1: Download Build Dependencies
    Download the build dependencies for conky.

sudo apt-get install build-essential automake git docbook2x libxfixes-dev libasound2-dev libcairo2-dev libcurl4-gnutls-dev libglib2.0-dev libimlib2-dev libiw-dev liblua5.1-0-dev libncurses5-dev libtolua++5.1-dev libtool libx11-dev libxdamage-dev libxext-dev libxft-dev libxml2-dev

    If you have an Nvidia graphics card also install this build dependency.

sudo apt-get install libxnvctrl-dev

   
Step 2: Choose A Build Directory
    Choose a place to download the conky source files to then open a terminal and cd to that directory

cd Build_Directory

   
Step 3: Download The Source
    Now download the source code for conky and cd to the directory containing it.
    If you want to use v1.9.0.

git clone git://github.com/brndnmtthws/conky.git -b 1.9.0 conky_1.9.0
cd conky_1.9.0

    If you want to use v1.9.1.

git clone git://github.com/brndnmtthws/conky.git -b 1.9.1 conky_1.9.1
cd conky_1.9.1

Step 4 (Optional): Apply Patches
    Step A: Make Patch Directory
        Make a patch directory to download your patches to like this.

mkdir patches

    Step B: Download Patches
        Download any patches you want to the patch directory you made in the last step.
        There are two patches covered here at this time.
       
        Patch 1: Debian apcupsd Patch
            The Debian patch fix-apcupsd.patch fixes broken apcupsd functionality in conky.
            You can download it here.
            If you are building v1.9.0 you should download and apply the other two patches found on this page.
           
        Patch 2: Fix Shade Postion When Using goto
            Fixes the horizontal postion of shades drawn when using "draw_shades yes" in your .conkyrc.
            You can download my patch for v1.9.0 here.
            This bug has been patched in v1.9.1 there is no need to install the patch.
           
    Step C: Apply Patches
        Now apply the patches to the source code.
        Run the following commands to apply the patches.
       
            Patch 1:

patch -b -d ./src -i ../patches/fix-apcupsd.patch

            Patch 2:

patch -b -d ./src -i ../patches/goto_shade_patch.diff

Step 5: Choose Your Build Options
    I have only covered activating the optional nvidia support here.
    I have covered the other build options here.
   
    First run autogen.sh to setup your build environment.

sh autogen.sh

   
    If you do not have an Nvidia graphics card use this configure line.

./configure --disable-mpd --disable-moc --enable-wlan --enable-imlib2 --enable-lua-cairo --enable-lua-imlib2

   
    If you have an Nvidia graphics card use this configure line.

./configure --disable-mpd --disable-moc --enable-wlan --enable-nvidia --enable-imlib2 --enable-lua-cairo --enable-lua-imlib2

   
Step 6: Build And Install Conky
    Now we will build and install conky.
    Step A: Build Conky
        Now build conky by running make

make

        If you want to do a multithreaded compile you can specify the number of threads like this where N is the number of threads to use.

make -j N

        This step may take a while.
       
    Step B: Build And Install Conky Lua Modules
        Uninstall any conky packages you have installed now.
        If you leave a conky package installed after this point you may break your conky install or worse.       
        Run these command one line at a time to build and install the conky lua modules.

cd lua
make clean
make
sudo make install

    Step C: Build Man Pages
        Now we build the man pages (so you can install conky) by running these commands one line at a time.

cd ../doc
docbook2x-man docs.xml

    Step D (Optional): Test If Conky Is Working
        You can now test if your new conky is working by running it like this.

../src/conky -c path_to_your/.conkyrc

    Step E: Install Conky       
        Now we install conky with make install.
        This will not make a package so you will need to keep the conky_1.9.X folder if you want to be able to easily uninstall conky.
       
        After having removed all conky packages install conky by running these commands one line at a time.

cd ..
sudo make install

    Step F: Test If Conky Is Working After Install
        Open a new terminal window and start conky like this to test if it is working.

conky -c path_to_your/.conkyrc

        You can verify the conky version and build options like this.

conky -v

       
       
How To Uninstall
    To uninstall the conky installed following the directions above follow these instructions.
    In a terminal cd to the conky_1.9.X directory you built conky in.
    Then run these commands one line at a time to uninstall conky.

cd lua
sudo make uninstall
cd ..
sudo make uninstall

   
Possible Differences From Debian Packages
    The basic build options in this post are not the same as in the Debian packages.
    How to build with the same options as the Debian "conky-all" package are covered here.
   
    Debian patches fix-CVE-2011-3616.patch and fix-kfreebsd-ftbfs.patch are not part of v1.9.0 but are part of v1.9.1.


About The Master Branch
    These build instructions will not work with the master branch of conky.
    It can only be built using cmake not auto-tools so these instructions will not work.
   
    I have recently been able to build a functional version of the master branch but I have not written instructions
    for it yet.
    This is because I am less familiar with cmake so I need to figure out a good way to write instructions for using "ccmake" to select build options.
    I believe the dependencies are the same for building the master branch if you want to try building it on your own.

Last edited by arclance (2014-07-13 00:52:34)

Offline

Help fund CrunchBang, donate to the project!

#2 2012-06-21 02:28:12

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: How To Build And Install Conky

Other Build Options
Other build options you can use to enable or disable some parts of conky at build time are explained here.


This section is a work in progress.
Options marked "Untested" have not be tested to work by me or confirmed to work by someone else without installing additional build dependencies.
If you find any problems with the options explained here please let me know so I can update this section with accurate information.
If you can confirm that any "Untested" section is correct please let me know so I can remove the "Untested" label.

Disable ARGB Support
If you do not use a compositor you can disable ARBG support in conky by adding

--disable-argb

to the ./configure line you use in Step 5.

Built-in RSS Support
To enable rss support (${rss}) in conky add

--enable-rss

to the ./configure line you use in Step 5.

Built-in Weather Support - Untested
To enable the built-in weather options in conky (${weather} and ${weather-forecast}) add

--enable-weather-xoap

to the ./configure line you use in Step 5.

mpd Support - Untested
Remove

--disable-mpd

from the ./configure line you use in Step 5 to enable mpd support.

moc Support - Untested
Remove

--disable-moc

from the ./configure line you use in Step 5 to enable moc support.

xmms2 Support - Untested
To enable xmms2 support in conky add

--enable-xmms2

to the ./configure line you use in Step 5.

You also need an additional build dependency that can be installed on Debian with this command.

sudo apt-get install libxmmsclient-dev

Audacious Support - Untested
To enable Audacious support in conky add

--enable-audacious

to the ./configure line you use in Step 5.

You also need an additional build dependency that can be installed on Debian with this command.

sudo apt-get install audacious-dev

Eve Online Support - Untested
To enable Eve Online support in conky add

--enable-eve

to the ./configure line you use in Step 5.

Enable IBM Support - Untested
To enable support for IBM/Lenovo notebooks add

--enable-ibm

to the ./configure line you use in Step 5.


Building with equivalent options to the "conky-all" Debian Package - Untested
This will build conky with the same options as the conky-all package in Debian.

Install build dependencies with this command.

sudo apt-get install build-essential automake git docbook2x libxfixes-dev libasound2-dev libcairo2-dev libcurl4-gnutls-dev libglib2.0-dev libimlib2-dev libiw-dev liblua5.1-0-dev libncurses5-dev libtolua++5.1-dev libtool libx11-dev libxdamage-dev libxext-dev libxft-dev libxml2-dev libxnvctrl-dev libxmmsclient-dev audacious-dev

Use this configure command in Step 5.

./configure --enable-wlan --enable-nvidia --enable-imlib2 --enable-lua-cairo --enable-lua-imlib2 --enable-rss --enable-weather-xoap --enable-xmms2 --enable-audacious --enable-eve --enable-ibm

Last edited by arclance (2014-07-13 00:37:05)

Offline

#3 2012-06-21 02:55:00

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: How To Build And Install Conky

Reserved 2: Reserved Strikes Back
Changelog

2014-07-12
Added instructions for other conky build options.
Added instructions for building with the same options as the Debian "conky-all" package.

Last edited by arclance (2014-07-13 00:55:44)

Offline

#4 2012-06-27 18:16:13

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: How To Build And Install Conky

arclance wrote:

The version of patch 2 which fixes the horizontal postion of shades drawn when using "draw_shades yes" in your .conkyrc from the master branch has been applied to the 1.9.1 branch in git.

I tested the 1.9.1 branch using this patch and it does not work.
If this is not fixed in the next few days I will make a patch 2 for v1.9.1.
The old patch will still work with v1.9.0.

This bug is now fixed in git branch 1.9.1.

Last edited by arclance (2012-06-27 21:45:28)

Offline

#5 2012-08-13 23:32:25

VastOne
#! Ranger
From: V-Ger
Registered: 2011-04-26
Posts: 10,165
Website

Re: How To Build And Install Conky

Added to Quick References, nice work and How To arclance!


VSIDO | Words That Build Or Destroy

I dev VSIDO

Offline

#6 2012-08-14 00:02:34

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: How To Build And Install Conky

^ Thanks.

As a heads up to everyone there is a memory leak in all top objects (top, top_io, top_mem, and top_time).
I see it when they are called from a lua script but I don't know if the also leak when called in the TEXT section of a .conkyrc.
The memory leak introduced by a recent commit was fixed but an old unnoticed leak was not.

This is what one of the conky devs has to say about when this will be fixed.

pavelo wrote:

Does the leak grow with time? It is my impression that it is constant. If
that is the case I would leave it for now.

I do not like leaks like this, but I do not want to expend effort in
solving things like this, because I have a feeling that If I started, I
would end up rewrting most of top.c. I think I'll leave this for conky 2.0,
where it will get rewritten anyway (and i'll make sure it doesnt leak
there)

cheers,
pavelo

Does anyone have any idea when conky 2.0 will be released (I don't think it will be anytime soon)? Was released as v1.10.0 in July 2015.
What do you think about this timeline for fixing the bug.

Last edited by arclance (2015-07-18 03:36:57)

Offline

#7 2014-07-13 00:40:43

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: How To Build And Install Conky

UPDATE 2014-07-12
I added a section on conky build options not covered in the basic build covered in the first post.
I also added instructions for building conky with the same options as the "conky-all" package in Debian.
I have not tested all of these personally so please let me know if there is a problem with the instructions I have written.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo