You are not logged in.

#1 2022-07-04 09:02:18

fatpenguin
Member
Registered: 2022-03-13
Posts: 17

conky error when closing session

Hi, I am running the OS on an HP laptop with a 2xIntel Celeron CPU and integrated GFX. I am not using any DE or DM, just Openbox as WM. I have no problem logging in but everytime I close the openbox session I get this error in console:

xinit: connection to X server lost
Waiting for the X server to shut down conky: X error: Display ..........

This is my .conkyrc

conky.config = {
	alignment = 'top_right',
	background = true,
	double_buffer = true,
	border_width = 0,
	cpu_avg_samples = 4,
	default_color = 'silver',
	default_outline_color = 'white',
	default_shade_color = 'red',
	draw_borders = false,
	draw_graph_borders = false,
	draw_outline = false,
	draw_shades = false,
--gap_x 1520
	gap_x = 11,
	gap_y = 12,
	net_avg_samples = 4,
	no_buffers = true,
	out_to_console = false,
	out_to_stderr = false,
	extra_newline = false,
	own_window = false,
	own_window_type = 'desktop',
	own_window_transparent = true,
--	own_window_colour = false,
	own_window_argb_visual = false,
	own_window_argb_value = 0,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	minimum_width = 50,
	stippled_borders = 0,
	update_interval = 3,
	uppercase = false,
	use_spacer = 'none',
	show_graph_scale = true,
	show_graph_range = false,
	use_xft = true,
	xftalpha = 0.2,
	font = 'Liberation Sans:size=10',
--color0 FFBB00
--color1 FFFFF7
--color2 FFCC44
--color3 FFCC99
--color4 FFDD11
	color0 = '#FFAA44',
	color1 = '#FFFFE3',
	color2 = '#FFB943',
	color3 = '#FFCC44',
	color4 = '#FFFFF9',
};

conky.text = [[
${font Liberation Sans:size=9}${color2}${sysname}   ${kernel}  Hostname ${exec hostname}
${font Liberation Mono:size=8}${color3}${exec lscpu | grep 'Model name' | cut -c 34- }
${font Liberation Sans:size=12}${color4}${time %A} ${time %d} ${time %B} ${time %Y}  ${time %I:%M} 
${font Liberation Sans:size=10}${color2}CPU${exec lscpu | grep 'Model name' | cut -c 22- | cut -d' ' -f1-4}:$color1 $cpu% ${cpubar 8}
${font Liberation Sans:size=10}
${color2}Frequency:$color1 ${freq_g}GHz  ${color2}Temperature:${color1} ${acpitemp}°C
${color2}Frequency:$color1 ${freq_g}GHz  ${color2}Temp1:${color1} ${cat  /sys/class/thermal/thermal_zone0/hwmon0/temp1_input}°C
#                                 ${color2}Temp2:${color1} ${cat /sys/class/thermal/thermal_zone0/hwmon0/temp2_input}/1000°C
${color2}RAM:$color1 ${mem}/${memmax} - ${memperc}% ${membar 8}
${color2}Swap:$color1 $swap/$swapmax - $swapperc% ${swapbar 8}
${font Liberation Sans:size=10}${color2}Processes:${font Liberation Sans:size=9}$color1 $processes  ${color2}Running:$color1 $running_processes:${color2}Uptime:$color1 $uptime
${font Liberation Sans:size=10}${color2}File system: $color1${fs_used /}/${fs_size /} ${fs_bar 8 /}
#${color1}Wifi signal: $color${wireless_link_qual_perc wlan0}%
${color2}Ethernet Up:$color1 ${upspeedf eth0} ${color2} Down:$color1 ${downspeedf eth0}
${color2}Downloaded: $color1${totaldown eth0} $alignr ${color2}Uploaded: $color1${totalup eth0} 

${color0}CPU ${color1}${alignr}${cpu cpu0}%
${cpubar cpu0 8,}
#${cpubar cpu1 3,}
#${cpubar cpu2 3,}
#${cpubar cpu3 3,}
#${cpubar cpu4 3,}
#${cpubar cpu5 3,}
#${cpubar cpu6 3,}
#${cpubar cpu7 3,}
${color1}${top name 1} $alignr ${top cpu 1}%
${top name 2} $alignr ${top cpu 2}%
${top name 3} $alignr ${top cpu 3}%
${top name 4} $alignr ${top cpu 4}%
${top name 5} $alignr ${top cpu 5}%
${top name 6} $alignr ${top cpu 6}%
${top name 7} $alignr ${top cpu 7}%
${top name 8} $alignr ${top cpu 8}%
${top name 9} $alignr ${top cpu 9}%
${top name 10} $alignr ${top cpu 10}%

${color0}RAM ${color1}${alignr}${Mem}
${membar 8,}
${color1}${top_mem name 1} $alignr ${top_mem mem_res 1}
${top_mem name 2} $alignr ${top_mem mem_res 2}
${top_mem name 3} $alignr ${top_mem mem_res 3}
${top_mem name 4} $alignr ${top_mem mem_res 4}
${top_mem name 5} $alignr ${top_mem mem_res 5}
${top_mem name 6} $alignr ${top_mem mem_res 6}
${top_mem name 7} $alignr ${top_mem mem_res 7}
${top_mem name 8} $alignr ${top_mem mem_res 8}
${top_mem name 9} $alignr ${top_mem mem_res 9}
${top_mem name 10} $alignr ${top_mem mem_res 10}

#${color0}${font Liberation Sans:size=8}66-services under tree
#${color0}${font Liberation Mono:size=7}${exec sudo 66-intree -v3 -zg -d 2 net}
#${color1}${font Liberation Sans:size=8}${exec /usr/local/bin/wx}
${color2}${font Liberation Sans:size=11}Running Services
${color0}${font Liberation Mono:size=10}${exec ps -A | grep dhclient }
${color0}${font Liberation Mono:size=10}${exec ps -A | grep ntpd }
${color0}${font Liberation Mono:size=10}${exec ps -A | grep dbus }
${color0}${font Liberation Mono:size=10}${exec ps -A | grep sshd }
#${color0}${font Liberation Mono:size=10}${exec ps -A | grep pcmanfm }
${color0}${font Liberation Mono:size=10}${exec ps -A | grep tor }
#${color0}${font Liberation Mono:size=10}${exec ps -A | grep wpa }
#${color0}${font Liberation Mono:size=10}${exec free -m}
]];

