2012/05/28

Brother HL-2270DW printer driver install: Ubuntu 12.04 64 bit versions

** Update 2016-0717 I am still using this printer on Ubuntu 16.04. Brother now provides the drivers as "deb" files that work with Ubuntu. I would use their drivers instead of the ones that I have here (mine are old now). Also look at the below comment on May 7, 2014 at 3:42 AM by Jo Boug. His method of installation is another good option also.

This post explains how to install Brother HL-2270DW printer drivers in Ubuntu 12.04, 64 bit versions. These instructions also work on Ubuntu 13.04. It should also work for any other Debian linux distributions, however I have only tested this on Ubuntu. Brother does not include 64 bit drivers and thus this why I created this post. There is a previous post on installing in Ubuntu 11.04/11.10 with steps on modifying the Brother 32 bit driver for 64 bit installations http://chadchenault.blogspot.com/2011/09/brother-hl-2270dw-printer-driver.html. The Ubuntu 11.xx instructions will also work for 12.04. The 12.04 includes screenshots and different formatting. You only need to follow my instructions if you are running a 64 bit version of Ubuntu. If you are concerned about security with downloading files that I have patched, you can follow the instructions from the link above to apply the patch yourself. The driver files are current as 05/28/2012.

Instructions

1.   Download the following 2 driver files that have been patched to work on 64 bit versions of Ubuntu. The patched (modified for 64 bit linux) driver files have "a" added to the file name.

  1.1.2   CUPS patched driver

  1.2.2   Brother printer patched driver

2. Open a terminal window "ctrl + alt + t"
2.1 Install file dependency (lib32stdc++) for 64 bit operating system by pasting the following code into a terminal window.
2.1.1  sudo apt-get install lib32stdc++6
2.2   Change into the directory to where the files where downloaded.
2.3   Enter the following two commands from the terminal window. You can copy these commands one at a time and paste them into the terminal window. Press "Enter" key to run the command after pasting.
2.3.1   sudo dpkg -i --force-all hl2270dwlpr-2.1.0-1a.i386.deb
2.3.2   sudo dpkg -i --force-all cupswrapperHL2270DW-2.0.4-2a.i386.deb

USB printing should now work. If you want to configure wifi or ethernet printing, you will need to configure CUPS


3.   Wireless Printing Configuration for wifi (2 methods of configuration: Brothers or CUPS). I prefer the CUPS method.

3.1   Follow Brother's instructions

3.2   Configure printer using CUPS printing system

3.2.1   Open web browser and goto http://localhost:631
3.2.2   login with your Ubuntu user name and password.  If you get a password error (new for 13.10), open a terminal and type in the following command: sudo killall cupsd
3.2.3   Select "Administration" tab up top
3.2.4   Under "Printers" select "Manage Printers"
3.2.5   you will now be at http://localhost:631/printers/?
3.2.5   Select the printer "HL2270DW"
           you will now be at http://localhost:631/printers/HL2270DW

3.2.6.1   My setting is "Connection: usb:/dev/usb/lp0"
              This is the setting for USB printing ("usb:")
3.2.6.2   Select from Menu "Administration/Modify Printer" if you are not using USB printing. If you wanted to keep the USB printing option you should select from Menu "Administration/Add Printer"
3.2.6.2.1   Enter your Ubuntu user name and password if prompted
                The new page will be titled "Modify HL2270DW" assuming you choose the "Modify Printer" option above.
3.2.7   Select the entry "Brother HL-2270DW series (Brother HL-2270DW series)" from 
the section "Discovered Network Printers:"
3.2.8   There are multiple entries for "Brother HL-2270DW series (Brother HL-2270DW series)" and they do not have the same configurations. I randomly selected one entry and then Select "Continue" at the bottom of the page.
3.2.9   You will get a new page for editing the printers configuration, my configuration follows

3.2.9.1   Description: HL2270DW-wifi
3.2.9.1.1   added "-wifi" since you can also have USB printing and this requires adding a new printer           configuration
3.2.9.2   Location: Study
3.2.9.3   Connection: dnssd://Brother%20HL-2270DW%20series._pdl-datastream._tcp.local/
3.2.9.3.1   Bold indicates this is for wifi printing, very important to have this correct!!!

