Ubuntu: Is this fix for Avast Antivirus crashing safe to use?


Well I have installed avast anti virus on Ubuntu 12.04. But after updating, it crashes! So I have made some tweaks like below:

  1. Press Ctrl+Alt+T to open the Terminal. When it opens, run the command below.

    sudo gedit /etc/init.d/rcS  
  2. Type your password and hit Enter.

  3. When the text file opens, add the line:

    sysctl -w kernel.shmmax=128000000  
  4. Make sure the line you added is before:

    exec /etc/init.d/rc S  
  5. This is what it should look like:

    #! /bin/sh    # rcS    #  # Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order  #    sysctl -w kernel.shmmax=128000000    exec /etc/init.d/rc S  
  6. Save the file.

  7. Reboot.

My question is: Did I do anything wrong? I mean as I have made some tweaks, will it lower the security of Avast down like viruses do? Please if you are a programmer check this if it contains bug or harmful intentions... Thanks.


This does not look to be harmful. Basically, these changes seem to me as if they were meant to ensure, that every time you start your computer, the virtual RAM filesystem that is available in /dev/shm/ is resized to some great size, probably to ensure that some temporary files that are going to be stored there will fit.

On the other hand, I have no clue why would this possibly could lead to fixing application crashes. It will not do any harm, but I doubt this fix can help.

Also, I need to admit I am not sure whether these changes will have any effect on ubuntu machine. These changes modify init.d files, while Ubuntu has migrated long time ago to another startup system, called Upstart, and it is possible that not only they will not fix anything, but will simply have no result.

Anyway, it's safe to try if you want to.


I have just changed from Ubuntu 10.04 LTS which needed the same fix as shown in the first reply. Now I'm on Lubuntu 12.04 and have applied the fix as follows in LX terminal:

sudo leafpad /etc/init.d/rcS  

Then add line as in the first answer.

If you want to run avast just in the current sesssion (or to check if it works), then go to LX terminal and run this line:

sudo sysctl -w kernel.shmmax=128000000  


Here at Avast forum moderators say that it really fixes the problem and users confirm that: http://forum.avast.com/index.php?topic=57775.0 But wouldn't it make Ubuntu slower?


Have you tried this?


I have not yet tried it. I am a newbie to Ubuntu

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »