Ubuntu Screen Recorder

Ubuntu come with screen recorder, this can be activated with shortcut

By default, it will record for 30 seconds. Video get saved in your home directory (/home/USERNAME) in webm format.

If you want to increase time, you can run following command

It is better to set this to 0, this way record never auto stop. You need to manually stop recording with CTRL + ALT + SHIFT + R key combination.


inotifywait monitor changes in Linux file system. It can be used to track file changes.

Here is inotifywait command used by bitninja to detect uploaded files.


When you make a copy of your site for development/testing purpose, you don’t need search engines index your site as it will cuase duplicate content.

To disable indexing of a website by search engines, create a file with name robots.txt with following content.

VLC Custom User Agent

VLC using custom HTTP User-Agent

To change User-Agent in VLC player, go to

Click on “Show more options” check box. In “Edit Options” text box, you can specify your User-Agent like

VLC Custom User Agent


MySQL cannot connect via localhost

On an Apache server, MySQL can’t connect when you use localhost, but it work when you chane to IP address

When you use “localhost”, it use socket for connecting to MySQL server, this is faster than using TCP/IP connection, that is used when you use IP address to connect to MySQL server.

First find out socket path. To do this login to MySQL server, run

mysql socket

See if you can connect using this socket with command

login to mysql using socket

In this cause, login to MySQL using socket worked.

I created a simple test PHP script to verify MySQL connection, it was able to connect to MySQL server using “localhost”.

Same script did not work when i try access it using web server. So the problem is web server user not able to connect to MySQL socket. You need to check permission for socket and parrent folders. In this case problem is fixed by running

You can verify enabling SSH access for web server user, then connect to MySQL using command line or try access socket file as apache user.

MySQL Socket Path in php.ini

When a PHP application use localhost to connect, PHP find location of socket from php.ini, you need to verify this path set in php.ini is same as the socket path used by MySQL server.

If path is differnt, you need to make it same. You can either modify php.ini or MySQL server config file.

redis commander

redis commander

redis-commander is a GUI for redis. To install, run

redis commander

LiteSpeed Web Server

Install LiteSpeed Web Server

LiteSpeed is a high performance web server. Unlike most other web servers, this is a paid software, so you will need to purchase a license or get trail key before you can use it.

To install LiteSpeed, download latest version of the software from


At this time of writing this post, latest version of LiteSpeed is 5.4.7

Before you can run the install.sh script, you need to copy your license key to this folder. It will ask you few questions. Once installed, admin interface will be available on URL


LiteSpeed Web Server


Disable ModSecurity for a specific URL

On a web site that is protected with ModSecurity, when admin edit HTML pages in admin area, ModSecurity falsely detect it as XSS attack.


What we can do is disable specific rules that create this false positive. But in this case, it is bceause HTML is submitted. This application normally done need HTML submitted on any other part of the site. So it is better just disable ModSecurity for the specific URL that cause this error.

To do this, add following code to Apache VirtualHost entry for this web site.

This will disable ModSecurity for URLs /admin_area/manage_pages.php and /admin_area/edit_announcement.php