|What’s new In conkyconf 4.1
|
I changed the conky_parselog function to allow members of the wheel group to display system logs in conky. The previous versions re-parsed the conky variable** ${tail}**, which just followed the file system access rights. Thus only the root user could have viewed system logs. The new function takes the output of
sudo -n tail 2000 $logfile
As you can see on the picture (at the bottom), the log lines only show time, daemon and the first few words of the info in the narrow conky window. But it should be sufficient in most cases to give you an indication that something strange happened and that you should take a closer look at the log.
Here’s the command which generates the ~/.conkyrc that produces the result on the left:
$ conkyconf -wfduNt -g cabc0313 **-n 5 -l /var/log/messages**
Since /var/log/messages is the default log file, this is equivalent to:
$ conkyconf -wfduNt -g cabc0313 -**n 5 -l**
Since “5” is the default number of lines to display, this is equivalent to:
$ conkyconf -wfduNt -g cabc0313 **-l**
The log lines are displayed in LIFO order (most recent line on top). Please refer to previous posts in this thread for the signification and usage of the other options in this example.
sudo in the lua script won’t ask for your password. Thus it has to remember it already. There are 2 possibilities:
either run a command involving sudo just before running conky, such as for example
$ sudo cat /var/log/messages
This is the safest approach.
or disable passwords for members of the wheel group in /etc/sudoers:
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
**%wheel ALL=(ALL) NOPASSWD: ALL**
I don’t have problem with this, but many people here will tell you not to do so (which means that I can not seriously recommend this either).|http://imageshack.us/a/img837/7172/conkyconflog.png|