Archive

Posts Tagged ‘tools’

configure battery power settings in Gnome

January 25, 2013 Leave a comment

Gnome desktop does not allow users to set the values for battery critical state, Power settings will only allow users to set what action is to be taken when the battery is critical. By default it is considered critical when battery backup time is  5 minutes and it will initiate battery critical action when backup time remaining is 2 minutes. This default behavior is questionable because 2 minutes will not be sufficient for all users to find a power source and as most batteries used today are lithium-ion batteries, their life will get significantly reduced by this default behavior when drained so low so often.

Fortunately, this can be changed in configuration editor. systems using older Gnome versions such as Gnome2 desktops had a tool called Gconf-editor to change these configuration settings. Newer Gnome versions such as systems using Gnome3 desktop use a tool called dconf-editor to make changes to these configuration settings.Install this tool by using below command from terminal

sudo apt-get install dconf-editor

After installing open dconf-editor and look for following path in the left pane

dconf-editor

/org/gnome/settings-daemon/plugins/power/

In the right pane look for the fields,

time-action

time-critical

time-low

and change the time values for the fields according to your preferences.Note that the time is defined in seconds.

Description for the fields and the type of value it accepts will be available at the bottom pane, when you select the fields.

Alternatively, if you want your system to consider the battery percentage instead of remaining time, uncheck the key

use-time-for-policy

and modify the keys

percentage-action

percentage-critical

percentage-low

to your preference.Now your system should take the values you defined after the next boot or restart your system for the settings to take effect immediately.

Advertisements

Recover files from your drive even if the drive file system is corrupt

April 8, 2010 1 comment

Most files can be recovered from storage drives even it is deleted , but in some rare cases where the file system of the drive itself  is corrupt then the data recovery becomes very difficult but not impossible .Consider a situation in which the memory card of your digital camera is corrupt and is unusable without being formatted , but if formatted all the precious pictures in it will be lost.In such extreme cases a little command line tool in Linux called magicrescue can be used. magicrescue can be used in cases where the drive’s filesystem or partition is completely corrupt or unusable and it can only be used to restore known file types such as images, mp3 etc .

If you are using ubuntu or any debian based Linux distribution ,install magicrescue by typing the following in terminal:

sudo apt-get install magicrescue

or else install it by using the distibution’s package manager.

After installing magicrescue connect your corrupted flash drive or memory card to the system , chances are that they do not get mounted due to corrupted filesystem . Find the hardware address of the drive ,for example if it is a flash drive the hardware address might be /dev/sdb or if it is a memory card you can find it in /dev/disk/by-id/ and will contain usb-card-reader or something like that, be careful not to select the wrong device.

magicrescue requires two mandatory options -d and -r. -d for specifying the output directory and -r to specify the recipe or the type of file to extract ,if multiple file types are to be extracted -r can be used successively.

For example if you want to extract jpeg files from the drive sdb ,the command to be used is:

sudo magicrescue -d ./Pictures/ -r jpeg-jfif -r jpeg-exif /dev/sdb

sudo is necessary because ordinary user cannot access the drive hardware directly and ./Pictures/ is the output directory and jpeg-jfif and jpeg-exif are jpeg filetypes and /dev/sdb is the drive from which the images are to be extracted.