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:
- 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.

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
red@red-desktop:~$ sudo adduser red sys
Adding user `red' to group `sys' ...
Adding user red to group sys
red@red-desktop:~$ sudo adduser red lpadmin
Adding user `red' to group `lpadmin' ...
Adding user red to group lpadmin

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.

Tuesday, August 24, 2010

Fix Glipper Startup Bug

Glipper is clipboardmanager for GNOME. I use it extensively when writing. The only problem is that there is a bug that crashes Glipper when loading the GNOME desktop.

Glipper starts before a service it needs, resulting in this error message:
The panel encountered a problem while loading OAFIID:Glipper....

By adding a delay to Glipper at startup we can allow all need components to load before Glipper.

in a terminal type:
sudo gedit /usr/lib/glipper/glipper

add these two lines at the top of the file to delay glipper from loading:
import time
- if your computer is older you might have to increase the (8) to a larger number.

Your file should look very similar to this:
#!/usr/bin/env python
# Glipper - Clipboardmanager for GNOME
# Copyright (C) 2007 Glipper Team
# bla bla bla
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import time
import gobject
import gtk, gnomeapplet, gnome
import getopt, sys
from os.path import *

Monday, August 23, 2010

Install Skype in 64-Bit Debian Squeeze

In a terminal type:
install ia32-libs ia32-libs-gtk libqt4-core libqt4-gui
wget -O skype-install.deb
- This will install the 32-bit compatibility dependencies, download the Skype client

sudo dpkg -i skype-install.deb
- this will install Skype

There is a know issue with Pulse Audio libraries crashing Skype in Debian Squeeze, use this work around:

In a terminal type:
sudo chmod a-r /usr/lib32/libpulse{,.so.0.8.0,}

Sunday, August 22, 2010

Generate an xorg.conf file

In order to generate xorg.conf you need to switch to a virtual console using the key combination CTRL + ALT + F1

Now execute the following commands:
sudo service gdm stop
- This command will stop the X.

sudo Xorg -configure
- this will generate the xorg.conf file in your home folder (the the proper location)

sudo mv ~/ /etc/X11/xorg.conf
- move and rename the newly created xorg file to the correct location

sudo reboot
- to reboot the machine, and allow the changes to take effect.

Install Adobe Flash 32-bit in Debian 64-bit

Flash is a bit of a pain to get setup in Debian Squeeze 64-bit. Follow these commands and you'll be youtubing and huluing in no time.

In a terminal type:
sudo apt-get -y purge flashplugin-nonfree > /dev/null;

sudo apt-get -y install fakeroot binutils nspluginwrapper ia32-libs;

sudo wget; sh;

sudo rm;

sudo dpkg -i ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb;

sudo rm "./ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb";

sudo wget;

sudo mkdir "/usr/lib/adobe-flashplugin" 2> /dev/null;

sudo rm -rf "/usr/lib/flashplugin-nonfree" 2> /dev/null;

sudo rm "/usr/lib/adobe-flashplugin/" 2> /dev/null;

sudo rm "/usr/lib/adobe-flashplugin/flashplayer.xpt" 2> /dev/null;

sudo dpkg -i --force-architecture "./install_flash_player_10_linux.deb" > /dev/null;

sudo rm "./install_flash_player_10_linux.deb";

sudo chown root:root "/usr/lib/adobe-flashplugin/";

sudo chmod 644 "/usr/lib/adobe-flashplugin/"
sudo nspluginwrapper --native --install /usr/lib/adobe-flashplugin/ 2> /dev/null

Saturday, June 26, 2010

Hide The Star & Go Awesome Bar Buttons In Firefox

In you userChrome.css file copy found in ~/.mozilla/firefox/default/chrome:
#urlbar-icons > #star-button
display:   none !important;

#urlbar-icons > #go-button
   display:   none !important;

save and restart Firefox

Tuesday, April 20, 2010

Removing Startup Cruft

Xfce session taking forever to load, is it auto-loading programs you don't want?

Delete the contents of:



to get to your fast booting xfce session.

How to Install Dropbox In Xfce

Dropbox is a file hosting service which uses cloud computing to enable users to store and share files and folders across multiple computers and on the web.

Now that I use Dropbox, I never have to worry about carrying round USB flash drives. All my shared files are stored across my computers and on the web. Dropbox+Xfce=Crazy Delicious.

How to Install Dropbox In xfce
Stolen from the Lubuntu Mailing List

