My conky spawns (only with E-OS) and I want it fixed!

I have a conky running in the background, and since a few weeks, new instances are spawned every so often. It’s noticeable only if you look closer – the displayed info blurs or overlaps with old stuff when it gets updated.

This happens only on EOS. When I run Kubuntu 24.10, everything is still like it was. Only one Conky running.

I start it via krunner which persists through reboots. Good enough for my purposes. But now, KDE wants to start new instances, and I don’t know why.

Quikc fix is to run kill $(pgrep conky | tail -n +2), but I want a solution which keeps KDE from launching conky when it’s already running.

If you post the conky I can try and do a test on it and see if it happens to me. Maybe others would be willing to test who use KDE to see if it happens to them.

Sure, here we go:


conky.config = {

-- COLORS

color1 = 'D70751', -- Debian Red
color2 = 'FFA54F', -- Tan 1
color3 = 'FFA500', -- Orange

--set to = true if you want Conky to be forked in the background
background = true, -- set to false when editing for errors

own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 128,
out_to_console = false,
use_xft = true,

font = 'Hack:size=10:antialias=true',
update_interval = 1,

--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 = true,

--Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
maximum_width = 360,

draw_shades = false,

--Draw outlines?
draw_outline = false,

--Draw borders around text
draw_borders = false,

--Stippled borders?
stippled_borders = 1,

--border width
border_width = 20,

--Default colors and also border colors
default_color = 'lightgrey',
default_shade_color = 'white',
default_outline_color = 'white',

--Text alignment, other possible values are commented
alignment = 'top_right',

--Gap between borders of screen and text
gap_x = 20,
gap_y = 32,

--Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer = 'left',

--Subtract file system buffers from used memory?
no_buffers = true,
--no_buffers = false,

--set to = true if you want all text to be in uppercase
uppercase = false,

default_bar_width = 140,
default_bar_height = 6
}

