Conky 在 Ubuntu 16.04 GNOME 上无法正常工作

dev*_*ial 7 conky ubuntu-gnome 16.04

我对 conky 有这个奇怪的问题。它在桌面上没有正确显示:

它在桌面上没有正确显示。

我已经尝试了从编辑 conky 小部件文件到重新安装 conky 和 ​​conky manager (v.2.4) 的所有方法。谁知道怎么修?

dzm*_*nto 4

我最近在 Ubuntu 16.04.1 上使用 conky 1.10.1 时遇到了同样的问题。我没有回滚conky。我通过更改线路解决了这个问题

own_window_type = 'desktop',
Run Code Online (Sandbox Code Playgroud)

在我的 .conkyrc 中

own_window_type = 'dock',
Run Code Online (Sandbox Code Playgroud)

毕竟,我的 Ubuntu 16.04.1 的 .conkyrc 读取


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}
]]
Run Code Online (Sandbox Code Playgroud)

我的 .conkyrc 生成输出如下:

在此输入图像描述


小智 2

看来 Conky 的 1.10 版本现在已经被破坏了,有些人正在回到 1.9 版本。

我只能让其中的几个工作,但是,花了一些时间和调整才让少数几个工作。所以也许这是一个更好的选择,先把头发卷起来,然后拔掉头发,让它们正常工作。

来自:将 Conky 回滚到 1.9

  1. 查看我的 16.04 (Xenial) 机器上安装了哪个 conky 版本:

    $ conky -v | head -n 1 | cut -d" " -f 2
    1.10.1
    
    Run Code Online (Sandbox Code Playgroud)
  2. 删除这个无聊的 conky 并清除它的配置和剩余的依赖项:

    sudo apt-get remove --purge conky-std && sudo apt-get autoremove
    
    Run Code Online (Sandbox Code Playgroud)
  3. 我想要 conky 版本 1.9,它不在 Ubuntu Xenial 存储库中,因此我获取了 Trusty 附带的软件包:

    wget http://security.ubuntu.com/ubuntu/pool/universe/c/conky/conky-std_1.9.0-4_amd64.deb
    
    Run Code Online (Sandbox Code Playgroud)
  4. 下载 .deb 包后,我用gdebi相当的方式安装了它dpkg,这样它也会安装必要的依赖项:

    sudo gdebi conky-std_1.9.0-4_amd64.deb
    
    Run Code Online (Sandbox Code Playgroud)
  5. 检查安装的版本:

    $ conky -v | head -n 1 | cut -d" " -f 2
    1.9.0
    
    Run Code Online (Sandbox Code Playgroud)
  6. 将软件包固定在 1.9.0 版本,以便将来的软件包更新不会将我们恢复到错误的版本:

    sudo apt-mark hold conky-std
    
    Run Code Online (Sandbox Code Playgroud)

就是我现在所做的工作。