Monday, December 20, 2010

Use Laptop Mode to Save Power Based on Battery/AC Status

Laptop mode is a Linux kernel feature that allows your laptop to save considerable power, by allowing the hard drive to spin down for longer periods of time. This package contains the userland scripts that are needed to enable laptop mode.

It includes support for automatically enabling laptop mode when the computer is working on batteries. It also supports various other power management features, such as starting and stopping daemons depending on power mode, automatically hibernating if battery levels are too low, and adjusting terminal blanking and X11 screen blanking

laptop-mode-tools uses the Linux kernel's Laptop Mode feature and thus is also used on Desktops and Servers to conserve power

To install laptop-mode-tools, in a terminal type:
sudo apt-get install laptop-mode-tools

To read the laptop-mode-tools user manual, in a terminal type:
man laptop-mode.conf

To edit laptop-mode-tools settings, in a terminal type:
sudo mousepad /etc/laptop-mode/laptop-mode.conf
- if you aren't using mouspad as your text editor replace mousepad with the correct program

Disable Google Instant & Preview

First install the Iceweasel/Firefox addon Adlock Plus.

- Go to Adblock preferences, you can find it under Tools>Adblock Plus Preferences.
- Add a new filter, you can find it under Filters>Add filter.
- Add this filter:
  • http://www.google.com/extern_js/
- Click Apply to save your settings.

Sunday, December 12, 2010

Merge PDFs Files

Install pdftk. pdftk is a command line tool used to merge pdfs files.
In a terminal type:
sudo apt-get install pdftk

Now you can merge pdf files by putting them in the same directory and in a terminal typing:
pdftk 1.pdf 2.pdf 3.pdf cat output merged.pdf
- substituting the number for the names of the pdfs files.

More options can be found on the pdftk website. pdftk can split files, encrypt, decrypt, password protect, rotate an image, etc.

Sunday, September 19, 2010

How to Properly Delete a Drive

Shred is a Unix command that can be used to securely delete files and devices so that they can be recovered only with great difficulty with specialized hardware, if at all1. It is a part of GNU Core Utilities.

Erasing a file usually only erases the file system entry and keeps the content of the file intact. This frequently allows the file to be recovered using commonly available software. Even if the file is overwritten, residual magnetic fields may allow data recovery using specialist hardware equipment.

To prevent this, shred overwrites the file multiple times using patterns chosen to maximize destruction of the residual data. The articles data erasure and data remanence have additional information.
Source: Wikipedia

To use shred in a terminal type:
sudo shred -vfz -n 3 /path to drive

This command is dangerous as it makes your files unrecoverable. Make sure you know what you are doing.

The -vfz part:
v, --verbose show progress
f, --forces change permissions to allow writing if necessary
z, adds a final overwrite with zeros to hide shredding

The -n 3 part:
Overwrite the disk 3 times, the default is 3
You can change the number depending on how thorough you want to delete your data. The more overwrites the longer the process. If you're really paranoid 10 will shred it for sure plus a couple more times.

The /path to drive is the most important. Make sure you have the correct path to your drive.

To list all drives currently connected to your PC in a terminal type:
sudo fdisk -l

Saturday, September 4, 2010

Thunar Dropbox

Thunar Dropbox is a plugin that adds context-menu items from dropbox into the Thunar file manager.



You can find a installation .deb on maato's softwarebakery site.
http://www.softwarebakery.com/maato/thunar-dropbox.html

For help installing Dropbox in xfce read my guide.

Friday, September 3, 2010

Add A User To A Group

In a terminal with root/super user privileges:

adduser username group

For example I wanted to add myself to the groups lp sys & lpadmin to remove a old HP print driver I had installed.

red@red-desktop:~$ sudo adduser red lp
Adding user `red' to group `lp' ...
Adding user red to group lp
Done.
red@red-desktop:~$ sudo adduser red sys
Adding user `red' to group `sys' ...
Adding user red to group sys
Done.
red@red-desktop:~$ sudo adduser red lpadmin
Adding user `red' to group `lpadmin' ...
Adding user red to group lpadmin
Done.

Thursday, August 26, 2010

Disbale Zoom in Iceweasel/Firefox

To access Iceweasel/Firefox's configuration settings, type about:config into the Awesome Bar (URL).

In about:config change:
zoom.maxPercent : 100
zoom.minPercent : 100
toolkit.zoomManager.zoomValues : 1

The Original Values are:
zoom.maxPercent : 300
zoom.minPercent : 30
toolkit.zoomManager.zoomValues : .3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3
In case you want to turn zoom back on.