Pages

Monday, September 12, 2011

Setup HP LaserJet P1006 in Debian + Gnome

In the Gnome graphical printer interface
sudo apt-get install System-config-printer

Install the HP LaserJet drivers -
sudo apt-get install hplip

Configure the HP LaserJet printer -
sudo hp-setup -i

This will also work for many other HP printers.

Sunday, September 11, 2011

Apt-Pinning

Apt-Pinning allows you to install packages from testing/unstable/experimental on your Debian install without running into dependency and upgrade problems. It works by telling apt to give priority to one repository, in my case testing, and only install upgrades from it, while ignoring unstable and experimental unless I specifically request a package to be installed from them.

The Apt-Preferences Manual

You can find your apt-preference under /etc/apt/preferences

Debian installs do not come with a apt-preferences file.

To make apt-preference file:
sudo touch /etc/apt/preferences


My Apt Pining File -
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 900

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 300

Package: *
Pin: release o=Debian,a=experimental
Pin-Priority: 100

Package: *
Pin: release o=Debian
Pin-Priority: -1

To Install packages from other repositories:

sudo apt-get install PACKAGE NAME/unstable  
- tries to install package trying to use the default (in my case testing) dependencies

sudo apt-get -t unstable install PACKAGE NAME
- installs the package using dependencies from unstable

*Replace unstable with experimental to install packages from Debian's experimental repository

Wednesday, June 15, 2011

Edit Webpages in Firefox

In the URL box enter: 
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

Friday, January 7, 2011

Configure the Synaptic Touchpad - Enable Multitouch Emulation

Source: The Debian Wiki Synaptics Touchpad Article

Written for Debian Squeeze, for the Dell Mini 9/10v & Vostro A90. The touchpad used in these models do not support multitouch gestures but it can be emulated.

Create an xorg
in a terminal:
sudo Xorg :1 -configure

Download my touchpad configuration file
- it contains all the options available for the synaptic touchpad driver.
- horizontal & vertical scroll, double tap and two finger middle click are enabled.

Copy the contents in my content configuration file into 50-synaptics.conf.
In a terminal:
sudo mousepad /usr/share/X11/xorg.conf.d/50-synaptics.conf
- if you do not use xfce replace mousepad with your desktop environment's text editor
- you can edit these values to further configure the touchpad driver to your liking.

Reboot your PC or restart x to apply these changes.
In a terminal:
sudo reboot

To learn what all the options do:
in a terminal:
man 4 synaptics

I don't use two finger Mac-like scrolling but to enable it add these options to your 50-synaptic.conf file:
option     "VertTwoFingerScroll"      "1"     # multitouch
option     "HorizTwoFingerScroll"     "1"     # multitouch

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.