conky.text = [[
${font Lato:size=15:style=bold}${color3}${time %R}   ${time %A}${color}${font}       ${alignr}${color3}${execi 300 date +"%x"}${color}

${color3}${texeci 900 curl -s wttr.in/Hamburg?format=%l:+%C+%t+%w+%p}${color}
${texeci 900 curl -s wttr.in/Beijing?format=%l:+%C+%t+%w+%p}
${texeci 900 curl -s wttr.in/Tokyo?format=%l:+%C+%t+%w+%p}

${color1}${stippled_hr}${color}
${color1}ID/NET$color${alignr}$sysname ${color3}$kernel$color ${machine}
${color3}${execi 9000 whoami}$color @ $nodename ${alignr}Desktop ${color3}${desktop}$color of ${desktop_number}

BCST:${color3}${texeci 60 curl -s https://icanhazip.com}$color ${alignr}${wireless_mode wlp3s0} BASE
MAC :${color3}${wireless_ap wlp3s0}$COLOR ${alignr}${COLOR3}${wireless_essid wlp3s0}$COLOR
Bitrate: ${color3}${wireless_bitrate wlp3s0}$color
WiFi:${color3}${addr wlp3s0}$color ${alignr}${color}SIG:${color3}${wireless_link_qual_perc wlp3s0} %$color
${color black}${upspeedgraph wlp3s0 20, 175 000000 FFA500}$color ${color black}$alignr${downspeedgraph wlp3s0 20, 175 000000 FFA500}$color
UP:${color3}  ${upspeed wlp3s0}/s$color      ${alignr}${color3}${downspeed wlp3s0}/s$color :DN
${if_match "${addr eno1}"!="No Address"}
ETH0:${addr eno1} ${alignr}${color3}SPD:$color${downspeedf eno1}kB/s
${color black}${upspeedgraph eno1 20, 175 000000 FFA500}$color ${color black}$alignr${downspeedgraph eno1 20, 175 000000 FFA500}$color
UP:${color3}  ${upspeed eno1}/s$color      ${alignr}${color3}${downspeed eno1}/s$color :DN
${else}${endif}
${color1}$stippled_hr$color
${color1}CPU${color} ${alignr}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //' | cut -d' ' -f 3,6 | uniq} @ ${color3}${freq_g} GHz$color
${alignr}Usage:  ${color3}${cpu cpu0}%${color}
CPU▼         Cores➤ ${alignr}0 ${color3}${cpubar cpu1 6,28}$color 1 ${color3}${cpubar cpu2 6,28}$color 2 ${color3}${cpubar cpu3 6,28}$color 3 ${color3}${cpubar cpu4 6,28}$color
${color3}${cpubar cpu0 6,150}$color${alignr}4 ${color3}${cpubar cpu5 6,28}$color 5 ${color3}${cpubar cpu6 6,28}$color 6 ${color3}${cpubar cpu7 6,28}$color 7 ${color3}${cpubar cpu8 6,28}$color
CPU: ${color3}${execi 10 sensors|grep CPU |cut -d':' -f2|tr -d ' '}${color} ${alignr}Fan: ${color3}${execi 10 sensors|grep Fan |tr -s ' '|cut -d ' ' -f3-4}${color}
$alignc${color black}${cpugraph 20,360 000000 FFA500}$color   
${color1}$stippled_hr$color
${color1}MEM / HDD / IO$color ${alignr}

RAM      ${color3}${membar 5,140}$color ${alignr}${mem}/${memmax}

${color3}Internal Storage$color
/        ${color3}${fs_bar 5,140 /}$color ${alignr}${fs_used /}/${fs_size /}
Home     ${color3}${fs_bar 5,140 /home/}$color ${alignr}${fs_used /home/}/${fs_size /home/}
${color3}Removable Storage$color
${if_existing /dev/mmcblk0}microSD  ${color3}${execbar df -l | awk '/mmcblk0p1/ {print substr($5,1,length ($5)-1)}'}$color ${alignr}${exec df -hl | awk '/mmcblk0p1/ {print $3"/"$4}'}
${else}microSD  ${color3}Offline / Missing$color ${alignr}   ${endif}
${voffset -13}${exec basename $(df -l | awk '/mmcblk0p1/ {print $6}')} ${alignr}${exec df -lT | awk '/mmcblk0p1/ {print $2}'}

${color1}$stippled_hr$color
${color1}USAGE$color ${color3}BAT${color} ${battery BAT0}${alignr}${color3}Uptime:${color} $uptime_short
${color3}Proc${color}${processes}${alignc}  | ${color3}Running${color}${running_processes} |${alignr}${color3}Avg:${color} $loadavg

By CPU                MEM  CPU% ${alignr}User      PID
 ${color3}${top name 1} ${top mem_res 1}${top cpu 1} $alignr${top user 1}  ${top pid 1}$color
 ${top name 2} ${top mem_res 2}${top cpu 2} $alignr ${top user 2}  ${top pid 2}
 ${top name 3} ${top mem_res 3}${top cpu 3} $alignr ${top user 3}  ${top pid 3}

By MEM                MEM  CPU% ${alignr}User      PID
 ${color3}${top_mem name 1} ${top_mem mem_res 1}${top_mem cpu 1} $alignr ${top_mem user 1}  ${top_mem pid 1}$color
 ${top_mem name 2} ${top_mem mem_res 2}${top_mem cpu 2} $alignr ${top_mem user 2}  ${top_mem pid 2}
 ${top_mem name 3} ${top_mem mem_res 3}${top_mem cpu 3} $alignr ${top_mem user 3}  ${top_mem pid 3}

By I/O                MEM  CPU% ${alignr}User      PID
 ${color3}${top_io name 1} ${top_io mem_res 1}${top_io cpu 1} $alignr ${top_io user 1}  ${top_io pid 1}$color
 ${top_io name 2} ${top_io mem_res 2}${top_io cpu 2} $alignr ${top_io user 2}  ${top_io pid 2}
 ${top_io name 3} ${top_io mem_res 3}${top_io cpu 3} $alignr ${top_io user 3}  ${top_io pid 3}
]]

You would probably need to edit the interfaces eno1 and wlp3s0 to fit your situation, and I don’t know how well it works re: SD Card at /dev/mmcblk0.

Also, maybe use other locations for the weather.

1 Like

I just ran the command at the command line (still need to set it up for autostart) on issue I get is basename missing operand. (I could be missing something so not sure if you will get the same error. I’ve had it run for about 5 minutes and so far its running as expected. I will continue to test it and see if I can come up with the same issue as you posted.

The basename error comes if you have a SDCard inserted, but not mounted.

Any workaround for this is appreciated. Usually, I have them automounted so it doesn’t happen for me.

1 Like

so far after an hour of running it on a new install I have no issue’s with it spawning. when ever I run pidof conky I only get one number back which states there are not multiple instances of it running.

I have it running on another laptop for about 20 minutes and no spawning there either.

htop running on both only show on process in action as well.

when this first happend did you happen to note the date? maybe check your pacman log see if there was an update that could be causing it. Both of these systems are barebone kde out of the box.

I will run it on my openbox and see what happens with it there. but so far I have had no luck in reproducing your error :frowning:


${voffset -13}${if_existing /mmcblk0p1/ ${exec basename $(df -l | awk '/mmcblk0p1/ {print $6}')} ${alignr}${exec df -lT | awk '/mmcblk0p1/ {print $2}'} ${endif}

if the card exist it will carry out the instructions if not then it just skips it. no more errors showing in terminal

I am 99% sure that conky is not the culprit, but KDE is. How did you start this conky? from a console, krunner, some autostart?

Regarding your fix:

This doesn’t work (I tried) because if_existing needs an existing file to work. It works in my config above with ${if_existing /dev/mmcblk0} because this exists. But this doesn’t solve it because the condition I am looking for is mounted | not mounted. There’s a ${if_mounted}, but it relies on a fixed mount path, which the SDCard doesn’t have.

Something like ${if_match $(lsblk -l | grep -c mmcblk0) > 1} should work in theory but I cannot get it to run.

1 Like

I agree I think its an issue with your KDE setup.

its at 1 hour 52 minutes on the first laptop and no issues at all.

yeah i had only tested it on my system which stopped the error. I don’t have a card in order to test.

maybe check htop and see what other process that are going on that could be spawning new instances

I have done both command line and an autostart though kde starting a script.

Command line is shell/Konsole? Because I started with krunner.

1 Like

running it now through krunner will report back in 30 or so

Ok so I let it run for an hour and still no issues with spawning. So definitely has to be something from another running process you have going on.

Do you have other conky’s? does this happen with them?

That sounds somewhat fishy. You start it manually by typing “conky” into krunner after each login?

No, I start it once, and then it comes back after reboot. Every once in a while, though, this doesn’t work and conky doesn’t run at start. Then I start it again by hand with krunner.

No other conkys here. But it happens only on EOS, not with the identical conky.conf on an Ubuntu Plasma 5 install. And only recently.

Mhm, do you have Desktop Session Restore enabled in the plasma settings? Because afaik otherwise conky shouldn’t automatically start. If we can figure out why conky autostarts in the first place then we maybe figure out why it sometimes starts multiple times.

1 Like

Yes, that’s active. Reload what was open during last logout. I kind of suspect this as well, but why now? This worked for literally years.