-2

I've installed Ubuntu desktop version in Windows environment. When I try to run clamtk from the cmd line. I get the following message:

Unable to init server: Could not connect: Connection refused

(clamtk:1748): Gtk-WARNING **: 14:37:01.223: cannot open display:

Can anyone help please

Thank you Farid Z

2
  • The error message is (almost) self-explanatory: It needs a display server. WSL installations typically don't have one, something that should be obvious. If you want to run ClamAV in such scenario - why is an entirely different question, at first glance it seems absurd - then you can only use the command line version (if it has such option, of course). Apr 22, 2022 at 15:26
  • 1
    There is, apparently: howtoforge.com/tutorial/clamav-ubuntu Apr 22, 2022 at 15:29

1 Answer 1

0

That is because you need a display to run graphical tools and wsl does not have that.

You need clamav to scan from command line. For all the options:

clamscan –-help

And to scan /home/ with a ring of the internal bell if a virus is found:

clamscan -r --bell -i /home/

Mind that all virusscanners are meant to scan for Windows related problems. Linux files are created differently and virusscanners never seem to get that correctly. Most (if not all) of the warnings you get are bogus as the method used in Linux files might look like a Windows virus but is normal behaviour -for Linux-.

You are better off making regular timebased backups of your personal files and store them in the cloud.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .