Conky does not work properly on Ubuntu 16.04 GNOME

I have this strange problem with conky. It doesn't show properly on the desktop:

It doesn't shown properly on the desktop.

I've tried everything from editing conky widget file to reinstalling conky and conky manager (v.2.4). Who knows how to fix it?


Solution 1:

I had the same issue lately with conky 1.10.1 on Ubuntu 16.04.1. I did not roll back conky. I fixed the issue by changing the line

own_window_type = 'desktop',

in my .conkyrc to

own_window_type = 'dock',

After all, my .conkyrc for Ubuntu 16.04.1 reads


os.execute("sleep 1")

conky.config = {
    background = true,
    double_buffer = true,
    alignment = 'top_right',
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'black',
    default_shade_color = 'black',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_type = 'dock',
    own_window_transparent = false,
    own_window_argb_visual = true,
    own_window_argb_value = 64,
    own_window_colour = 'black',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    minimum_width = 170, minimum_height = 0,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
    use_xft = true,
    xftalpha = 0.1,
    font = 'Droid Sans:size=11',
    color0 = 'white',
    color1 = 'EAEAEA',
    color2 = 'FFA300',
    color3 = 'grey'
}

conky.text = [[
${font AvantGardeLTMedium:bold:size=11}${color Tan1}System ${color slate grey}${hr 2}${font}
${color1}Computer name      ${alignr}${color}${nodename}
${color1}Kernel version     ${alignr}${color}${kernel}-${machine}
${color1}CPU frequency      ${alignr}${color}${freq_g}GHz
${color1}Load (average)     ${alignr}${color}${loadavg 1}
${color1}CPU temperature    ${alignr}${color}${acpitemp} degrees Celsius

${if_existing /sys/class/power_supply/BAT0/uevent}${font AvantGardeLTMedium:bold:size=11}${color Tan1}Laptop battery charge ${color slate grey}${hr 2}${font}
${color1}Battery charge     ${alignr}${color}${battery BAT0}${endif}
${if_existing /sys/class/power_supply/BAT1/uevent}${font AvantGardeLTMedium:bold:size=11}${color Tan1}Laptop battery charge ${color slate grey}${hr 2}${font}
${color1}Battery charge     ${alignr}${color}${battery BAT1}${endif}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Processors ${color slate grey}${hr 2}${font}
${color1}Kernel 1     ${color}${cpu cpu1}%  ${cpubar cpu1}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Memory (RAM) ${color slate grey}${hr 2}${font}
${color1}Memory free / total ${alignr}${color}${memeasyfree} / ${memmax}
${color1}Now in use   ${color}${memperc}%   ${membar}
${color1}Virtual memory (swap)  ${alignc}${color}${swap} / ${swapmax} ${color}${alignr}${swapperc} %

${font AvantGardeLTMedium:bold:size=11}${color Tan1}File system ${color slate grey}${hr 2}${font}
${color1}Root or /       ${alignc}${color}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
${color}${fs_bar 5,300 /}
${color1}Home or /home   ${alignc}${color}${fs_used /home} / ${fs_size /home} ${color}${alignr}${fs_free_perc /home} %
${color}${fs_bar 5,300 /home}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Wireless network ${color slate grey}${hr 2}${font}
${if_existing /proc/net/route wlp3s0}${color1}Wireless access point ${alignr}${color}${wireless_essid wlp3s0}${endif}
${color1}Signal strength     ${alignr}${color}${wireless_link_qual_perc wlp3s0}   ${wireless_link_bar 10,100 wlp3s0}
${color1}Data traffic down / up   ${alignr}${color}${totaldown wlp3s0}  ${color1}/  ${color}${totalup wlp3s0}
]]

My .conkyrc produces output as follows:

enter image description here

Solution 2:

It seems as though the 1.10 version of Conky is broken for now and some people are going back to the 1.9 version.

I can get just a few of them to work but, it took some time and tweaking just to get the few to work. So maybe this is a better option to just roll back then pulling out your hair trying to get them to work right.

From: Rolling back Conky to 1.9:

  1. See which conky version is in installed on my 16.04 (Xenial) machine:

    $ conky -v | head -n 1 | cut -d" " -f 2
    1.10.1
    
  2. Remove this borked conky and purged it's configurations and leftover dependencies:

    sudo apt-get remove --purge conky-std && sudo apt-get autoremove
    
  3. I wanted conky version 1.9, which is not in the Ubuntu Xenial repos, so I snagged the package that shipped with Trusty:

    wget http://security.ubuntu.com/ubuntu/pool/universe/c/conky/conky-std_1.9.0-4_amd64.deb
    
  4. Once I had the .deb package downloaded, I installed it with gdebi rather dpkg so it would also install the necessary dependencies:

    sudo gdebi conky-std_1.9.0-4_amd64.deb
    
  5. Check the version that is installed:

    $ conky -v | head -n 1 | cut -d" " -f 2
    1.9.0
    
  6. Pin the package at the 1.9.0 version so future package updates don't revert us back up to the bad version:

    sudo apt-mark hold conky-std
    

This is what I have working for now.