Kali Linux 2.0 Tutorials : How To Install and configure Conky

How To Install Conky on Kali Linux 2.0 (Kali Sana) :


Kali Linux 2.0 install and config conky
Conky is a system monitor for X originally based on the torsmo code.
This guide will step you through initial installation and configuration of Conky for Kali Linux 2.0 (Kali Sana).

Installing Conky :

apt-get install conky-all
apt-get install conky-manager

Configure Conky :

Edit conky config:
gedit /etc/conky/conky.conf


Select all the text and replace it with :
   ################################
    ##     Visit : K4Linux.coM                    
    ##                                             
    ##      Like : fb.com/K4linux  
    ##                                     
    ##                                     
    ##        Follow : Twitter.com/k4linux   
    ##                                                                       
    ################################

    background yes
    use_xft yes
    xftalpha 0.6
    own_window true
    own_window_type desktop
    own_window_argb_visual true
    # 0 = transparent, 255 = solid
    own_window_argb_value 160
    double_buffer yes
    update_interval 1
    maximum_width 200
    alignment top_right
    gap_x 10
    gap_y 10
    no_buffers yes
    uppercase no
    cpu_avg_samples 5
    net_avg_samples 5
    diskio_avg_samples 5
    if_up_strictness address
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    default_color lightgray
    default_shade_color red
    default_outline_color green
    short_units true
    use_spacer none
    xftfont DejaVu Sans Mono:size=10
    template0 ${font Open Sans:Bold:size=10}${color dodgerblue3}\1 ${hr 2}$color${font}${voffset 1}
    template1 \1 ${alignr\ 80}${fs_bar\ \1}
    template2 ${\1 name \2}${alignr}${\1 \3 \2} %
    template3 ${if_up \1}${template0 \2}\ndown $alignr ${downspeed \1}/s\nup $alignr ${upspeed \1}/s\ntotal down$alignr${totaldown \1}\ntotal up $alignr${totalup \1}$endif
    #${execi 30 sudo hddtemp /dev/sda | grep '/dev/sda:' | cut -c28-29}°C

    TEXT
    $color${font}${font Open Sans:size=44}$alignr${time %H:%M}$font$color${font Open Sans:size=15}
    $alignr${time %a}, ${time %d %b %Y}$font$color

    # SYS
    ${template0 SYSTEM}
    Kernel $alignr $kernel
    Uptime $alignr $uptime
    Temprature $alignr ${acpitemp}°C
   
    # CPU
    ${template0 CPU}
    $color${font}Intel i5 2500k $alignr $cpu %
    ${cpugraph}
    # RAM
    ${template0 RAM}
    In use $alignr $mem
    Used$alignr$memeasyfree
    Buffers $alignr $buffers
    Cache $alignr $cached
    # NETWORK
    ${template3 eth0 ETH0}${template3 wlan0 WLAN0}
    # TOP
    ${template0 TOP}
    $color${font Open Sans:bold:size=8}CPU$font
    ${template2 top 1 cpu}
    ${template2 top 2 cpu}
    ${template2 top 3 cpu}${voffset 5}
    $color${font Open Sans:bold:size=8}RAM$font
    ${template2 top_mem 1 mem}
    ${template2 top_mem 2 mem}
    ${template2 top_mem 3 mem}
    # HDD
    ${template0 HDD}
    ${template1 /}
    ${template1 /boot}
    ${template1 /var}
    ${template1 /usr}
    ${template1 /home}
    ${template1 /mnt/data}
    $color${font Open Sans:bold:size=8}/dev/sda $font$alignr ${hddtemp /dev/sda}°C
    ${diskiograph sda}
Or use the same configuration that you see in our videos tutorials :

#######################
# Config for Conky By K4linux
#
########################

########################
alignment top_left
gap_x 1930
gap_y 50
maximum_width 320
minimum_size 1280 50

# General
update_interval 2.0
double_buffer yes
draw_outline no
border_width 0
default_bar_size 0 5

# Window
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_colour 000000
own_window_transparent yes
own_window_hints undecorated below sticky skip_taskbar skip_pager

# Specific settings
cpu_avg_samples 2
net_avg_samples 2
no_buffers yes

# Output
use_spacer none
use_xft yes
xftfont Terminus:pixelsize=12
draw_shades no
uppercase no

# Colors (1 = Text; 2 = Data; 3 = heading)
color1 AAAAAA
color2 FFFFFF
color3 999999
color4 1793D0
color5 0050BF