3.2.9.4   If the "pdl-datastream._tcp.local/" was wrong I hit the back button on my browser and tried another entry until I got the correct "Connection" configuration.

3.2.9.5   Select "Continue" at bottom of page
              You get a new page titled "Modify HL2270DW"


3.2.10   Under "Model" select "Current Driver - Brother HL2270DW for CUPS"
3.2.10.1 If the current driver (PPD file) for HL2270DW is not displayed (a problem with Ubuntu 13.10) then you need to tell CUPS where the driver file is located. At "Or Provide a PPD File:", select "Browse" button and navigate to file: /usr/share/cups/model/HL2270DW.ppd.
3.2.11   Select "Modify Printer"
                You get a new page titled "HL2270DW (Idle, Accepting Jobs, Shared)"

3.2.12   Print a Test Page
3.2.13   Select from menu "Maintenance/Print a Test Page"

Congratulations


References


Thanks to GSBoomer for this arcane information from this post.
These instructions are heavily copied from my previous post "Brother HL-2270DW printer driver install: Ubuntu 11.04".
Thanks to herrsaalfeld for PPD/driver file location and for "sudo killall cupsd" command when password fails in Ubuntu 13:10.


2012/05/17

House buying scam Ron and Beverly Grant 817-886-0939


I received a letter today in the mail that is a scam for buying your house. The note is on yellow paper and printed in red ink. The note says it is from Ron yet it looks like a girls handwriting. The note at first glance appears handwritten, however on closer inspection it is a very clever/good printout. Following is the whole note:

Hello, My name is Ron Grant. My wife Beverly and I would like to buy your house at: 936 Mountain Ter. Please call us at 817-886-0939.
Thanks, Ron

Google the name and you will see this is a nation wide scam. I have included some links below.
http://800notes.com/Phone.aspx/1-904-371-2431#p395723367429274848

2012/05/07

Recover Deleted Pictures from Hard Drive

I hope you and I never need this information again. Several years ago, I accidently deleted pictures from my hard drive. I used the program "magicrescue" to recover my photos. This is a linux program. I do not know if Windows has an equivalent. If you are not comfortable running commands from the Linux command line, then you will need be friends with a Linux geek or hire one.

1. after deleting files you need to unmount the drive immediately. This step is then most important or run the risk of writing new data on top of your deleted pictures. Once you write new data on top of the pictures the file will be corrupted.

1.1 since I deleted files on my home directory, I restarted the computer and installed ubuntu on a seperate hard drive (It could also be installed on a separate partition). This allows you to work on the drive without it being mounted. If the deleted data drive is mounted, there is a danger that a file will be written overwriting the drive.
2. boot into new OS with new home directory
2.1 install magicrescue
3.1. sudo mount -t ext4 /dev/sdb1 /media/a # mounts hard drive to store recovered data
4.1 magicrescue -M io -d /media/a/a -r ~/Documents/magicrescue/recipes /dev/sde6
4.2 sudo chown chad:chad * #change ownership of files from root to chad

5.1 this worked, file names are not intact, but picture metadata is.

6.1 used jhead to rename files based upon date in exif data
6.2 http://www.sentex.net/~mwandel/jhead/usage.html
6.3.1 jhead -n%Y%m%d-%H%M%S *.jpg
6.3.2 This will rename files matched by *.jpg according to YYYYMMDD-HHMMSS

7.1.0 http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
7.1.1 run photorec to recover .tiff and other file types. Should run photorec first probably
7.2 photorec [/log] [/debug] [/d recup_dir] [device|image.dd|image.e01]
7.3 $ sudo photorec #asks questions about what to recover, run this command from the directory you want to save files to
7.4 sudo chown chad:chad * #change ownership of files from root to chad

Help, Information, and Links


To view help, type from command line > man magicrescue

This site was helpful http://www.linux.com/archive/feature/126525

The basic command is: magicrescue -d directory -r recipe  device
example: magicrescue -d /mnt/external -r /usr/share/magicrescue/recipes/zip /dev/sda1.

recipes are located at: /usr/share/magicrescue/recipes
I copied recipes to use to ~/Documents/magicrescue/recipes

Good Luck and this was not spell checked

2012/05/06

Nano text editor notes and help

