Easy Printer Setup on Linux

Setting up a printer is a doddle
People seem to have major issues with printer installation and setup. I don’t know why because it’s easy when you avoid all the guis and go for the cups web interface.

I have a HP Deskjet 845C, it works on every linux distro using the cups browser method.

On most Linux distros, cups is available in the repository. So just do a search for cups or printer and install Cups.

Then get your HP drivers
I always install Foomatic Hpijs.

Next start the cups server
Debian based boxes: sudo /etc/init.d/cups restart
Archlinux and others: sudo /etc/rc.d/cups start

Configure your printer from your web browser
Next, open your web browser and type the address http://localhost:631 which is your print server port. You will be greeted with the cups html printer setup page.

Cups-Printer-Config

Now you just hit “Add Printer” and go through the motions of selecting your printer and driver etc.

Just click all the links and check out what’s on offer, you can add users to the printer and change the default settings, all much easier than some desktop printer config utilities.

When you are done, print a test page.

richs-lxh

Advertisements

Debian 5.0 Lenny Released as Stable

Well this is great news for Debian users and Dreamlinux users alike, as Dreamlinux is built on the Debian Lenny base.

Debian “lenny” Release Information

Debian GNU/Linux 5.0.0 was
released February 14th, 2009. The release included many major
changes, described in
our press release and
the Release Notes.

To obtain and install Debian GNU/Linux, see
the installation information page and the
Installation Guide. To upgrade from an older
Debian release, see the instructions in the
Release Notes.

Contrary to our wishes, there may be some problems that exist in the
release, even though it is declared stable. We’ve made
a list of the major known problems, and you can always
report other issues to us.

Last but not least, we have a list of people who take
credit
for making this release happen.

How to add more Speed Dials in Opera?

Opera – The all in one browser
I use Opera as I find it faster than other browsers and has everything I need all included. Torrent Client, IRC, Emai Client……….. and Speed Dial !

Opera Speed Dial
What is Speed Dial? Well, as soon as you open Opera you have a panel with 9 (3X3) miniature views of your favourite, most visited websites which you choose to have handy.

Standard 9 X 9 Opera Speed Dial
Opera Speed Dial

When 9’s not enough
I have become so used to just clicking open a tab, and clicking a speed-dial image, that I just can’t be bothered to use the usual favourites/bookmarks menu. So I thought, ok, everything has files that can be hacked. Checkout the Preferences Editor when you type “about:config” in the browser address bar !

Ok, I thought, where’s the file that lists all those Speed Dial windows?

Opera has to be closed before you edit any files
I closed Opera, opened the terminal and used nano text editor to open the aptly named “speeddial.ini”:

sudo nano .opera/speeddial.ini

It was there, but after reading this opera guide, I had to add the grid arguments at the bottom (to get 16 speed dials):

[Size[Size]]
Rows=4
Columns=4

Saving edits with Nano
I saved this in nano by hitting Ctrl+X to exit, Y for yes to save, and Enter to leave nano and go back to the terminal.

I opened Opera, and het presto!! 16 Speed Dials instead of the default 9.
Opera with 16 Speed Dials

You can add as many as you want, just depends on the size of your screen. At the moment 16 is perfect for me.

Super fast Debian updates and upgrades with Apt-Spy

Find your fastest Debian repository
apt-spy is a program that tests a series of Debian archive mirrors for bandwith. It writes an /etc/apt/sources.list with the fastest server.
You can select which of the many Debian sites to benchmark by geographical location.

Install Apt-Spy

sudo apt-get install apt-spy

How to use Apt-Spy to benchmark the best mirrors for your distribution

apt-spy -d distribution [ -a area ] [ -c config ] [ -e number ] [ -f file ] [ -i file ] [ -m mirror-list ] [ -o output-file ] [ -p proxy ] [ -s country-list ] [ -t time ] [ -u update-URL ] [ -w file ] [ -n number ] [ -h ] [ -v ] [ update ]

To retrieve the latest list of Debian mirrors you need to run the following command

apt-spy update

To find the fastest mirror in europe for stable, you need to run the following command

apt-spy -d stable -a europe

To find the fastest mirror in US for stable, run the following command

apt-spy -d stable -s us

Here is the list of options available

apt-spy -h

Usage: apt-spy [options]
options:
-d distribution Debian distribution (ie, stable). Required unless updating.
-a area Area to benchmark. (eg, Europe).
-c config Configuration file to use.
-e number Number of servers to benchmark before exiting.
-f file File to grab when benchmarking. (relative to Debian base).
-i file Specify input file. For use with the -w option.
-m mirror-list Mirror list to use, or mirror-list to update when updating.
-o output-file Where to put output.
-p proxy Proxy server to use. In format

The apt-spy man page:
http://www.digipedia.pl/man/apt-spy.8.html

How To Linux Enable DMA for dvdrw cdrw (eg K3b says no DMA)

K3b is known to to do this if you have the DMA bug or not.

You can check by first doing a search for your dvd/cd writer with:(I have put dvdrw)

sudo ls -l /dev/dvdrw

[i]Example:[/i](It tells me that my DVD Writer is /dev/hdd)

richs@lxh:~$ sudo ls -l /dev/dvdrw<br />lrwxrwxrwx 1 root root 3 2008-04-26 16:49 /dev/dvdrw -&gt; hdd<br />richs@lxh:~$<br />

[b]
Then seeing if it has DMA enabled for /dev/hdd:[/b]

sudo hdparm -d /dev/hdd

[b]
And I get this result:[/b]