# Templates (1 = Simple; 3 = Filesystem; 4 = Filesystem 2; 5 = Heading; 6 = Core temperature; 7 = Cpu load)
template1 ${color1}\1 ${color2}\2
template2 ${color1}\1 ${color2}\2/\3 (\4%)
template3 ${color1}\1: ${color2}${fs_used \1}/${fs_size \1} (${fs_used_perc \1}%) ${fs_bar \1}
template4 ${color1}\1: ${color2}$alignr${fs_free \1} ${fs_bar 5,120 \1}
template5 ${font Neuropolitical:bold:size=8}${color4}\1 ${font}${hr 2}
#template6 (core max_temp) e.g. (${template6 'Core\ 0' 60}
template6 ${execi 2 sensors | grep -A 0 \1 | cut -c18-19}${goto 100}${if_match ${execi 2 sensors | grep -A 0 \1 | cut -c18-21}<\2}${color}${execibar 2 sensors | grep -A 0 \1 | cut -c18-19}${endif}${if_match ${execi 2 sensors | grep -A 0 \1 | cut -c18-21}>=\2}${color red}${execibar 2 sensors | grep -A 0 \1 | cut -c18-19}${color}${endif}${goto 96}${color white} ${execbar echo 0}${color}
#template7 (cpu_no max_temp) e.g. (${template6 cpu1 60}
template7 ${cpu \1}${goto 100}${if_match ${cpu \1}<\2}${cpubar \1}${endif}${if_match ${cpu \1}>=\2}${color5}${cpubar \1}${color}${endif}${color}${goto 1}${color white}${goto 100}${execbar echo 0}${color}