Keyboard commands for working with the text editor Nano. Nano is a text editor used in a terminal window in Linux. Usage is > nano [name of file to open or create]

Some commands for my system are different than what is shown on other websites. On my system, I press "Ctrl+g" to display the help menu and command list. ^ = the "Ctrl" key, M- = the "Esc" key
Commands

Esc+a  Mark selection for cutting and pasting. Press Esc+a at the beginning of the selection and then move the cursor to the end of the selection. Now the selected text can be copied or cut to the buffer.
Alt+6  copy text to the "cut buffer"
Ctrl+u  paste selection or line
Ctrl+k  cuts selection or line (it is cut/sent to the "cut buffer").
If no text is marked, 'paste' and 'cut' command will copy or cut the entire line of text.

Links/Reference


2011/09/09

Brother HL-2270DW printer driver install: Ubuntu 11.04

Brother HL-2270DW printer driver install, Ubuntu 11.04 64-bit

09/09/2011

Addendum 09/28/2012 - These steps also work for installing in Ubuntu 12.04 64-bit. I have posted an updated install than includes screenshots of settings http://chadchenault.blogspot.com/2012/05/brother-hl-2270dw-printer-driver.html.

1. Follow "Steps 1-3" on http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn3.html

2. After Step 3, the driver must be patched for Ubuntu 11.04 64-bit
Patched driver instructions are located here: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/faq_prn.html#f00098 FAQ I cannot install Monochrome Laser Printer driver on Ubuntu11.4(64bit).  Thanks to alliance1975 for this information at http://ubuntuforums.org/showpost.php?p=11051299&postcount=13

If you do not want to patch/change the driver file yourself, I have included download links to the two patched driver files. This will allow you to skip steps 2.1 and 2.2 below.
    CUPS wrapper Brother HL-2270DW driver/patched Ubuntu 11.04 64-bit version 2.0.4-2
    Brother HL-2270DW printer driver/patched Ubuntu 11.04 64-bit version 2.1.0-1

2.1 Download the patch file (brdpkgdeldep.gz, ver.1.0.0-1, 323 byte)
http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://www.brother.com/pub/bsc/linux/dlf/brdpkgdeldep.gz&lang=English_lpr

2.2 The patch will make a new version of the driver and append the filename with the letter "a". Example " hl2270dwlpr-2.1.0-1a.i386.deb ".
2.2.1 I was using chrome web browser and the patch file was self extracted and saved the file as brdpkgdeldep.gz.txt
2.2.2 I renamed the file to brdpkgdeldep.sh
2.2.3 I made the file executable in nautilus
     Menu: File/Properties/Permissions/Execute "Allow executing the file as a program"
     Put a "check" in the box for "Allow executing the file as a program"
2.2.4 If downloaded file is saved as a .gz file
Extract the downloaded file:  Command: gunzip brdpkgdeldep.gz
2.2.5 Please move Linux LPD-driver package and Linux CUPS-driver to the directory that "brdpkgdeldep" file is stored in.
Go to the directory where the drivers are stored in
Run the commands:
Command: sudo bash brdpkgdeldep.sh hl2270dwlpr-2.1.0-1.i386.deb
    * This is Linux LPD-driver package
Command: sudo bash brdpkgdeldep.sh cupswrapperHL2270DW-2.0.4-2.i386.deb
     * This is the Linux CUPS-driver package
Check that the drivers have been modified; show the contents of the current directory
Command: ls
     output should show two new files
           hl2270dwlpr-2.1.0-1a.i386.deb
           cupswrapperHL2270DW-2.0.4-2a.i386.deb

2.3 Install the new Linux driver package file (LPR/CUPS) using the conventional method.
This follows "Step 4" from http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn3.html
Make sure to use the new drivers that have the "a" added to the filename
Command: sudo dpkg -i --force-all hl2270dwlpr-2.1.0-1a.i386.deb
Command: sudo dpkg -i --force-all cupswrapperHL2270DW-2.0.4-2a.i386.deb
This installed usb printing, you must change the configuration to enable wifi printing

2.4 Wireless Printing Configuration for wifi (2 methods of configuration: Brothers or CUPS)
2.4.1 Follow Brother's instructions
     "Step 5. Confirm/Configure a file according to your connection"
     http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn3.html
