Manjaro Difference between pages "Basic Tips for conky" and "ClamAV"

Difference between pages "Basic Tips for conky" and "ClamAV"

From Manjaro
(Difference between pages)
imported>Excalibur1234
 
imported>Excalibur1234
 
Line 1: Line 1:
[[File:Clam.png|center]]


=Installation=
= About =


Conky can be installed with this command:
Clam AntiVirus (ClamAV) is a free, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. The application was developed for Unix and has third party versions available for AIX, BSD, HP-UX, Linux, OS X, OpenVMS, OSF (Tru64) and Solaris. As of version 0.97.5, ClamAV builds and runs on Microsoft Windows. Both ClamAV and its updates are made available free of charge.
sudo pacman -S conky
Sourcefire, now acquired by Cisco, a maker of intrusion detection products and the owner of Snort, announced on 17 August 2007 that it had acquired the trademarks and copyrights to ClamAV from five key developers.


ClamAV includes a number of utilities: a command-line scanner, automatic database updater and a scalable multi-threaded daemon, running on an anti-virus engine from a shared library.
The application also features a Milter interface for sendmail and on-demand scanning. It has support for Zip, RAR, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS formats, most mail file formats, ELF executables and Portable Executable (PE) files compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor. It also supports many document formats, including Microsoft Office, HTML, Rich Text Format (RTF) and Portable Document Format (PDF).
The ClamAV virus database is updated several times each day and as of 30 October 2011 contained 1,063,024 virus signatures with the daily update Virus DB number at 13867.