#####################################
# Output
TEXT
${image ~/conky/arch_logo_48.png -s 35x35} ${font Neuropolitical:pixelsize=25}${alignr}K4${color #1793d0}linux
${voffset -10}${goto 50}${color2}${font Neuropolitical:size=6}A simple, lightweight distribution
${alignc}${offset -30}${color2}${font Neuropolitical:pixelsize=48}${time %H:%M}${font}
${alignc}${color  white}${font Neuropolitical:pixelsize=11}${time %A %d %B %Y}${font}

${template5 SYSTEM\ INFORMATION}
${color1}Hostname: ${color2}$nodename \
 | ${color1}Kernel: ${color2}$kernel
${color1}Time: ${color2}${time %Y-%m-%d %H:%M} \
 | ${color1}Uptime: ${color2}$uptime_short

${template5 CPU\ AND\ PROCESSES}
${color1}Usage: ${color2}${cpu}% \
 | ${color1}Freq: ${color2}$freq_g GHz \
| ${color1}Load: ${color2}$loadavg
Cpu  1(%): ${template7 cpu1 99}
Cpu  2(%): ${template7 cpu2 99}
Cpu  3(%): ${template7 cpu3 99}
Cpu  4(%): ${template7 cpu4 99}
Cpu  5(%): ${template7 cpu5 99}
Cpu  6(%): ${template7 cpu6 99}
Cpu  7(%): ${template7 cpu7 99}
Cpu  8(%): ${template7 cpu8 99}

Core 0(${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C): ${template6 'Core\ 0' 60}
Core 1(${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C): ${template6 'Core\ 1' 60}
Core 2(${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C): ${template6 'Core\ 2' 60}
Core 3(${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C): ${template6 'Core\ 3' 60}

${color1}Processes: ${color2}$processes \
 | ${color1}Running: ${color2}$running_processes
${color white}NAME${alignr}${offset -70}PID${alignr}${offset -38}CPU${alignr}MEM
${color #FFFFFF}${top name 1}${alignr}${offset -40}${top pid 1}${alignr}${offset -20}${top cpu 1}  ${alignr}${top mem 1}
${color #EFEFEF}${top name 2}${alignr}${offset -40}${top pid 2}${alignr}${offset -20}${top cpu 2}  ${alignr}${top mem 2}
${color #DFDFDF}${top name 3}${alignr}${offset -40}${top pid 3}${alignr}${offset -20}${top cpu 3}  ${alignr}${top mem 3}
${color #CFCFCF}${top name 4}${alignr}${offset -40}${top pid 4}${alignr}${offset -20}${top cpu 4}  ${alignr}${top mem 4}
${color #BFBFBF}${top name 5}${alignr}${offset -40}${top pid 5}${alignr}${offset -20}${top cpu 5}  ${alignr}${top mem 5}

${template5 MEMORY\ AND\ SWAP}
${color1}RAM:  ${color2}$mem/$memmax ($memperc%)
${if_match $memperc <85 5="" endif="" goto="" if_match="" membar="" memperc="">=85}${goto 5}${color red}${membar 5}${color}${endif}${goto 5}${execbar echo 0}
${color1}SWAP: ${color2}$swap/$swapmax ($swapperc%)
${swapbar 5}

${template5 NETWORK}
${if_gw}\
${template1 Network: Online}
${template1 DGW: $gw_ip\ ($gw_iface)} \
| ${template1 Nameserver: $nameserver}
\
${if_up usb0}
${color1}Interface:${color2} usb0 \
| ${color1}IP-Address:${color2} ${addr usb0}
${color1}Speed:${color2} Down: ${downspeedf usb0} / Up: ${upspeedf usb0}
${downspeedgraph usb0 20,150 000000 FFFFFF} ${alignr}${color #CFCFCF}\
${upspeedgraph usb0 20,150 000000 CFCFCF}
${endif}\
\
${if_up br0}
${color1}Interface:${color2} br0 \
| ${color1}IP-Address:${color2} ${addr br0}
${color1}Speed:${color2} Down: ${downspeedf br0} / Up: ${upspeedf br0}
${downspeedgraph br0 20,150 000000 FFFFFF} ${alignr}${color #CFCFCF}\
${upspeedgraph br0 20,150 000000 CFCFCF}
${endif}\
\
${if_up wlan0}
${template1 Interface: wlan0} \
| ${color1}IP-Address:${color2} ${addr wlan0}
${color1}ESSID:${color2} ${wireless_essid wlan0} \
| ${color1}Quality:${color2} ${wireless_link_qual_perc wlan0}%
${color1}Speed:${color2} Down: ${downspeedf wlan0} / Up: ${upspeedf wlan0}
${downspeedgraph wlan0 20,150 000000 FFFFFF} ${alignr}${color #CFCFCF}\
${upspeedgraph wlan0 20,150 000000 CFCFCF}
${endif} \
${else}\
${template1 Network: Offline}
${endif}

${font Neuropolitical:bold:size=8}${color4}${exec nvidia-smi -a | grep Product\ Name | awk -F':' '{$2=substr($2,2,length($2)); print $2}'}${font} ${hr 2}${color}
 Driver Version: ${color2}${exec nvidia-settings -query NvidiaDriverVersion | grep v-arch | awk '{print $4}'}${color3}
 Freq ${color2}${execi 10 nvidia-settings -query GPUCurrentClockFreqs | grep v-arch | awk -F':' 'NR==1{ print $3}' | awk -F',' '{$1=substr($1,2,length($1)); print $1}'} Mhz ${color3}@ \
 ${color2}${execi 2 nvidia-settings -query GPUCoreTemp | grep v-arch | awk 'NR==1 {$0=substr($0,1,length($0)-1); print $4}'}\
 ${iconv_start UTF-8 ISO_8859-1}° ${iconv_stop}C ${color3}
 Fan Speed ${color2}${execi 2 nvidia-smi -a | grep Fan\ Speed | awk -F':' '{print $2}'}${color3}
 Memory ${color2}${execi 10 nvidia-smi -q -d MEMORY | grep Used | awk -F':' '{print $2}'}${color3} \
| ${color2}${execi 10 nvidia-smi -q -d MEMORY | grep Total | awk -F':' '{print $2}'}${color3} \
| ${color2}${execi 10 nvidia-smi -q -d MEMORY | grep Free | awk -F':' '{print $2}'}${color3}
 Memory Freq ${color2}${execi 10 nvidia-settings -query GPUCurrentClockFreqs | grep v-arch | awk -F':' 'NR==1{ print $3}' | awk -F',' '{$2=substr($2,1,length($2)-1); print $2}'} Mhz${color3}

${template5 FILESYSTEMS}
${template4 /}
${template4 /home}
${template4 /mnt/storage}
${template4 /mnt/games}
${template4 /tmp}


Watch the video tutorial for more explanation :




If you have encountered a problem or you have any questions or remarks please feel free to set a comment.
 
Website Traffic Exchange
Share on Google Plus

About Admin

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

8 commentaires :

  1. helo..
    Why can not I use the above methods

    RépondreSupprimer
  2. Conky can run ,but I can not bring up a widget

    RépondreSupprimer
  3. saya instal ulang conky dan mencoba cara lainnya tetapi masih menemukan kendala .....

    dpkg -i conky-manager-latest-i386.deb

    missing dependencies

    Commands listed below are not available:

    * conky

    Please install required packages and try running it again

    RépondreSupprimer
  4. I re-install conky and tried other ways but still find obstacles .....

    dpkg -i conky-manager-latest-i386.deb

    missing dependencies

    Commands listed below are not available:

    * conky

    Please install required packages and try running it again

    RépondreSupprimer
  5. At the top I am seeing ${image} next to K$linux

    RépondreSupprimer
  6. i want add networkbar under network what i must add ?

    RépondreSupprimer
  7. Please fix this:

    Conky: Bad arguments: '21 ' and '85 5="" endif="" goto="" if_match="" membar="" memperc="">=85'
    Conky: compare failed for expression '21 <85 5="" endif="" goto="" if_match="" membar="" memperc="">=85'

    RépondreSupprimer