Conky script doesn't work

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Jim7963

Conky script doesn't work

Post by Jim7963 »

Hi everybody.

I ask for your help for my script Conky.
Last week I made a brand new install of LM 18 cinnamon on my HDD.
After that I installed conky-all and my script which was working perfectly on LM 17.3
In the firsts hours after the install it was working perfectly.
But after some installs of others programs my Conky disappeared of the screen. I still don't know what happened.

I tried to make some researches, I changed my script to the new format 1.10, but nothing changed, it still doesn't work.
When I try another script, it works. So the problem comes from mine.

Here is my script:

Code: Select all

conky.config = {
	alignment = 'top_right',
	background = false,
	use_xft = true,
	font = 'Open Sans:size=8.5',
	xftalpha = 0.8,
	update_interval = 1,
	total_run_times = 0,
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	double_buffer = true,

	maximum_width = 400,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_shade_color = 'red',
	default_outline_color = 'green',
	alignment = 'top_right',
	gap_x = 24,
	gap_y = 124,

	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	net_avg_samples =2,
	override_utf8_locale = true,
	use_spacer = 'right'
}

conky.text=[[
${alignc 32}${font Open Sans:size=20}${color dodgerblue1}Linux${color dodgerblue1} Mint$font$color${color white}${font Open Sans:size=20} ${execi 60 lsb_release -r | cut -f 2| tr "[:upper:]" "[:lower:]"}
${alignc}${execi 60 lsb_release -c | cut -f 2}
${alignc}${font Open Sans:size=10}${color white}${execi 30 users | cut -c1-6}@$nodename
$color${font}${font Open Sans:size=1}$alignr${time %H:%M}$font
${color dodgerblue1}${font Open Sans:Bold:size=10}Date${hr 2}$color$font
$color${font Open Sans:size=12}$alignr${time %a}, ${time %d %b %Y}$font$color

-- SYS
${font Open Sans:Bold:size=10}${color dodgerblue1}SYSTEM${hr 2}$color${font}
$sysname $kernel $alignr $machine
Uptime $alignr $uptime
GPU Temperature $alignr ${execi 30 sensors | grep 'temp1:' | cut -c16-17}°C

-- CPU
${font Open Sans:Bold:size=10}${color dodgerblue1}CPU${hr 2}
$color${font}Intel i7 4790 $alignr ${freq_g cpu0}GHz
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${font}Core 0 ${color dodgerblue1}${execi 30 sensors | grep 'Core 0:' | cut -c18-19}°C${color} @ ${cpu cpu1} % $alignc ${color dodgerblue1}${cpubar cpu1}${color}
${font}Core 1 ${color dodgerblue1}${execi 30 sensors | grep 'Core 1:' | cut -c18-19}°C${color} @ ${cpu cpu2} % $alignc ${color dodgerblue1}${cpubar cpu2}${color}
${font}Core 2 ${color dodgerblue1}${execi 30 sensors | grep 'Core 2:' | cut -c18-19}°C${color} @ ${cpu cpu3} % $alignc ${color dodgerblue1}${cpubar cpu3}${color}
${font}Core 3 ${color dodgerblue1}${execi 30 sensors | grep 'Core 3:' | cut -c18-19}°C${color} @ ${cpu cpu4} % $alignc ${color dodgerblue1}${cpubar cpu4}${color}

-- MEMORY
${font Open Sans:Bold:size=10}${color dodgerblue1}MEMORY${hr 2}
$color${font}${font Open Sans:bold:size=8.5}RAM$font
$mem / $memmax $alignr $memperc %
$membar

${font Open Sans:bold:size=8.5}SWAP$font
$swap / $swapmax $alignr $swapperc
${swapbar};

-- NETWORK
${font Open Sans:Bold:size=10}${color dodgerblue1}Network${hr 2}
$color${font Open Sans:bold:size=8.5}External IP ${font}${alignr}${execi 3600 wget -O - http://ip.tupeux.com | tail}$font

${downspeedgraph wlp3s0 22,150 00ff00 ff0000}
${offset 40}${voffset -21}${downspeedf wlp3s0}k/s

-- HDD
${font Open Sans:Bold:size=10}${color dodgerblue1}Disks${hr 2}
$color${font Open Sans:bold:size=8.5}/dev/sda $font$alignr ${execi 60 nc localhost 7634 | cut -c33-34}°C
$color${font Open Sans:bold:size=8.5}/dev/sdb $font$alignr ${execi 60 nc localhost 7634 | cut -c67-68}°C

${font Open Sans:bold:size=8.5}ROOT $font$font$alignr ${fs_type /}
${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /} %
${fs_bar /}

${font Open Sans:bold:size=8.5}ROOT $font$font$alignr ${fs_type /home}
${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home} %
${fs_bar /home}

${font Open Sans:bold:size=8.5}Disque Sauvegardes $font$alignr ${fs_type /media/jim/Sauvegardes}
${fs_used /media/jim/Sauvegardes} / ${fs_size /media/jim/Sauvegardes} $alignr ${fs_used_perc /media/jim/Sauvegardes} %
${fs_bar /media/jim/Sauvegardes}

-- TOP
${font Open Sans:Bold:size=10}${color dodgerblue1}TOP${hr 2}
$color${font}${font Open Sans:bold:size=8.5}PROCESS $alignr CPU USAGE$font
${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} %
]]

When I run it through the consol, here what is displayed:

Code: Select all

conky: desktop window (1200044) is subwindow of root window (1d2)
conky: window type - normal
conky: drawing to created window (0x2600001)
conky: drawing to double buffer
conky: forked to background, pid is 5908
jim@PCJean-Mi ~/.conky $ 
conky: can't load Xft font 'Open Sans:size=8.5'
--2016-07-09 09:55:16--  http://ip.tupeux.com/
Resolving ip.tupeux.com (ip.tupeux.com)... 212.129.25.14
Connecting to ip.tupeux.com (ip.tupeux.com)|212.129.25.14|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’

-                       [ <=>                ]      14  --.-KB/s    in 0s      

2016-07-09 09:55:17 (983 KB/s) - written to stdout [14]

conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
conky: can't load Xft font 'Open Sans:bold:size=8.5'
I forgot, the Open Sans font is installed in my fonts library.
I'd like to keep this script which I liked.

Is there anybody with an idea of where the problem comes from?
It's a great mystery for me.

Sorry for my english :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
paxxus

Re: Conky script doesn't work

Post by paxxus »

Open a terminal and type this command: gnome-font-viewer

See if the "Open Sans" font is listed, I bet it isn't.

If you have the "Open Sans" ttf file somewhere in a folder, open up the file browser and right-click on the file and chose Open With => Other Application... Then type the command: gnome-font-viewer

The font viewer should open up showing the font and an "Install" button should be there, press it to install the font and see if your conky works better now. You may need to reboot.

NOTE: Do NOT use the default Cinnamon font viewer, it's broken.
Jim7963

Re: Conky script doesn't work

Post by Jim7963 »

Open Sans is already installed. I checked as you said just in case but i see this font as installed.

I tried to change the font in my script but the result was the same

It's as if Conky could not find any font on my computer with this script. I just don't know why.
paxxus

Re: Conky script doesn't work

Post by paxxus »

Just a wild guess: Maybe the fractional font size is problematic, maybe you could try 9 instead of 8.5 just to see what happens...
Jim7963

Re: Conky script doesn't work

Post by Jim7963 »

Hey, it's a little better but still doesn't work.

I solved the problem with the IP address.

Here is the terminal:

Code: Select all

conky: desktop window (1200044) is subwindow of root window (1d2)
conky: window type - normal
conky: drawing to created window (0x2a00001)
conky: drawing to double buffer
conky: forked to background, pid is 14135
Edit: The problem comes from my conky.text, when I try my conky.config with another script it works.
But I still doesn't know from what part of the text.
Locked

Return to “Compiz, Conky, Docks & Widgets”