brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.27k stars 620 forks source link

Conky does not start when set to autostart in KDE #1174

Closed beyond9thousand closed 1 year ago

beyond9thousand commented 2 years ago

Conky fails to initialize when set to autostart in KDE

Loads properly when run from the terminal manually anytime after the DE has loaded. Won't run if set to autostart and throws the following error when run with terminal=true at the very beginning

Conky: Can't set the specified locale!
Check LANG, LC_CTYPE, LC_ALL.

Information

OS: 5.16.9-zen1-1-zen (arch) DE: KDE Plasma 5.24.0 conky: 1.12.2-1

conky config:

background yes
use_xft yes
xftfont 123:size=9
xftalpha .005
update_interval 1.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes 
own_window_class conky-semi
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
double_buffer yes
minimum_size 240 5
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color gray
default_shade_color red
default_outline_color white
alignment bottom_left

gap_x 7
gap_y 7 

stippled_borders 3
border_inner_margin 4
border_width 5

no_buffers true
uppercase no
cpu_avg_samples 2
net_avg_samples 1
#override_utf8_locale yes
use_spacer right
text_buffer_size 256

TEXT
${font Arial:bold:size=10}${color #ab7c15}${color #ab7c15}beyond9thousand ${color #ab7c15} ${hr 1}
$font${color #909090}$sysname $kernel $alignr $machine
Uptime $alignr${uptime_short}
#${font Arial:bold:size=10}${color #ab7c15}NETWORK ${color #ab7c15}${hr 1}
##$font${color #909090}IP on wlo1 $alignr ${addr wlo1}
#$font${color #909090}Up $alignr ${upspeed wlo1}
#${color #909090}${upspeedgraph wlo1 20,250 #909090 #909090}
#${color #909090}Down $alignr ${downspeed wlo1}
#${color #909090}${downspeedgraph wlo1 20,250 #909090 #909090}
#${color #909090}Uploaded: $alignr ${totalup wlo1} Downloaded: $alignr ${totaldown wlo1}

${font Arial:bold:size=10}${color #ab7c15}Processor ${color #ab7c15}${hr 1}
$font${color #909090}${cpu cpu0}%
$font${color #909090}${cpubar cpu0}
CPU Frequency $alignr${freq 0}MHz
CPU Temperature $alignr${hwmon 4 temp 1}°C

${font Arial:bold:size=10}${color #ab7c15}Memory ${color #ab7c15}${hr 1}
$font${color #909090}$mem / $memmax $alignr $memperc%
$membar

${font Arial:bold:size=10}${color #ab7c15}NVMe SSD ${color #ab7c15}${hr 1}
$font${color #909090}${fs_used /home} / ${fs_size /home} $alignr Free: ${fs_free /home}
${fs_bar /home}
${font Arial:bold:size=10}${color #ab7c15}Disk I/O ${hr 1}
$font${color #909090}Read:$font $alignr$diskio_read
${color #909090}${diskiograph_read 20,250 #909090 #909090 750}
${color #909090}Write: $font $alignr$diskio_write
${color #909090}${diskiograph_write 20,250 #909090 #909090 750}

${font Arial:bold:size=10}${color #ab7c15}Processes ${color #ab7c15}${hr 1}
$font${color #ab7c15}Total: ${color}$alignr${processes}
${color #909090}$font${top_mem name 1}${alignr}${top_mem mem 1} %
$font${top_mem name 2}${alignr}${top_mem mem 2} %
$font${top_mem name 3}${alignr}${top_mem mem 3} %
$font${top_mem name 4}${alignr}${top_mem mem 4} %
$font${top_mem name 5}${alignr}${top_mem mem 5} %
Harpo3 commented 2 years ago

I am having the same issue. launches correctly from the menu or from konsole terminal, but will not autostart. Tried recreating autostart item and autostart using a bash script. No luck.

beyond9thousand commented 2 years ago

@Harpo3 is it a certain package update/replacement causing this? Have you been able to figure out what's wrong? Really feeling clueless here

Harpo3 commented 2 years ago

I was able to fix the problem by doing these steps (in my case, KDE running on Arch)

  1. Update system and reboot
  2. Delete conky from startup applications and/or startup scripts in KDE System Settings
  3. Re-add conky.
  4. Under Properties "Command," enter the full path (your location may vary) to conky with parameters: /usr/bin/conky --daemonize --pause=1
  5. Under Properties "Work Path," the directory path where your conkyrc file is located
onurbbr commented 2 years ago

@Harpo3 is it a certain package update/replacement causing this? Have you been able to figure out what's wrong? Really feeling clueless here

With the update of glibc 2.35 and gcc 11.2, many applications in arch repos became unusable. I was able to run it by adding this command. I suggest you to try. conky --daemonize --pause=10 >> /dev/null 2>&1

beyond9thousand commented 2 years ago

@onurbbr I am able to run the application manually, it just simply doesn't work on startup. I tried adding this instead to the execstart line, it had no impact. conky still won't run at boot/login etc

Edit: i made the following changes to your suggested command and it worked

[Desktop Entry]
Categories=System;Monitor;
Exec=sleep 5 && conky --daemonize --pause=5 >> /dev/null 2>&1
Icon=conky-logomark-violet
Name=conky
StartupNotify=true
Terminal=false
Type=Application

could you perhaps explain what the command is actually doing?

onurbbr commented 2 years ago

Honestly, I don't know. I thought I could run it by looping it.

ajgringo619 commented 2 years ago

I think the key is the >> /dev/null 2>&1 at the end. I was having the same issues with my Arch/openSUSE KDE VMs.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.

metal450 commented 6 months ago

I'm not able to get this to autostart on Plasma 6, even with all the above options. It worked properly on Plasma 5. Does anyone have this autostarting on 6?

Caellian commented 6 months ago

Conky: Can't set the specified locale! Check LANG, LC_CTYPE, LC_ALL.

Is not a conky issue and system configuration or libraries (glibc) are likely at fault. I had a bad install once where I didn't set locales properly and this would've cause that. If you're having this issue, first and foremost check that your /etc/enviroment is configured properly - see the Localization part of the arch installation guide (or equivalent for your repo).

Caellian commented 6 months ago

@metal450 I opened a separate issue for your problem as this one is very old, resolved and likely unrelated. See #1856