=.conkyrc file=
ClamAV is currently tested daily in comparative tests against other antivirus products on Shadowserver. In 2011, Shadowserver tested over 25 million samples against ClamAV and numerous other antivirus products. Out of the 25 million samples tested, ClamAV scored 76.60% ranking 12 out of 19, a higher rating than some much more established competitors.
ClamAV was included in comparative tests against other antivirus products. In the 2008 AV-Test it rated: on-demand: very poor, false positives: poor, on-access: poor, response time: very good, rootkits: very poor.
In a Shadowserver six-month test between June and December 2011, ClamAV detected over 75.45% of all viruses tested, putting it in fifth place behind AhnLab, Avira, BitDefender and Avast. AhnLab, the top antivirus, detected 80.28% [http://en.wikipedia.org/wiki/Clam_AntiVirus]


The entire conky is created from one file. by default, it is called <code>.conkyrc</code> file and it's path is:
= Installing ClamAV =
~/.conkyrc
or a longer file path:
/home/<username>/.conkyrc
Replace <code><username></code> with your user/account name.


All file names starting with a dot <code>.</code> are hidden files. If you want to see hidden files in your file manager, you need to make them visible. In most file managers you need to press <code>CTRL + H</code> to do that.
ClamAV is available in official repository. You can install it by command:


sudo pacman -S clamav


=Code=
= Setup ClamAV =
The <code>.conkyrc</code> file can be edited with every text editor. It's code is split into two parts:


==First Part==
Prepare configuration files:
The first/upper part contains all the configuration settings for the entire conky. Things like the position of the conky on your screen, transparency settings, border settings, the default font and it's size, and how often your conky gets updated.


===Examples:===
sudo cp /etc/clamav/clamd.conf.sample /etc/clamav/clamd.conf
'''1.''' This will set the default font color of your conky to white. Additionally, a <code>color1</code> gets set using a [http://html-color-codes.info/ Html Color Code]to a light blue:
default_color white
color1 0ab1ff


'''2.''' This enables Xft and sets the default Xft font (DejaVuSansCondensed) and it's size (11):
sudo cp /etc/clamav/freshclam.conf.sample /etc/clamav/freshclam.conf
use_xft yes
xftfont DejaVuSansCondensed:weight=Bold:pixelsize=11


'''3.''' In order to position your conky on your screen, modify these settings:
Edit configuration files:
alignment top_right
gap_x 18
gap_y 20
Your conky gets placed in the top right corner of your desktop with a horizontal gap of 18 pixels (to your right screen edge) and a vertical gap of 20 pixels (to your top screen edge).


sudo gedit /etc/clamav/clamd.conf


A great [http://conky.sourceforge.net/config_settings.html documentation]of all possible configuration settings and their arguments is available.
sudo gedit /etc/clamav/freshclam.conf
This part ends with a code line containing only one word: <code>TEXT</code>


==Second Part==
Replace the contents of the configuration files as follows:
The second part contains the displayed conky code. Every code line after the <code>TEXT</code> separator corresponds to one displayed line on your desktop. There are a lot of [http://conky.sourceforge.net/variables.html variables]available for displaying and modifying all kinds of information.


===Examples:===
* [https://pastebin.com/raw.php?i=PUS1RLFb Customized '''/etc/clamav/clamd.conf''' file for proper working.]<br/>
'''1.''' You can choose the color of your font using one of the following variables:
* [https://pastebin.com/raw.php?i=xuWSWm3P Customized '''/etc/clamav/freshclam.conf''' file for proper working.]
$color
${color1}
Every variable is marked with a <code>$</code> sign and by <code>{ }</code> brackets (only needed, if the variable contains more than one word).


'''2.''' You can call the default font (and it's size) with this command:
Fix ''clamd.sock'' error:
$font
If you want a different font (DejaVuSerif) and font size (9) in your conky, use this command in your <code>.conkyrc</code> code:
${font DejaVuSerif:size=9}


'''4.''' This code line displays the kernel you are using (using <code>$alignr</code> just yields a nicer formatting, it is not necessary):
sudo touch /var/lib/clamav/clamd.sock
Kernel: $alignr$kernel


'''5.''' This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes.
  sudo chown clamav:clamav /var/lib/clamav/clamd.sock
  ${rss http://manjaro.org/feed/ 60 item_titles 3}


'''6.''' Information about the root partition <code>/</code> of your manjaro installation is displayed using
First update database:
Root: ${alignr}${fs_used /} of ${fs_size /}


'''7.''' Instead of example 4, you can use the following code to display the exact same information:
  sudo freshclam -v
  Kernel: $alignr${execi 3600 uname -r}
The variable <code>${execi 3600 XXXX}</code> runs the <code>XXXX</code> bash code in your terminal every 3600 seconds and displays the result in your conky. The result of the <code>uname -r</code> bash command is your currently used kernel name.


Use any bash command instead of <code>XXXX</code> you can think of. The bash commands can be as long and complicated as you want.
Setup daemons:
sudo freshclam -d


Warning: Using complicated bash commands (e.g. which call other programs or use large files) with low intervals (e.g. <code>${execi 2 XXXX}</code> runs the <code>XXXX</code> code once every 2 seconds and displays it's result in your conky) can use a lot of hardware resources and/or make your computer unresponsive.
sudo systemctl enable clamd && sudo systemctl enable freshclamd


sudo systemctl start clamd && sudo systemctl start freshclamd


=Running conky=
Check status daemons:


If you want to display a conky on your desktop a <code>.conkyrc</code> file with code in it is required. Next, open a terminal and run conky:
  sudo systemctl status clamd && sudo systemctl status freshclamd
  conky
or
conky -d
if you want to run conky as a background daemon.


Check database version:


If you want to run conky automatically after each boot of your computer, you need to find out how to autostart a program. This depends on the Desktop Manager you are using. Putting one of the following commands into your autostart folder/file/script/command should work:
  freshclam -V
  conky


sleep 20 && conky
= ClamTK - graphical interface of ClamAV =


sh -c "sleep 20 && conky"
ClamTK is available in AUR. You can install it by command:
<code>sleep 20</code> delays the start of conky by 20 seconds after your Desktop Environment has started. adjust this value to your liking.


yaourt -S clamtk


If you want to reload conky with the latest <code>.conkyrc</code> file (e.g. you changed a variable and want to see the consequences) use one of the following commands:
TIP: ClamTK need full gnome icon theme installed. If some icon's are missing, then will don't start.  
killall conky && conky


  pkill conky && conky
* Fix for KFaenza icon theme:
Paste this code and save as file and execute in terminal as root.
   
#!/bin/sh
sudo ln -s /usr/share/icons/KFaenza/places/16/network-workgroup.png /usr/share/icons/KFaenza/places/16/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/22/network-workgroup.png /usr/share/icons/KFaenza/places/22/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/32/network-workgroup.png /usr/share/icons/KFaenza/places/32/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/48/network-workgroup.png /usr/share/icons/KFaenza/places/48/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/64/network-workgroup.png /usr/share/icons/KFaenza/places/64/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/128/network-workgroup.png /usr/share/icons/KFaenza/places/128/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/256/network-workgroup.png /usr/share/icons/KFaenza/places/256/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/scalable/network-workgroup.png /usr/share/icons/KFaenza/places/scalable/gtk-network.png


=Support=


=More=
Official forum topic: [http://forum.manjaro.org/index.php?topic=9638]


After having read everything about conky, it is time to create your own. The easiest way for beginners is to look at screenshots of conkys (and the corresponding <code>.conkyrc</code> files) and copy and paste the parts you like into your own <code>.conkyrc</code> file. Later, you can modify your <code>.conkyrc</code> code to your liking.
=See Also=
A dedicated conky thread in the Manjaro Forum with a lot of <code>.conkyrc</code> files and screenshots is available [https://forum.manjaro.org/index.php?topic=2991.0 here]. A massive conky thread is available in the [http://ubuntuforums.org/showthread.php?t=281865 Ubuntu forum]. Searching on the Internet for <code>.conkyrc</code> can yield a lot of great <code>.conkyrc</code> files, too.


A detailed [https://wiki.archlinux.org/index.php/conky Arch Wiki entry]exists. It contains a lot of useful information and links.
[http://www.clamav.net/lang/en/ ClamAV Homepage]


The [http://conky.sourceforge.net/ homepage]of the conky project can be interesting, especially the [http://conky.sourceforge.net/documentation.html documentation].
[https://code.google.com/p/clamtk/ ClamTK Homepage]


A forum discussion thread about this Manjaro Wiki page is available [https://forum.manjaro.org/index.php?topic=16844.0 here]
[https://aur.archlinux.org/packages/clamtk/ AUR:clamtk]




=Troubleshooting & Tips=
[[Category:Contents Page]]
 
==Missing rings==
If (often colored) rings are missing in your conky, please install the following package:
yaourt -S conky-lua
[https://wiki.manjaro.org/index.php?title=AUR#Searching_for_and_Installing_Software_From_the_AUR Here]is help for installing packages from the Arch User Repository, in case you need it.
 
==Missing network information==
If network information is missing like download speed or network name (SSID), you need to replace the network card name in network variables in the <code>.conkyrc</code> file with your network card name.
 
Open a terminal and enter
ip a
in order to see all available network cards in your computer. A sample output looks like this:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> ....
2: enp9s0: <BROADCAST,MULTICAST,UP,LOWER_UP> .....
3: wlp2s0: <BROADCAST,MULTICAST> .....
In this case, <code>enp9s0</code> is the name of your ethernet card and <code>wlp2s0</code> is the name of your wireless network card. Replace all network card names (e.g. <code>wlan0</code>, <code>eth0</code>) in network variables in your <code>.conkyrc</code> file with your preferred network card name.
 
==FAQ==
A detailed FAQ is available [http://conky.sourceforge.net/faq.html here]
 
 
 
 
=Alternative: Conky Manager=
 
For everybody, who does not like to look at conky code and mess around in config files or who just wants a quick and simple conky, Conky Manager is great. Conky Manager offers a simple GUI for managing and customizing conkys. Additional theme packs are available, too.
 
==Installation==
yaourt -S conky-manager
[https://wiki.manjaro.org/index.php?title=AUR#Searching_for_and_Installing_Software_From_the_AUR Here]is help for installing packages from the Arch User Repository.
 
==Additional information==
Recently, a new version of [http://www.teejeetech.in/2014/06/conky-manager-v2-released.html Conky Manager]has been released. Shortly after, a couple of [http://www.teejeetech.in/2014/06/conky-manager-v2-themes.html theme][http://www.teejeetech.in/2014/07/my-conky-themes-update-2.html packs].
 
There are also [http://www.teejeetech.in/2013/07/super-conky-package.html theme][http://www.teejeetech.in/2013/07/deluxe-conky-theme-pack.html packs]available for the previous version. Full compatibility is not guaranteed, but they are definitely worth a try.
 
A [https://www.youtube.com/watch?v=Va2rnyZJe10 Youtube]video with basic tips is available as well.

Revision as of 20:56, 7 March 2015

Clam.png

About

Clam AntiVirus (ClamAV) is a free, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. The application was developed for Unix and has third party versions available for AIX, BSD, HP-UX, Linux, OS X, OpenVMS, OSF (Tru64) and Solaris. As of version 0.97.5, ClamAV builds and runs on Microsoft Windows. Both ClamAV and its updates are made available free of charge. Sourcefire, now acquired by Cisco, a maker of intrusion detection products and the owner of Snort, announced on 17 August 2007 that it had acquired the trademarks and copyrights to ClamAV from five key developers.

ClamAV includes a number of utilities: a command-line scanner, automatic database updater and a scalable multi-threaded daemon, running on an anti-virus engine from a shared library. The application also features a Milter interface for sendmail and on-demand scanning. It has support for Zip, RAR, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS formats, most mail file formats, ELF executables and Portable Executable (PE) files compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor. It also supports many document formats, including Microsoft Office, HTML, Rich Text Format (RTF) and Portable Document Format (PDF). The ClamAV virus database is updated several times each day and as of 30 October 2011 contained 1,063,024 virus signatures with the daily update Virus DB number at 13867.

ClamAV is currently tested daily in comparative tests against other antivirus products on Shadowserver. In 2011, Shadowserver tested over 25 million samples against ClamAV and numerous other antivirus products. Out of the 25 million samples tested, ClamAV scored 76.60% ranking 12 out of 19, a higher rating than some much more established competitors. ClamAV was included in comparative tests against other antivirus products. In the 2008 AV-Test it rated: on-demand: very poor, false positives: poor, on-access: poor, response time: very good, rootkits: very poor. In a Shadowserver six-month test between June and December 2011, ClamAV detected over 75.45% of all viruses tested, putting it in fifth place behind AhnLab, Avira, BitDefender and Avast. AhnLab, the top antivirus, detected 80.28% [1]

Installing ClamAV

ClamAV is available in official repository. You can install it by command:

sudo pacman -S clamav

Setup ClamAV

Prepare configuration files:

sudo cp /etc/clamav/clamd.conf.sample /etc/clamav/clamd.conf
sudo cp /etc/clamav/freshclam.conf.sample /etc/clamav/freshclam.conf

Edit configuration files:

sudo gedit /etc/clamav/clamd.conf
sudo gedit /etc/clamav/freshclam.conf

Replace the contents of the configuration files as follows:

Fix clamd.sock error:

sudo touch /var/lib/clamav/clamd.sock
sudo chown clamav:clamav /var/lib/clamav/clamd.sock

First update database:

sudo freshclam -v

Setup daemons:

sudo freshclam -d
sudo systemctl enable clamd && sudo systemctl enable freshclamd
sudo systemctl start clamd && sudo systemctl start freshclamd

Check status daemons:

sudo systemctl status clamd && sudo systemctl status freshclamd

Check database version:

freshclam -V

ClamTK - graphical interface of ClamAV

ClamTK is available in AUR. You can install it by command:

yaourt -S clamtk

TIP: ClamTK need full gnome icon theme installed. If some icon's are missing, then will don't start.

  • Fix for KFaenza icon theme:

Paste this code and save as file and execute in terminal as root.

#!/bin/sh
sudo ln -s /usr/share/icons/KFaenza/places/16/network-workgroup.png /usr/share/icons/KFaenza/places/16/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/22/network-workgroup.png /usr/share/icons/KFaenza/places/22/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/32/network-workgroup.png /usr/share/icons/KFaenza/places/32/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/48/network-workgroup.png /usr/share/icons/KFaenza/places/48/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/64/network-workgroup.png /usr/share/icons/KFaenza/places/64/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/128/network-workgroup.png /usr/share/icons/KFaenza/places/128/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/256/network-workgroup.png /usr/share/icons/KFaenza/places/256/gtk-network.png
sudo ln -s /usr/share/icons/KFaenza/places/scalable/network-workgroup.png /usr/share/icons/KFaenza/places/scalable/gtk-network.png

Support

Official forum topic: [2]

See Also

ClamAV Homepage

ClamTK Homepage

AUR:clamtk

Cookies help us deliver our services. By using our services, you agree to our use of cookies.