Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

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

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.

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
time.sleep(8)
- 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
time.sleep(8) 
import gobject
gobject.threads_init()
import gtk, gnomeapplet, gnome
import getopt, sys
from os.path import *

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 ~/xorg.conf.new /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 http://people.debian.org/~bartm/flashplugin-nonfree/ia32-libs-workaround-499043-squeeze.sh; sh ia32-libs-workaround-499043-squeeze.sh;

sudo rm ia32-libs-workaround-499043-squeeze.sh;

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 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.deb;

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/libflashplayer.so" 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/libflashplayer.so";

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

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:

~/.cache/sessions

~/.config/autostart

to get to your fast booting xfce session.

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"

ENV{x11_driver}="synaptics"
ENV{x11_options.VertEdgeScroll}="true"
ENV{x11_options.HorizEdgeScroll}="true"

LABEL="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_driver}="synaptics"
ENV{x11_options.LeftEdge}="1600"
ENV{x11_options.RightEdge}="5000"
ENV{x11_options.TopEdge}="1600"
ENV{x11_options.BottomEdge}="4200"
ENV{x11_options.FingerLow}="24"
ENV{x11_options.FingerHigh}="28"
ENV{x11_options.FingerPress}="255"
ENV{x11_options.MaxTapTime}="180"
ENV{x11_options.MaxTapMove}="220"
ENV{x11_options.MaxDoubleTapTime}="180"
ENV{x11_options.SingleTapTimeout}="180"
ENV{x11_options.ClickTime }="100"
ENV{x11_options.FastTaps}="1"
ENV{x11_options.EmulateMidButtonTime}="80"
ENV{x11_options.EmulateTwoFingerMinZ}="66"
ENV{x11_options.EmulateTwoFingerMinW}="12"
ENV{x11_options.VerteScrollDelta}="100"
ENV{x11_options.HorizScrollDelta}="100"
ENV{x11_options.VertEdgeScroll}="true"
ENV{x11_options.HorizEdgeScroll}="true"
ENV{x11_options.CornerCoasting}="0"
ENV{x11_options.VertTwoFingerScroll}="false"
ENV{x11_options.HorizTwoFingerScroll}="false"
ENV{x11_options.MinSpeed}="0.4"
ENV{x11_options.MaxSpeed}="0.7"
ENV{x11_options.AccelFactor}="0.00995"
ENV{x11_options.EdgeMotionMinZ}="30"
ENV{x11_options.EdgeMotionMaxZ}="160"
ENV{x11_options.EdgeMotionMinSpeed}="1"
ENV{x11_options.EdgeMotionMaxSpeed}="400"
ENV{x11_options.EdgeMotionUseAlways}="0"
ENV{x11_options.UpDownScrolling}="1"
ENV{x11_options.LeftRightScrolling}="1"
ENV{x11_options.UpDownScrollRepeat}="1"
ENV{x11_options.LeftRightScrollRepeat}="1"
ENV{x11_options.ScrollButtonRepeat}="100"
ENV{x11_options.TouchpadOff}="0"
ENV{x11_options.GuestMouseOff}="0"
ENV{x11_options.LockedDrags}="0"
ENV{x11_options.LockedDragTimeout}="5000"
ENV{x11_options.RTCornerButton}="0"
ENV{x11_options.RBCornerButton}="0"
ENV{x11_options.LTCornerButton}="0"
ENV{x11_options.LBCornerButton}="0"
ENV{x11_options.TapButton1}="1"
ENV{x11_options.TapButton2}="2"
ENV{x11_options.TapButton3}="3"
ENV{x11_options.ClickFinger1}="1"
ENV{x11_options.ClickFinger2}="2"
ENV{x11_options.ClickFinger3}="0"
ENV{x11_options.CircularScrolling}="0"
ENV{x11_options.CircScrollTrigger}="0"
ENV{x11_options.CircScrollDelta}="0"
ENV{x11_options.PalmDetect}="false"
ENV{x11_options.PalmMinWidth}="10"
ENV{x11_options.PalmMinZ}="200"
ENV{x11_options.CoastingSpeed}="0"
ENV{x11_options.PressureMotionMinZ}="30"
ENV{x11_options.PressureMotionMaxZ}="160"
ENV{x11_options.PressureMotionMinFactor}="1"
ENV{x11_options.PressureMotionMaxFactor}="1"
ENV{x11_options.GrabEventDevice}="1"
ENV{x11_options.AreaLeftEdge}="0"
ENV{x11_options.AreaRightEdge}="0"
ENV{x11_options.AreaTopEdge}="0"
ENV{x11_options.AreaBottomEdge}="0"
ENV{x11_options.JumpyCursorThreshold}="0"

LABEL="xorg_synaptics_hubi_end"

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, December 30, 2009

Setup HP LaserJet P1006 in Debian

The Hewlett-Packard LaserJet P1006 is a small black and white laser printer. It's very linux compatible and setting it up in Debian is easy.

Install the HP drivers
sudo apt-get install hplip

Install Xfce Print Manager
sudo apt-get install xfprint4
- you can skip this step if not running xfce as your desktop environment.

Download the HP plugin & configure the printer
sudo hp-setup -i

Sunday, December 13, 2009

Install 64 bit Flash Ubuntu/Debian

Adobe's Flash Player 10 for 64-bit Linux Page

- Download the file
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz

- After downloading you need to uninstall Flash (if installed)
- In Ubuntu
sudo apt-get purge flashplugin-installer nspluginwrapper

- In Debian
apt-get purge flashplugin-nonfree

- Then create a plugin folder in the .mozilla configuration folder.
mkdir ~/.mozilla/plugins

- Untar the file
tar -zxvf libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz

- Install the flash player
mv libflashplayer.so ~/.mozilla/plugins

Restart Firefox/Iceweasel and enjoy.