richs@lxh:~$ sudo hdparm -d /dev/hdd<br /><br />/dev/hdd:<br /> using_dma     =  1 (on)

[b]If yours says DMA is off:[/b]

/dev/hdd:<br />using_dma = 0 (off)

[b]
Turn it on with:[/b]

sudo hdparm -d 1 /dev/hdd

and it should look like this:

/dev/hdd:<br />setting using_dma to 1 (on)<br />using_dma = 1 (on)

How to Anonymous Browsing with Tor, Firefox Plugin and Privoxy

# Privoxy listens on TCP port 8118 bound only to localhost.
# Tor SOCKS proxy listens on TCP port 9050 (directory) bound only to localhost. This proxy anonymizes connections to servers in Internet by routing them over a randomized route trough to Tor network.
Debian packages have been uploaded to the set of official unstable (sid) and testing (etch) Debian packages.
If you are running Debian stable (sarge) or oldstable (woody), you must first add some lines to your /etc/apt/sources.list file.

If you run etch (testing) you may want to add a sources.list entry too. That way you always get the latest version of Tor, even when it has not propagated to testing yet.
Do not use the packages in ubuntu’s universe.
They are not maintained and most likely old and therefore miss out on stability and possibly security fixes.
For tor’s stable version (for amd64,i386 and sparc):

deb http://mirror.noreply.org/pub/tor main
deb-src http://mirror.noreply.org/pub/tor main

where should be replaced with either woody, sarge, etch, or sid, or – if you are using ubuntu – hoary, breezy, or dapper.

For instance if you are running etch you would add:
deb http://mirror.noreply.org/pub/tor etch main
deb-src http://mirror.noreply.org/pub/tor etch main

To install the packages, issue the following commands:
$ su
password
$ apt-get update
$ apt-get install tor

Verifying signatures with apt 0.6.x
If you are using apt version 0.6 or later you may want to add weasel’s key to your apt-keyring, so it can verify the sources:
$ gpg --keyserver subkeys.pgp.net --recv 94C09C7F
$ gpg --fingerprint 94C09C7F

should show you:
pub 1024D/94C09C7F 1999-11-10
Key fingerprint = 5B00 C96D 5D54 AEE1 206B AF84 DE7A AF6E 94C0 9C7F
uid [ultimate] Peter Palfrader
[...]

Then issue
$ gpg --export 94C09C7F | sudo apt-key add -
to add the key to apt’s keyring.
Now let’s get Privoxy
$ su
password
$ apt-get update
$ apt-get install privoxy

Once you’ve installed Privoxy (either from package or from source), you will need to configure Privoxy to use Tor. Open Privoxy’s “config” file (look in /etc/privoxy/ or /usr/local/etc/) and add the line
forward-socks4a / localhost:9050 .
to the top of the config file. Don’t forget to add the dot at the end.
Privoxy keeps a log file of everything passed through it. In order to stop this you will need to comment out three lines by inserting a # before the line. The three lines are:

logfile logfile
and the line
jarfile jarfile

and (on some systems) the line
debug 1 # show each GET/POST/CONNECT request
You’ll need to restart Privoxy for the changes to take effect. Firefox
For Firefox (recommended), simply install the Torbutton plugin, restart your Firefox, and you’re all set:

How to Speed Up Internet: Firefox, Google Earth (No IpV6)

This works great for broadband connections, especially with older routers.

[b]Disable IpV6[/b]
The idea is basically that you disable IpV6 connections. At the moment most connections use IpV4 but this will change in the future so this “fix/ workaround” is fine at the present. We have IpV6 enabled as well as IpV4 but they conflict causing slowdown due to IpV6 trying to get a connection first.

http://en.wikipedia.org/wiki/IP_address#IP_version_4
[b]
Speedup Firefox only[/b]

In the [b]firefox[/b] address bar type: [b]about:config[/b], then change

network.dns disableIPv6: True

(just double-click)
[b]
Completely Disable IpV6[/b]

[b]1. Open your Gnome Terminal/ KDE Konsole and type[/b]
For Gnome

gksudo gedit /etc/modprobe.d/aliases

For Xfce

gksudo mousepad /etc/modprobe.d/aliases

[b]
2. Mousepad or Gedit will open and show you this file[/b]
(scroll down to see what to copy and paste)
[quote]# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# Please file a bug against module-init-tools if a package needs a entry
# in this file.# network protocols ################################################## ########
alias net-pf-1 unix
alias net-pf-2 ipv4
alias net-pf-3 ax25
alias net-pf-4 ipx
alias net-pf-5 appletalk
alias net-pf-6 netrom
alias net-pf-7 bridge
alias net-pf-8 atm
alias net-pf-9 x25
[b]# [color=red]1, 2, 3 new lines[/color][/b]
[i]alias net-pf-10 ipv6 off
alias net-pf-10 off add these three lines here.
alias ipv6 off [/i]
[b]#[/b][i]alias net-pf-10 ipv6 [color=red]=========comment (put #) before this line[/color][/i]
alias net-pf-11 rose
alias net-pf-12 decnet
# 13 NETBEUI
alias net-pf-15 af_key
alias net-pf-16 af_netlink
alias net-pf-17 af_packet
[/quote]
[b]3. Now “Save” and “Reboot”[/b]

[b]Also:[/b]
There’s another way too: instead of changing the aliases file, create a file named bad_list in /etc/modprobe.d containing this line:

alias net-pf-10 off

This method will work even if /etc/modprobe.d/aliases gets replaced at some update.

I did this and had a noticeable increase in speed 😀