Search

Script to launch open a site repeatedly at regular intervals.

Here is a script which can be used to open a website at regular intervals and close the browser cleanly, repeatedly as long as you don't force close the script. This could be useful when you want to monitor something on a site or a wait for some news on a site and don't want to keep opening it manually.



If you do not want to use firefox, you can replace the firefox command with the command to launch the browser of your choice.
Save the above script as run_repeat.sh, and execute it.

The script will prompt you to enter the website and delay times

The script will keep launching firefox and opening the site http://google.com, wait for 30 seconds and close it and launch it again after a delay of 30 seconds.

Create 2017 on the terminal using any character

Here is a bash script which can be used to create the text 2017 on the terminal using any characher of your choice.



Copy the script and save it as 2017.sh. Open a terminal and type

It will prompt for the characher which should be used.

We have entered "*" as the characher, and you should see the output as shown below, the colors will be chosen randomly.

Close application cleanly from command line

In Linux we can close any application from the terminal by using the commands



Both these commands will close the application, but not in a clean way ut it will kill them abruptly, for example if we are running firefox and we use



Firefox will be killed abruptly and when we next open it, firefox will ask us whethe we want to restore the previous session as it was not closed properly.

ON the ther hand if we want to close the application cleanly we can use the command



To kill fiefox cleanly all we will have to do is



Firefox will exit cleanly and not get killed in an abrupt manner.

wmctrl can be installed from the package manger in debian based systems using apt




Mate battery applet not visible

Some times a new mate desktop installation might not show the battery usage aplet in the panel. To get the aplet in the panel we need to install the package "mate-power-manager"





The installation by itself will note enable the applet in the panel, we will have to add the applet to the panel manually.

Right click any where on the panel and select Add to panel.



Click on custom application launcher



Name : Power manager Command: mate-power-manager Click on OK.



Now the power manager should appear on the panel.

Unhandled error message: Error when getting information for file '/media/ntfs': Input/output error

On inserting a external drive or a pen drive which has is formatted as NTFS we might come across the error



One of the common causes of the error is faulty NTFS driver. So an update of the driver should help us in resolving the issue. For example we can get the latest NTFS driver from https://www.tuxera.com/community/open-source-ntfs-3g/

For example the latest driver is



Once you have downloaded the driver run the following commands to install it

Now if you insert the drive, it should work with out any errors.

I found this solution at



Checking for data validity in libreoffice spreadsheets

When entering data into the spread sheet, we might want at times to ensure that the data entered lies with in a specified range or is equal to certain number or value. To ensure this we can use the data validity option in libreoffice spreadsheet.

To enable data validity select the range of cells on which the validity needs to be applied. Then select the option validity option from data -> validity.

 photo data_validity_select.png

This will pop a menu as shown below.

 photo data_validity_select_menu.png

In the criteria tab the "allow" option will help we can chose the what type of numbers are valid. In the data option we can choose the what should be the value of the data i.e should it be greater than or lesser than a number etc, and the text field allows us to enter the maximum number to be allowed in the cells.

Let us say we want to allow "Whole numbers" which are "less than" 100, then the setting will be as shown below.

 photo data_validity_100.png

Now when ever we enter a value equal to greater than 100 in the selected range of cells we will get an error as shown below.

 photo data_validity_check.png

We can add a message next to the cells that have data validity enabled in them by selecting the input tab and entering a message that we wish to display next to the cells as shown below.

 photo data_validity_message.png

 photo data_validity_message_display.png