Page 1 of 6 123 ... LastLast
Results 1 to 10 of 56

Thread: How-to compile and install conky 1.4.5 from source

  1. #1
    Join Date
    Jan 2006
    Location
    Edge of Time
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    How-to compile and install conky 1.4.5 from source

    Disclaimers and such.
    ----------------------
    UPDATE: Conky 1.4.5 is now in the feisty repos. If you run feisty, it would probably be better to install using apt-get or synaptic

    This is my first how to and it's really just a compilation of information I found on these forums. There are a number of good how-tos but it seemed I was looking here and there for everything. Hopefully this will simplify the situation. I also hope there isn't something like this already - I did try to find one. With any luck this might save others some time so here goes.

    In case you are unaware, conky is a lightweight system monitor that displays on your desktop. See the screenshots below.

    There could very well be some mistakes here or steps I gloss over and shouldn't so if anyone has suggestions for improvement please post and I'll amend.

    These instructions are for installing the newest (at the time of writing) conky 1.4.5 from source on Ubuntu-Edgy. This is a simple program so it should work on other versions as well. This was much easier than I thought so don't be afraid.

    There is an excellent how to for conky 1.4.2 here so you might try that first. That version of conky works very nicely but 1.4.5 seems a bit faster and has some features for formatting that I found particullary useful for what I wanted (particularly the goto option for layout). The rest of the info came primarily from here. Thanks crimesaucer.

    In order for CPU temps and other hardware sensing to work you will probably need to configure lm-sensors. Here is a good how-to for that. It's a slightly confusing process but I eventually got it to work.
    ----------------------

    Okay, lets get started.

    Install dependencies

    There are some needed packages to do the compile and for conky...

    Code:
    sudo apt-get install libxext-dev lm-sensors build-essential checkinstall wmctrl
    I'm not sure about the wmctrl package or what, exactly, it does. Some how tos have a line in the .conkyrc for it. I deleted that line from my .conkyrc and it is not included below. There are some suggestions that it doesn't work with beryl.

    These files are also apparently needed (thanks eXisor)

    Code:
    sudo apt-get install libglib2.0-dev libxft-dev libx11-dev libxdamage-dev
    Download Source

    Now you need to download and untar the source.

    Visit http://conky.sourceforge.net/ and follow the links to the download file. I'm not direct linking in case something changes. There are a couple option. I used the one entitled "conky-1.4.5.tar.gz (Platform-Independent Source .gz)". Others may work too.

    Save it where you want and untar. I just saved to the desktop and then right clicked and said extract here. Change directory to the untared folder.

    Begin the Install

    Code:
    cd Desktop
    cd conky-1.4.5
    Now comes the fun part...

    Do each of these one at a time. If you get any errors it's probably because of dependencies. I hope the above named packages are all that is needed but if you have problems post back and I'll see if I can figure it out.

    Code:
    ./configure
    make
    A lot of stuff probably went flying by but you can safely ignore it. If you didn't receive any errors you are now ready to install. There are two ways to finish the install that I am aware of - a "traditional" method and potentially better method. Most source packages you download will give you traditional instructions. If you want to be able to uninstall the package later or easily reinstall it, use the second method.

    Traditional

    Type the following into the terminal after the "make" process finished
    Code:
    sudo make install
    To clean up...
    Code:
    make clean
    Conky is now installed and ready to use. See below for configuring instructions.

    Alternative "checkinstall" method

    This process will create a .deb file. A .deb is the standard format for a Debian based Linux distro. It is somewhat akin to a .exe in Windows. In Ubuntu (I don't know about other distros) double clicking a .deb will open a gui to do the install. This process will not only make the .deb but do the install as well. When it finishes you will have conky installed and a .deb file in the folder. You might want to save the .deb in case you need to reinstall later.
    Code:
    sudo checkinstall
    Answer the questions. After you type in a description and press enter you have to press enter a second time to get it to continue. It then shows you a list of options you can change. I have no idea what any of them are for. Just press enter again and it will finish. When this finishes you are done. Save the .deb and trash the folder if you want.

    If you want to remove conky at some time in a terminal type
    Code:
    sudo dpkg -r conky
    Edit xorg.conf

    You also need to make a slight modification to your xorg.conf file to help the display. I did not make this modification at first and I had no problems until I started to use beryl. It may not be necessary if you don't use beryl. This change does not seem to cause any problems.

    Code:
    sudo gedit /etc/X11/xorg.conf
    Find the section called "Module" and add

    Code:
    Load "dbe"
    Save and close. You may need to reboot or restart X (ctrl-alt-backspace) for that change to take effect.

    Create and Save conky config file

    If all that went well, conky is now installed but not yet ready to use. You need to create a config file in your /home/username called .conkyrc. The above mentioned 1.4.2 how to has great directions on how to do this. Here is a quick and dirty run through.

    Here is a sample .conkyrc. It is a slightly modified version from the 1.4.2 how to for dual core cpu and a bit less output on the screen. You can copy this to start with and modify to your hearts content later. For more info on what variables and options are available go to the conky homepage and read the documentation.

    Code:
    # Conky sample configuration
    #
    # the list of variables has been removed from this file in favour
    # of keeping the documentation more maintainable.
    # Check http://conky.sf.net for an up-to-date-list.
    
    # set to yes if you want Conky to be forked in the background
    background no
    
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    
    
    # Use Xft?
    use_xft no
    
    # Set conky on the bottom of all other applications
    own_window_hints below
    
    # Xft font when Xft is enabled
    xftfont Bitstream Vera Sans Mono:size=9
    
    # Text alpha when using Xft
    xftalpha 0.8
    
    # Print everything to stdout?
    # out_to_console no
    
    # MPD host/port
    # mpd_host localhost
    # mpd_port 6600
    # mpd_password tinker_bell
    
    # Print everything to console?
    # out_to_console no
    
    # mail spool
    mail_spool $MAIL
    
    # Update interval in seconds
    update_interval 3.0
    
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type override
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # If own_window_transparent is set to no, you can set the background colour here
    #own_window_colour #C0C8CD
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 280 5
    
    # Draw shades?
    draw_shades no
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment none
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 12
    gap_y 35
    
    # Subtract file system buffers from used memory?
    no_buffers yes
    
    # set to yes if you want all text to be in uppercase
    uppercase no
    
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    
    
    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer no
    
    #   mldonkey_hostname     Hostname for mldonkey stuff, defaults to localhost
    #   mldonkey_port         Mldonkey port, 4001 default
    #   mldonkey_login        Mldonkey login, default none
    #   mldonkey_password     Mldonkey password, default none
    
    # boinc (seti) dir
    # seti_dir /opt/seti
    
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    ${color black}$nodename $sysname $kernel on $machine
    ${color #C0C8CD}UpTime: ${uptime}   Load: ${loadavg}
    ${color black}$stippled_hr
    ${color black}CPU Usage: $cpu  %   CPU: ${freq}mhz ${alignr}Temp: ${acpitemp}
    ${color black}${cpugraph cpu0 000000 C0C8CD}
    ${color black} CPU0: ${cpu cpu1}% 
    ${color #C0C8CD}${cpubar cpu1} 
    ${color black} CPU1: ${cpu cpu2}% 
    ${color #C0C8CD}${cpubar cpu2}
    ${color black}Processes:${color #C0C8CD} $processes  ${color black}  Running:${color #C0C8CD} $running_processes
    
    ${color black}Name              PID     CPU%   MEM%
    ${color blue} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
    ${color #C0C8CD} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
    ${color #C0C8CD} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
    ${color #C0C8CD} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
    ${color black}Mem usage
    ${color blue} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
    ${color #C0C8CD} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
    ${color #C0C8CD} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
    ${color black}$stippled_hr
    ${color black}RAM:     ${color #C0C8CD}$memperc% ${membar}
    ${color black}Swap:     ${color #C0C8CD}$swapperc% ${swapbar}
    
    ${color black}Root:     ${color #C0C8CD}${fs_size /} - ${fs_free_perc /}% free   ${fs_bar /}
    ${color black}Home:    ${color #C0C8CD}${fs_size /home} - ${fs_free_perc /home}% free   ${fs_bar /home}
    ${color black}$stippled_hr
    ${color black}Networking: ${color #C0C8CD}(${addr eth1})
    ${color black} Down:${color #C0C8CD} ${downspeed eth1} k/s${color black} ${alignr}Up:${color #C0C8CD} ${upspeed eth1} k/s
    ${color black}${downspeedgraph eth1 32,125 C0C8CD 0000ff} ${alignr}${color black}${upspeedgraph eth1 32,125 C0C8CD ff0000}
    ${color black}$stippled_hr
    Code:
    gedit /home/username/.conkyrc
    Paste the above into the file modifying as you wish. Save and close.

    To run, press alt-F2 and type "conky" (no quotes).

    You should now see conky on your screen.

    To have conky autostart on login create a small bash script called .conky_start.sh and save it to your /home.

    Code:
    gedit .conky_start.sh
    copy the code below and past into the file. Save and close

    Code:
    #!/bin/bash
    sleep 10 && conky;
    This would start conky after 10 seconds after you login. The delay can be changed. Some sort of delay is desirable if you autostart beryl as well since conky works best if started after beryl. Make sure the script is executable:

    Code:
    chmod a+x .conky_start.sh
    Now, add it to your startup programs (menu: system->preferences->session->startup programs).

    Congrats. You are now the proud owner of your very own conky 1.4.5.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	conky-dualcore.jpg 
Views:	903 
Size:	37.2 KB 
ID:	24532   Click image for larger version. 

Name:	conky.jpg 
Views:	767 
Size:	968.5 KB 
ID:	24533  
    Last edited by m.musashi; April 27th, 2007 at 04:12 AM. Reason: fix mistakes, add clarification

  2. #2
    Join Date
    Jan 2007
    Location
    Batangas, Philippines
    Beans
    62

    Re: How-to compile and install conky 1.4.5 from source

    Nice how to, and it works for me , but my desktop icon and conky disappears for a few seconds, but when i highlight it appears again. I edit the xorg.conf like you said because I sometimes use beryl. Is there a way fix this?

    Thanks

  3. #3
    Join Date
    Jan 2006
    Location
    Edge of Time
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How-to compile and install conky 1.4.5 from source

    Quote Originally Posted by xtrm_redbull View Post
    Nice how to, and it works for me , but my desktop icon and conky disappears for a few seconds, but when i highlight it appears again. I edit the xorg.conf like you said because I sometimes use beryl. Is there a way fix this?

    Thanks
    Are you using gnome or kde (or something else)? There are some issues with conky and kde with disappearing icons. I actually haven't tried 1.4.5 with kde but I suspect it's the same issue. There are some work arounds for kde. I'll find the links and post back. If gnome, these settings are supposed to take care of that:
    Code:
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type override
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    If you have it set that way, you can also try setting own_window_type to desktop and see if that helps.

    Let me know what window manager you're using and I'll see what else I can do.

  4. #4
    Join Date
    Jan 2007
    Location
    Batangas, Philippines
    Beans
    62

    Re: How-to compile and install conky 1.4.5 from source

    Im using gnome and xfce, window manager. I check my .conkyrc setting and I saw the codes in your post already there. Thanks

  5. #5
    Join Date
    Jan 2006
    Location
    Edge of Time
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How-to compile and install conky 1.4.5 from source

    Quote Originally Posted by xtrm_redbull View Post
    Im using gnome and xfce, window manager. I check my .conkyrc setting and I saw the codes in your post already there. Thanks
    Okay, I did a bit more research. Most of this comes from the how to for 1.4.2 that I referenced in the first post. As I don't have xfce right now I can't try this. If these fixes don't work I'll install it and see if I can replicate the problem.

    If I understand, you are running Ubuntu with the xfce WM and sometimes use beryl. With this set up, conky and your desktop icons disappear from time to time (or is it all time?). The problem and fix probably has something to do with the settings I pointed out in the last post. Try changing them in various ways. For xfce, this is the recommended set up
    Code:
    own_window yes
    own_window_type override
    own_window_transparent yes
    However, if you are using compiz (beryl is very similar) and AIGLX then this is recommended
    Code:
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    Try them and see what happens.

    You might also add this to the end of the .conkyrc
    Code:
    ${execi 30 wmctrl -a conky}
    It is supposed to ensure that conky is on the root window. It does it every 30 seconds so if it disappears it should come back. You will have to have installed the wmctrl package as well. This line seems to cause some problems of it's own so you may solve one thing and end up with another.

    If none of this works, can you log into gnome and see what it does there? It would help to know if it's specifically a xfce thing or not.

    Hope this helps.

  6. #6
    Join Date
    Jan 2007
    Location
    Batangas, Philippines
    Beans
    62

    Re: How-to compile and install conky 1.4.5 from source

    Hi there, Ive tried the settings you gave, but conky still flickers, but the icons are ok, in both gnome and xfce. Anyway I decided to copy other .conkyrc in the forums to test it in my laptop, and ive found one that flickers less, maybe the problem is in my system specs, since all of the .conkyrc i tested flickers. Thanks again.

  7. #7
    Join Date
    Jan 2006
    Location
    Edge of Time
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How-to compile and install conky 1.4.5 from source

    Hmm. flickers in gnome too. About all I've ever heard about flickering in gnome is solved by adding
    Code:
    Load "dbe"
    to the xorg.conf file. If you followed that part in the how to and made sure it's in the right section then I'm not really sure what could be the cause. Sorry I can't be of more help. I'll post back if I find anything.

  8. #8
    Join Date
    Jul 2006
    Beans
    8

    Re: How-to compile and install conky 1.4.5 from source

    i had conky running great on my ubuntu system a while ago, now im on a kubuntu machine and its not working right. it works, and has all the right info, it just looks wrong. instead of being transparent its black background, and some of the text is black too, so you cant see it.

  9. #9
    Join Date
    Jan 2006
    Location
    Edge of Time
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How-to compile and install conky 1.4.5 from source

    Yeah, there are some issues with KDE that seem to be mostly related to how it draws (or doesn't draw) to the root desktop. Post your .conkyrc and I'll see if I see anything that you might change. Also, in KDE right click the desktop and choose properties (I think - I'm doing this from memory as I don't have KDE installed anymore). Somewhere in there is a checkbox for show icons on the desktop and another one underneath that. I forget which one is the important one so uncheck them both and apply and then recheck them. then launch conky and it should look transparent. This is temporary and the next time you log in it will be back to black. There is a fix that involves setting the desktop wallpaper to the root desktop but I don't remember how to do that. I'll try and find it.

  10. #10
    Join Date
    Jul 2005
    Location
    Quebec City, Québec
    Beans
    60

    Re: How-to compile and install conky 1.4.5 from source

    Magnificent HowTo !
    If only everyone with conky bugs could read this post first...

    Ive noticed that some flickering occurs even when dbe is loaded in XORG.conf
    Check your conky display: sometimes certain process names are longer and make conky appear to flicker... I overcame this by making the width larger
    Last edited by u-blunt-2; March 7th, 2007 at 03:32 AM.
    q6600 @ 3.6 GHz WC -- EVGA 680i A1
    3GB crucial ballistix tracer -- EVGA 8800GTS 640MB
    TrendNet TEW-423 PI wifi

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •