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: 819

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 don't use any of the music players supported by conky so I don't know how to build those in yet.
If you use one of these music players I can try and figure those out if you are willing to test build instructions for me.

I 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://git.omp.am/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://git.omp.am/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
    For now I have only covered building with and without Nvidia support.
    I will add more sections later if there is interest in them.
   
    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 with 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
    Build options are not the same as debian packages.
    See "Build Options Not Covered In The Instructions" for more information.
   
    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.

Build Options Not Covered In The Instructions
    If you are willing to help me test building for features I don't use I will add build instructions for them.

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 also have not been able to make a functional build of the master branch so I cannot write instructions for it.

Last edited by arclance (2012-08-13 23:48:16)

Offline

Be excellent to each other!

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

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

Re: How To Build And Install Conky

Reserved

Offline

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

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

Re: How To Build And Install Conky

Reserved 2: Reserved Strikes Back

Offline

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

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

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: #! Fringe Division
Registered: 2011-04-26
Posts: 9,700
Website

Re: How To Build And Install Conky

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


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

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

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

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)?
What do you think about this timeline for fixing the bug.

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.

Debian Logo