In a terminal type:
- cd
- wget -O dropbox.tar.gz\?plat=lnx.x86
- tar -zxvf dropbox.tar.gz
- wget -nd
- wget -nd
- python

I did run into a bit of trouble when running:
red@vostro:~$ python
Traceback (most recent call last):
File "", line 39, in
File "", line 36, in compile_fakelib
raise Exception, ret[1]
Exception: sh: gcc: not found
If you see this, don't worry, Dropbox installed correctly.

To start Dropbox
In a terminal
- you can also make a launcher or shortcut for dropbox using the same command.
- In xfce you will need to replace the ~/ with /home/YOUR USER NAME/.dropbox-dist/dropboxd
- My launcher ends up being /home/red/.dropbox-dist/dropboxd

If you wuold like to try Dropbox, it's free. Use this referral link to get an extra 250MB of storage (that's 2.25GB of storage just for signing up).

Disable The Trackpad While Typing

To disable the trackpad while typing just run this command in the terminal
syndaemon -i 1 -d

In xfce, if you want to start the touchpad delay at boot go to Settings>Xfce 4 Setting Manager
Under Session and Startup, in the Application autostart tab, click Add

Create an entry for the touchpad delay

Name: Touchpad Delay
Description: delay the touchpad 1 second
syndaemon -i 1 -d

- hit OK and restart your session for the delay to take effect.

Monday, February 22, 2010

Configure Your Synaptic Touchpad With udev

Editors Note -
Configuring the Touchpad in Debian using udev no longer works. Now you have to configure it through xorg. Use this guide to configure your touchpad settings.


xserver-xorg-input-synaptics 1.2.1-1 changed the handling of the synaptic touchpad driver from HAL to udev. Due to the switch, custom configuration files in /etc/hal/fdi/policy/ no longer work. In order to get the touchpad to tap to click, horizontal scroll, vertical scroll etc you need to write a udev rules file.

In a terminal type:
sudo gedit /etc/udev/rules.d/65-xorg-synaptics-hubi.rules

In this file copy:
ACTION!="add|change", GOTO="xorg_synaptics_hubi_end"
KERNEL!="event*", GOTO="xorg_synaptics_hubi_end"

ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="xorg_synaptics_hubi_end"



In this file you can add options and values for ever aspect of the synaptic touchpad driver and configure it to your finger size and personal preferences.

For a list of options for the synaptic touchpad
In a terminal type:
man synaptics

Here is an example I wrote for the Dell Mini 9/Vostro A90
ACTION!="add|change", GOTO="xorg_synaptics_hubi_end"
KERNEL!="event*", GOTO="xorg_synaptics_hubi_end"

ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="xorg_synaptics_hubi_end"

ENV{x11_options.ClickTime }="100"


You can download my 65-xorg-synaptics-hubi.rules here.

Saturday, February 20, 2010

Cisco Virtual Private Network with Network Manager

NetworkManager has pluggable support for Virtual Private Network software, including Cisco compatible VPNs using vpnc.

In a terminal type:
sudo apt-get install network-manager-vpnc network-manager-vpnc-gnome

After installing network-manager-vpnc and the gui (network-manager-vpnc-gnome) for xfce4 or gnome. Left click the NetworkManager panel icon and select VPN Connections>Configure VPN...

From there, import the network's VPN's settings file. After connecting you will be prompted for your password.

Thursday, January 7, 2010

Install Kernel Source in Debian

In a terminal type:
sudo apt-get install kernel-headers-`uname -r`

uname -r
- this will output your kernel version and amend it kernel-headers

Wednesday, January 6, 2010

Apt Archives

Where are all the .debs kept that you download via apt?

Sunday, January 3, 2010

Force Network Manager to Manage Wired Connection

This is helpful if you built your system from scratch and run into problems with wired connections with network-manager.

In a terminal:
sudo gedit /etc/network/interfaces
comment out (#) all the entries related to your wired network device, save and then restart. This will allow network-manager to manage your wired connection.

Friday, January 1, 2010

Install Amazon Mp3 Player In Debian Squeeze

Amazon deserves credit for releasing it's Amazon Mp3 Downloader software for Linux but installing it in Debian Squeeze is frustrating. Amazon only provides a deb and support for Debian 5 (Lenny), while Debian 6 (Squeeze) is still in testing.

Installing the Debian Lenny .deb of Amazon's Mp3 player requires older libraries that are not available in Squeeze. You will need download the Lenny version of:
I have collected all the dependiences and they are aviable for download here. Install them in the order above.

After installing these dependences you can then install the Lenny version of Amazon's Mp3 Downloader.