I run a program conkywx.sh with it's own config file and a template file.
Each of the files is assigned to a templateN - for example template0, template1 and template2
case 1 - works - full path using $WX_DIR exported path variable
template0 = '$WX_DIR/conkywx.sh',
template1 = '$WX_DIR/examples/conkywx-02.conf',
template2 = '$WX_DIR/examples/conkywx-weather-systemrc-template',
template3 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
${execpi 1800 ${template0} -c ${template1} -t ${template2} }
case 2 - relative path - works under certain conditions
template0 = './conkywx.sh',
template1 = './examples/conkywx-02.conf',
template2 = './examples/conkywx-weather-systemrc-template',
template3 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
${execpi 1800 ${template0} -c ${template1} -t ${template2} }
In this case 2 - at the first start of conky - that template3 directory does not exist - the file wxalert also does not exist but that is irrelevant. This case will never trigger execpi unless template3 is commented. While if I state the full path - as in case 1 - then template3 becomes irrelevant
My point is that relative paths should work as they did in 1.10.8 and earlier builds.
Is this related to the recent quotes PR or entirely unrelated?
I do not know - I have not used quotes in either case.
I saw this during the quotes investigation but could not put a finger on it at the time.
The templateN values have to be quoted - double or single - does not matter.
In the conkywx install version - I do not foresee any issues but in the standalone version there could be issues ... I raised this issue as things worked in 1.10.8 and earlier.
This template was not showing up and highlighted the case - conkywx scrolling weather - South China Seas - 3 cyclones - wow
Can you do a git-bisect?
Go back before to 1.10.8 to find (any) working commit. Try You'll need to switch between 1.10.7. Still broken? Go more far back.cmake _(master)_ and ./configure + make _(1.9 and earlier versions)_ until you find one... then start bisecting commits between there and here until you get a bad commit.
EDIT: Some other things might be broken between commits, so you should use a minimal conky.conf that deals with templates alone.
I have 1.10.8 as a case and it works there - I know it worked before - as I developed it way after 1.10.x came into being.
Okay, git bisect start. Picking 1.10.7 mean a couple of extra commits to test. Not a big deal.
29a1688d 2018-02-07 15:16:39 +0100 (tag: v1.10.8)
d97f4dfd 2018-01-19 16:12:08 +0200 (tag: v1.10.7)
e94f0494 2016-12-04 13:13:57 -0200 (tag: v1.10.6)
4cd04f00 2016-10-04 09:49:19 +0200 (tag: v1.10.5)
3b4b9abd 2016-07-20 18:53:48 +0200 (tag: v1.10.4)
6e061100 2016-06-25 09:36:51 -0700 (tag: v1.10.3)
8dda4c39 2016-05-03 06:04:57 -0600 (tag: v1.10.2)
15662beb 2015-11-18 07:47:45 -0800 (tag: v1.10.1)
8a4eb265 2015-06-21 17:49:06 -0700 (tag: v1.10.0)
138c8644 2015-05-23 08:12:47 -0700 (tag: v1.10.0-rc1)
ca9acc13 2010-10-14 17:28:57 -0700 (tag: 1.999)
04a0c885 2012-05-03 14:35:33 -0700 (tag: 1.9.0)
0b3fbed0 2010-10-05 15:26:24 -0700 (tag: 1.8.1)
6c72c935 2010-03-30 10:50:33 -0700 (tag: 1.8.0)
f5363b65 2010-01-24 15:34:03 +0100 (tag: 1.8.0_rc2)
909c2903 2010-01-01 15:10:29 -0800 (tag: 1.8.0_rc1)
Try Find the last working and/or broken tag.909c2903 first.
OK let's try and understand what we are trying to investigate - versions from 1.10.0 to 1.10.8 should be our focus as going before that your configuration is totally different - though the underlying code is the same.
v1.10.0 - here relative paths work - there was an issue in this version with if_existing so it works if I comment those lines
conky.text = [[
${voffset 2}${lua main -n background -r 10 -c 0x333333:0.8 -s NA,NA }#
${execpi 100000 ${template0} -c ${template1} -t ${template2} }#
# ${if_existing ${template4}}
# ${voffset -10}${color4}${hr 2}#
${lua main -n smscroller -p -3,110 -r u -w 306,110 -i ${template4}}#
# ${else}#
# ${lua reset}#
# ${endif}#
${voffset 90}
]];
and like I said earlier as well - version 1.10.8 works fine
OK Here is the confirmation - there is a bug with templateN.
If I use the relative paths directly in place of using them via templateN mechanism - things work !!!
template3 = [[/tmp/wx-param-vertical-scroller-weather-conkywx.conf-pChA_r_27u0-m39/wxalert]],
template4 = [[/tmp/wx-param-vertical-scroller-weather-conkywx.conf-pChA_r_27u0-m39/wxconkywx_scroller]],
};
conky.text = [[
${voffset 2}${lua main -n background -r 10 -c 0x333333:0.8 -s NA,NA }#
# ${execpi 100000 ${template0} -c ${template1} -t ${template2} }#
${execpi 100000 ./conkywx.sh -c ./examples/vertical-scroller-weather-conkywx.conf -t ./examples/vertical-scroller-weather-template }
${if_existing ${template4}}#
${voffset -10}${color4}${hr 2}#
${lua main -n smscroller -p -3,110 -r u -w 306,110 -i ${template4}}#
${else}#
${lua reset}#
${endif}#
${voffset 90}
There is this value of 100000 as the update_interval is about 0.05
Can you make a minimal template config so I can do a git bisect to find an offending commit? EDIT: Or it would be easier and better if you do a git bisect since you know what stopped working.
(off topic). How do you do multiple ${pre_exec} in Lua? I'm trying to get this documented.
Re git bisect - shall have a look
(off topic)
Re ${pre_exec} - I use LUA tables to maintain / track the calls - if a particular call has been made earlier then the stored result is returned else a new popen occurs. The table is reset if conky is manually restarted / killed - the idea was to keep the same behaviour as the original pre_exec.
One can also give a long time interval and use ${execi} or it's variant.
A question that springs up is - the docs say that ${exec} and variants are expensive - why?? a similar function in LUA would entail similar overhead or not???
This can only be done either in the source code or with LUA - as LUA is embedded in conky code. You cannot use python, perl etc in place of LUA - or you will run into nasty shell overheads - I recall this came up in ref to RSS #152.
What am I supposed to look for? Make some examples. I can't see anything wrong.
conky.config = {
out_to_console = true,
template0 = 'echo conky',
template1 = '$WX_DIR/conkywx.sh',
template2 = '$WX_DIR/examples/conkywx-02.conf',
template3 = '$WX_DIR/examples/conkywx-weather-systemrc-template',
template4 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
--- template0 = 'echo conky',
--- template1 = './conkywx.sh',
--- template2 = './examples/conkywx-02.conf',
--- template3 = './examples/conkywx-weather-systemrc-template',
--- template4 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
--- template4 = ''
}
conky.text = [[
${execpi 1800 ${template0} -c ${template1} -t ${template2} ${template3} ${template4}}
]]
In the above example $WX_DIR is an exported full path variable - initiated in the script that launched conky -c conky resource file.
if we use this - you should not have any activity at all - conky window does not show up. If we comment template4 - then things work as template4 may or may not exist
conky.config = {
out_to_console = true,
template0 = 'echo conky',
template1 = './conkywx.sh',
template2 = './examples/conkywx-02.conf',
template3 = './examples/conkywx-weather-systemrc-template',
template4 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
--- template0 = 'echo conky',
--- template1 = './conkywx.sh',
--- template2 = './examples/conkywx-02.conf',
--- template3 = './examples/conkywx-weather-systemrc-template',
--- template4 = '/tmp/wx-param-conkywx-02.conf-pChA_r_27u0-m39/wxalert',
--- template4 = ''
}
conky.text = [[
${execpi 1800 ${template0} -c ${template1} -t ${template2} ${template3} ${template4}}
]]
@plikhari We never established what version you're on right now. I'm using current master and I'm seeing the output okay in terminal. Please spell things out because I'm not seeing this bug on my side.
This is with own_window = true.

Am using the latest git commit !
you will not see the bug with just out_to_console = true,
I may have narrowed it down to the lua_load line - but lets see if you can replicate the issue ...
we use a simple cat to any text file in /tmp folder - you will need to comment the lua_load line for the cat to print out.
However if I give full path to the 0,1,2 templates then it works
conky.config = {
default_color = 'white',
default_outline_color = 'black',
default_shade_color = 'black',
double_buffer = true,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = true,
no_buffers = true,
override_utf8_locale = true,
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
color1 = 'Tan1',
color2 = 'Gray',
color3 = 'White',
color4 = 'DarkSlateGray',
color5 = 'yellow',
color6 = 'black',
color7 = 'lime',
color8 = 'cyan',
alignment = 'top_right',
maximum_width = 300,
minimum_width = 300,
minimum_height = 150,
text_buffer_size = 5000,
gap_x = 7,
gap_y = 185,
use_xft = true,
xftalpha = 0.8,
font = 'DejaVu Sans Mono:size=10',
update_interval = 3,
short_units = true,
lua_load = './lib/conkywx.lua',
out_to_console = true,
template0 = './conkywx.sh',
template1 = './examples/vertical-scroller-weather-conkywx.conf',
template2 = './examples/vertical-scroller-weather-template',
template3 = [[/tmp/wx-param-vertical-scroller-weather-conkywx.conf-pChA_r_27u0-m39/wxalert]],
template4 = [[/tmp/wx-param-vertical-scroller-weather-conkywx.conf-pChA_r_27u0-m39/wxconkywx_scroller]],
};
conky.text = [[
${execi 1000 cat /tmp/enabled.txt}
]];
With lua-load commented out and TEST in /tmp/enabled.txt, I see TEST on the screen.
What happens if you leave it as it is - then what do you see ???
you can use another lua file that you have - else it spits out abuses
conky -c ~/conky/622-lua.conf
conky: llua_load: cannot open ./lib/conkywx.lua: No such file or directory
[1] 9172 segmentation fault (core dumped) conky -c ~/conky/622-lua.conf
here you can use this - just put it someplace conky can see it
FILE: ~/conky/conkywx.lib/conkywx.lua
```lua
lua_load = './conkywx.lib/conkywx.lua',
```bash
[~/conky] conky -c ~/conky/622-lua.conf
[1] 14399 segmentation fault (core dumped) conky -c ~/conky/622-lua.conf
Oh I need to build with LUA... Probably.
Yes that is also required.
conky -c ~/conky/622-lua.conf
conky: llua_load: ./conkywx.lib/conkywx.lua:35: module 'luafunc' not found:
no field package.preload['luafunc']
no file './luafunc.lua'
no file '/usr/share/lua/5.1/luafunc.lua'
no file '/usr/share/lua/5.1/luafunc/init.lua'
no file '/usr/lib/lua/5.1/luafunc.lua'
no file '/usr/lib/lua/5.1/luafunc/init.lua'
no file './lib/luafunc.lua'
no file './examples/luafunc.lua'
no file '/usr/local/lib/conky/libluafunc.so'
no file './luafunc.so'
no file '/usr/lib/lua/5.1/luafunc.so'
no file '/usr/lib/lua/5.1/loadall.so'
conky: desktop window (25a) is root window
conky: window type - override
conky: drawing to created window (0x3a00001)
conky: drawing to double buffer
TEST
TEST
TEST
TEST
TEST
conky is printing TEST. I don't think I require those files for this troubleshooting. It's working.
The issue is there - we can work around it by using full path. I shall get more clarity in a few days - once I get feedback from various people testing conkywx ... I shall send them the same test case
If I do this in wrong directory... I get No such file or directory in the output too.
conky -c ~/conky/622-lua.conf
conky: llua_load: cannot open ./conkywx.lib/conkywx.lua: No such file or directory
conky: desktop window (25a) is root window
conky: window type - override
conky: drawing to created window (0x1e00001)
conky: drawing to double buffer
TEST
TEST
TEST
TEST
TEST
Maybe various people don't run conky in the terminal so they can't see the messages. Sure, let me know how that works out for you in few days. Cheers. Thanks for this test. :+1:
Yes - one has to ask for the result on the terminal window
Any updates on this issue? Did you talk to your people? We should do a git bisect too.
Yeah we are using full path now - so all seems to work.
Shall close this issue now
Most helpful comment
(off topic). How do you do multiple
${pre_exec}in Lua? I'm trying to get this documented.