You are not logged in.
Indeed, I can read those files in the BAT0 folder without sudo. I'm wondering why I needed sudo, when I tried to edit conkyrc on an ubuntu machine?
Also when I gave conkyrc from Bunsenlabs to users on different distros, without sudo it did not show all the data (e.g. not for fan speed, battery, etc.).
Something must be wrong with these machines' permissions.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
^ I think some distributions now have sysfs restrictions in place, my stretch-based VM won't let me read the kernel ring buffer as a normal user.
Offline
Offline
Does someone maybe know why this lua script (shipped with #BĹ) is not work anymore?
...
Edit: Meanwhile figured it out, changing to new syntax works fine.
Last edited by martix (2018-02-07 12:10:16)
Offline
I found the problem and the solution in this post i change the two scripts and the conky config. In bargraph_small.lua i call the function set_source_rgba and in the conky config file i only call bargraph_small.
I post the scripts in gitlab bargraph_small and draw1
In bargraph_small you have to change the line 86
package.path = "/home/btt/.conky/?.lua"
to the directory where you have both scripts. To modify the background you have to change the line number 208.
conky_draw_bg(cr, 20, 0, 0, tonumber(conky_window.width), tonumber(conky_window.height), 0x000000, 0.4)
Offline
TeoBigusGeekus wrote:martix wrote:Recently a general question regarding conky popped in my mind:
Getting things like battery info or fan info grabs data from the root part of the system.
However when I edit conkyrc, I do not need sudo (i.e. root privileges).
Is there maybe a genaral explanation how conky gets root data without having root privileges?
You don't need to be root to read your system's /proc and /sys folders.
Look at your /sys/class/power_supply/BAT0 file, which has info about your battery; anyone can read it.
Indeed, I can read those files in the BAT0 folder without sudo. I'm wondering why I needed sudo, when I tried to edit conkyrc on an ubuntu machine?
Also when I gave conkyrc from Bunsenlabs to users on different distros, without sudo it did not show all the data (e.g. not for fan speed, battery, etc.).
I,m using Mate and I don't have to be root to show temps or battery.
${voffset 6}${goto 15}ACPI: ${color FFFFFF}${acpitemp}°F
${color}HDD: ${color FFFFFF}${hddtemp /dev/sda}°F ${color}
${voffset 4}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color0}${offset 2}CPU Temp: $alignr${execi 600 sensors -f | grep 'Core 0' | awk '{print $3}' | cut -c2-9}
${exec sensors | grep "cpu_fan:" | sed 's/fan1/Cpu Fan/'}
Battery capacity:$alignr${execi 60 acpi | grep -Eo '[0-9]+%'}
remaining:$alignr${execi 60 acpi | grep -Eo '(:?[0-9]+){3}'}
with my Battery I have a extra % in it but it works. I even have it in lua with a bargragh and it works. The problem I have is showing Network speed in lua. if it is using bandwith it doesn't show it in graduated with speed. if I am downloading it is max, even if it is a slow download.
Offline
^ I think some distributions now have sysfs restrictions in place, my stretch-based VM won't let me read the kernel ring buffer as a normal user.
Strange indeed. What'd be the purpose of these restrictions I wonder?
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
^ Thank you, loutch.
No, I don't have a chance. :8
I thought it was because of the writing "Japan", too.
But now I have found it, in both Conky's must be in the text.lua
to comment out the line (99). Then the display is correct.{ text=conky_parse("${time %H:%M}"), font_name="FreeSans", font_size=36, h_align="c", bold=true, x=200, y=100, reflection_alpha=0.7, reflection_length=0.7, colour={{0,col0,1},{1,colbg,1}}, -- radial={0,-0,0,0,-80,70} <--- },
https://cdn.scrot.moe/images/2018/01/24/fehler_behoben.jpg
But I don't know anything about Lua.
I'm sure you know better than that.
Thanks a lot unklar to solve this problem, I had the same lua problem, now I can replay with text.lua :
Offline
^Nice conky, gives a great overview.
Does the way using LUA with
"lua_load = '$HOME/.config/conky/LUA/draw-bg.lua'," in conky.config and
"${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}" in conky.text
still gives a blinking conky without a composite manager?
Offline
thx martix, I'm not using draw_bg.lua anymore, I don't know why it's not working with my conky.v.10 version
Offline
@ragamatrix If I've seen correctly, there are two ways using it:
In conky.config:
lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',
and
in conky.text:
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}
OR
Both lines in conky.config:
lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',
lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',
Do both of these methods refuse to work?
Last edited by martix (2018-02-07 14:35:03)
Offline
Thanks a lot unklar to solve this problem, I had the same lua problem, now I can replay with text.lua
![]()
mini_18020711101874872.png
^ ragamatrix, always happy to help, if I can help (but that was coincidence)
still gives a blinking conky without a composite manager?
you should post the upper part of your conky.conf (is that openbox/compton?)
Offline
@unklar It's working fine for me (with openbox/compton), I'm just asking if anyone is still having that issue with conky. However I guess here every user has a composite manager, so that might not be an issue at all.
Offline
Offline
https://forums.bunsenlabs.org/viewtopic … 929#p67929
^ It was tedious (as a Lua Ignorant ) but a very big improvement with the syntax 1.10 in Conky and the draw_bg.lua script.
The "corners" are still uneven. Transparency works.
The Conky can be moved with' Alt+Right mouse button'.
Great work!
Offline
@unklar I suspect that the corner issue might come from moving around the conky. At least the corners looked perfect here, but now after trying alt+right mouse button (which worked great) I realized that those corners do not look good anymore.
There is a question I'd like to ask.
lua_draw_hook_pre means: "This function, if defined, will be called by Conky through each iteration before drawing to the window. Requires X support. Takes any number of optional arguments. Use this hook for drawing things on top of what Conky draws."
With draw-bg it's e.g.: lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',
Now what is the difference (in plain human language) between this OR using ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25} in conky.text?
Offline
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
With draw-bg it's e.g.: lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',
Now what is the difference (in plain human language) between this OR using ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25} in conky.text?
If you call draw_bg with lua_draw_hook_pre the shadow appears at the background, if you call draw_bg with lua_draw_hook_post the text appears at bottom and the shadow is in the top, if you call draw_bg in the text i think it's the same as lua_draw_hook_pre.
Offline
^ Thank you very much, Indian.
@martix,
In addition, I would like to mention our Conkystador, Sector11, in connection with it:
- transparency
- Type of desktop and composite manager used
answer. e.g.
https://forums.bunsenlabs.org/viewtopic … 059#p11059
https://forums.bunsenlabs.org/viewtopic … 735#p27735
We hope to include as much as possible in the syntax of version 1.10 as possible.
@Teo,
this is verry good. Still, I don't quite understand what you mean (I'm already old) ]:D
Offline
@ragamatrix If I've seen correctly, there are two ways using it:
In conky.config: lua_load = '$HOME/.config/conky/LUA/draw-bg.lua', and in conky.text: ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}
OR
Both lines in conky.config: lua_load = '$HOME/.config/conky/LUA/draw-bg.lua', lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',
Do both of these methods refuse to work?
Thanks, I'll try every draw_bg.lua stuffs when I'll come back, I'm leaving for few days: no more linux tweaking
Offline