2.4.2 Configure printer using CUPS printing system
Open web browser and goto http://localhost:631
login with your Ubuntu user name and password
Select "Administration" tab up top
Under "Printers" select "Manage Printers"
you will now be at http://localhost:631/printers/?
Select the printer "HL2270DW"
you will now be at http://localhost:631/printers/HL2270DW
My setting is "Connection: usb:/dev/usb/lp0"
This is the setting for USB printing
Select "Administration/Modify Printer"
The new page will be titled "Modify HL2270DW"
Find the section "Discovered Network Printers:" and select the entry "Brother HL-2270DW series (Brother HL-2270DW series)"
There are four entries for "Brother HL-2270DW series (Brother HL-2270DW series)" and they do not have the same configurations.
I randomly selected one entry, if it was wrong I hit the back button on my browser and tried another entry until I got the correct "Connection" configuration which is listed in then next section
Select "Continue" at the bottom of the page
You will get a new page for editing the printers configuration, my configuration follows
     Description: HL2270DW-wifi
added "-wifi" since you can also have USB printing and this requires adding a new printer configuration
     Location: Study
     Connection: dnssd://Brother%20HL-2270DW%20series._pdl-datastream._tcp.local/
This is for wifi printing, very important to have this correct!!!
Thanks to GSBoomer for this arcane information from this post http://ubuntuforums.org/showpost.php?p=11196906&postcount=15
You can also check the box "Share This Printer" to allow others on your network to use this printer through your computer connection
The other computers must be running CUPS (Mac, Linux, and Windows) http://www.cups.org/software.php.  Thank you CUPS and Apple, open source goodness!!!!
I think this keeps other users from having to install the Brother printer drivers (not an easy task)
Select "Continue"
You get a new page titled "Modify HL2270DW"
Under "Model" select "Current Driver - Brother HL2270DW for CUPS"
Select "Modify Printer"
You get a new page titled "HL2270DW (Idle, Accepting Jobs, Shared)"
Print a Test Page
Select "Maintenance/Print a Test Page"
Congratulations

2011/07/29

sudo Command Line Notes

I continue to enjoy the new Ubuntu 11.04 interface. I find it more keyboard friendly and can quickly launch applications from the keyboard by hitting the "windows/meta" key and typing in the first 2 or three letters of the application I want to launch. Today I did some research on the sudo command and this is what I learned.
  • sudo
    • run cmds as root, lasts for 15 mins and then you have to retype "sudo"
  • sudo !!
    • runs last cmd from terminal as sudo
    • usefull when you forget to add sudo before a cmd
  • sudo -i
    • enables a root shell, title bar will show root@[computer name]
    • type "quite" to disable root shell
    • created a new profile "sudo -i" to give my root shell a new background and font
      • this alerts me to be extra careful in this terminal window
      • I have to manually select my profile whenever I start a new root shell
    • Logging off
      • I close the window or tab for the root shell window
      • see sudo -k
      • I need help for command line method of logging out of root
  • sudo -k (I could not get this to work)
    • kills/stops persistant root authority
    • I could not get this to work. I still continued to be logged in as root@[computer name]

  • Create new terminal profile
    • from the terminal menu select > File/New Profile
    • a new window appears
      • profile name = sudo -i
      • based upon = [your user name] 'I did not need to change "based upon" setting
    • a new window "Editing Profile "sudo -i"" appears
      • Select "Colors" tab to change background and font color
      • select "Close" button to finish





Terminal with sudo profile (green background with yellow text)
Top window pane displaying  "root" user. 



Terminal with normal user "chad" profile.
Top window pane displaying "chad" user.



  • Definitions
    • shell = terminal window = command line window

2010/10/01

Encoding music with the Ogg format

I downloaded 'vorbis-tools' from the Ubuntu repository. What a powerful little program. I might post examples once I start using it more. This is a command line program that I use on the linux OS. You can learn more about each of these programs by typing 'man [program]' on the command line; example 'man oggenc'

vorbis-tools contains oggenc (an encoder), ogg123 (a playback tool),
ogginfo (displays ogg information), oggdec (decodes ogg files), vcut
(ogg file splitter), and vorbiscomment (ogg comment editor).

ogg123 can play both Ogg Vorbis and FLAC audio streams