Any help would be appreciated, thanks.

Offline

#2 2022-07-04 15:32:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,242

Re: conky error when closing session

"background" forks and ignores SIGHUP when the parenting process (likely xinit) dies.
conky happily tries to continue to talk to the X11 server, but there's no X11 server and conky aborts.

This isn't a problem per se, but you'll likely have to explicitly kill conky before xinit terminates to avoid that message.

Offline

#3 2022-07-04 19:57:43

fatpenguin
Member
Registered: 2022-03-13
Posts: 17

Re: conky error when closing session

thanks for your reply, btw I have tried to set "background" to "false" but I'm still getting the error.

Offline

#4 2022-07-04 20:23:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,242

Re: conky error when closing session

How do you start conky?
xinitrc?
Do you fork it there as well ("conky &" - otherwise, how'd you proceed in the xinitrc)?

Offline

#5 2022-07-04 20:28:22

fatpenguin
Member
Registered: 2022-03-13
Posts: 17

Re: conky error when closing session

I put "conky &" in .config/openbox/autostart, my .xinitrc has just "exec openbox-session".

Last edited by fatpenguin (2022-07-04 20:46:16)

Offline

#6 2022-07-04 20:29:47

robson75
Member
From: Poland
Registered: 2020-06-28
Posts: 144

Re: conky error when closing session

Try with this configuration

conky.config = {
--- Conky settings ---
    update_interval = 1,	
    total_run_times = 0,	
    background = false,
    cpu_avg_samples = 4,
    net_avg_samples = 2,
    double_buffer = true,
    
--- Window specifications ---
    own_window = true,
    own_window_type = 'normal',
    own_window_transparent = true,
    own_window_argb_visual = true,
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    --own_window_colour = '#000000',
    maximum_width = 300,
    alignment = 'top_right',
    gap_x = 1,
    gap_y = 0,

--- Graphics settings ---
    draw_shades = false,
    draw_outline = false,
    draw_borders = true,
    draw_graph_borders = true,
    border_width = 0,
    border_inner_margin = 0,
    border_outer_margin = 0,

Arch Linux Xfce - 64Bit Linux User #621110

Offline

#7 2022-07-04 20:40:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,242

Re: conky error when closing session

fatpenguin wrote:

I put "conky &" in ,confif/openbox/autostart, my .xinitrc has just "exec openbox-session".

Still forking (and idk at hand whether openbox forks all autostart scripts on top of that)

Also yoru xinitrc is probably broken, see the last link below and the not on what you should at least have in your xinitrc

Offline

#8 2022-07-04 20:44:31

fatpenguin
Member
Registered: 2022-03-13
Posts: 17

Re: conky error when closing session

I tried robson75's configuration but unfortunately it did not work either..I tried putting conky & in my .xinitrc file before the "exec" command and also added the if block before this but it made no difference.

Last edited by fatpenguin (2022-07-04 21:06:10)

Offline

#9 2022-07-04 21:05:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,242

Re: conky error when closing session

Maybe I could try putting conky & in my .xinitrc file before the "exec" command?

That will still fork conky.
Again: the error you see is a nuisance - it's harmless.
If you don't want to see it, you'll probably have to actively kill conky before terminating the session.
One possible solution would be to store the conky PID, not "exec" openbox but keep the xinit process and after openbox terminates, kill conky

…
conky &
CONKY_PID=$!
openbox-session
kill $CONKY_PID

Offline

#10 2022-07-04 21:08:18

fatpenguin
Member
Registered: 2022-03-13
Posts: 17

Re: conky error when closing session

thanks again seth, I think I can ignore this error but I will also try your solution and see what happens next wink

Offline

Board footer

Powered by FluxBB