1 Dell V305 Printer on Linux
2 ==========================
3 :author: Aaron Ball
4 :email: nullspoon@iohq.net
5
6
7 == {doctitle}
8
9 I spent this week hanging out with my wife and grandparents-in-law and spent
10 some of my time performing the obligatory family tech support (no complaining
11 here, I love doing that most of the time). To sum up the beginning quickly
12 because I really don't want to write the post in great detail, my grandfather's
13 computer got temporarily hosed and the guy from Dell made it even worse (thanks
14 Deepak). He actually wiped the computer after taking very minimal backups
15 (thankfully just enough). Not only that, but the restore from the Dell image
16 actually corrupted a bunch of the core system libraries making installing and
17 updating Windows or Microsoft software impossible. After wasting an hour trying
18 to fix this, I finally decided to reinstall a fresh copy of Windows. Then it
19 hit me, my grandfather doesn't use his computer for much more than Word
20 documents, PDFs, browsing the internet, and email - all things that Linux does
21 very well. With that, I suggested to him that he try
22 http://linuxmint.com/[Linux Mint] (my favorite ready-to-go Linux desktop
23 distro). After he played around with the live version for a bit, he decided he
24 really liked it (kudos to you Linux Mint guys) so I went ahead to install it.
25
26 I got everything working easily but one thing... his printer.
27
28 [[the-dell-v305-printer]]
29 The Dell V305 Printer
30 --------------------
31
32 The Dell V305 is actually a Lexmark printer rebranded as a Dell. Specifically,
33 it is the Lexmark x4650. Thankfully, Lexmark makes
34 http://support.lexmark.com/index?page=downloadFile&actp=CONTENT&productCode=LEXMARK_X4650&id=DR20523&segment=DOWNLOAD&userlocale=EN_US+&locale=en&oslocale=en_US[a
35 linux driver] for this thing, but it is of course, very problematic. When I
36 first ran the .sh with an embedded binary, it ran fine until I got to the
37 install where it gave me an ambiguous "failed to install". When you click
38 **OK**, it closes the window with the actually error text in it. While the
39 "failed to install" dialog is up, you can't check the log because it won't let
40 you select the background window. Also, the background window isn't resizable
41 so you can't hope for a bigger window to compensate for no scrollback. Great
42 design, huh?
43
44 I did notice on the last three or so lines though that it was trying to remove
45 a .deb file. With that, I set out to search for it.
46
47
48 [[the-fun-begins]]
49 The Fun Begins
50 --------------
51
52 If you run the
53 'http://support.lexmark.com/index?page=downloadFile&actp=CONTENT&productCode=LEXMARK_X4650&id=DR20523&segment=DOWNLOAD&userlocale=EN_US+&locale=en&oslocale=en_US[lexmark-08z-series-driver-1.0-1.i386.deb.sh]'
54 file with the _--keep_ switch, the script will not remove all files extracted
55 to perform the install process. This will leave you with a nicely populated tmp
56 folder.
57
58 If you cd into the tmp directory, you will find a file called
59 **installarchived_all**. This is actually an lzma archive file. What you want
60 to do now is extract this file using the following command
61
62 ----
63 tar -xvf ./installarchived_all --lzma
64 ----
65
66 This will extract several files, one of which will be called
67 __lexmark-08z-series-driver-1.0-1.i386.deb__. You might think that this is a
68 time for rejoicing, but alas it is not. From this point we should be able to
69 run _dpkg -i ./lexmark-08z-series-driver-1.0-1.i386.deb_ and it would work, but
70 it won't. If you do that you will receive the following friendly error:
71
72 ----
73 dpkg: error processing ./lexmark-08z-series-driver-1.0-1.i386.deb (--install):
74 parsing file '/var/lib/dpkg/tmp.ci/control' near line 9 package 'lexmark-08z-series-driver':
75 blank line in value of field 'Description'
76 Errors were encountered while processing:
77 ./lexmark-08z-series-driver-1.0-1.i386.deb
78 ----
79
80 What? The .deb file was constructed wrong? 'Tis a shame. Here's where it gets
81 really fun. What we need to do now is extract the deb file, modify the contents
82 of a single file, and repackage the whole thing back up.
83
84 First, let's create a working directory, copy our deb file in there, extract
85 it, and set up a deb package folder structure. Create our working directory and put the bad .deb file in there.
86
87 ----
88 mkdir ./working
89 cp ./lexmark-08z-series-driver-1.0-1.i386.deb ./working/
90 cd working
91 ----
92
93 Extract the .deb file and clean up a bit (don't forget the period at the
94 end of the dpkg-deb line).
95
96 ----
97 dpkg-deb -R lexmark-08z-series-driver-1.0-1.i386.deb .
98 rm ./lexmark-08z-series-driver-1.0-1.i386.deb
99 ----
100
101
102 [[fixing-the-problem]]
103 Fixing the Problem
104 ------------------
105
106 The problem as you like noticed earlier is because the .deb file has a file
107 named _control_ that is improperly formatted. Specifically, control files
108 cannot have blank lines in them. To have a "blank" line in a .deb control file,
109 you must have a period instead. That said, here's how we fix the file.
110
111 Open up the control file in the DEBIAN directory and put a ' .' (yes, with the
112 space before it) like so
113
114 ----
115 Description:
116 Lexmark 08z Series Drivers Package
117 .
118 This package contains the Lexmark 08z Series Drivers. This is
119 a copyrighted package, please refer to the copyright notice
120 for details about using this product.
121 ----
122
123 Now that that's done, We just need to repackage the .deb file and install it.
124 To do that, cd out to one directory above the lexmark-08z directory (the
125 working directory) and run **dpkg -b lexmark-08z**. This will take a few
126 seconds (it's 22 megs) but it should create a file called lexmark-08z.deb. Now
127 install this using **dpkg -i**.
128
129 ----
130 dpkg -b lexmark-08z dpkg -i ./lexmark-08z.deb
131 ----
132
133 _I'm too lazy to write the rest out right now so here's the shorthand_
134
135 Now you have to edit a ton of files in __/usr/local/lexmark/08zero/etc/__.
136
137 Firstly, we need to edit 99-lexmark-08z.rules and take the following
138 line on the top so it looks like so
139
140 ----
141 ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5305", MODE="666"
142
143 ACTION!="add", GOTO="lexmark_custom_rules_end"
144 ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5305", MODE="666"
145 ATTRS{idVendor}=="043d", ATTRS{idProduct}=="0142", MODE="666"
146 ATTRS{idVendor}=="043d", ATTRS{idProduct}=="0150", MODE="666"
147 ATTRS{idVendor}=="043d", ATTRS{idProduct}=="013f", MODE="666"
148 ATTRS{idVendor}=="043d", ATTRS{idProduct}=="0151", MODE="666"
149 ATTRS{idVendor}=="043d", ATTRS{idProduct}=="0116", MODE="666"
150 LABEL="lexmark_custom_rules_end"
151
152 ----
153
154 Now that we've updated the 99-lexmark-08z.rules file, we need to edit a load of
155 the lxd*.conf files. I say we need to edit lots of them because I'm still not
156 sure which one or combination of them actually did the trick. I can say though
157 that just lxdm.conf wasn't enough.
158
159 Now, edit the following files
160
161 * lxdm.conf
162 * lxdq.conf
163 * lxdw.conf
164 * lxdu.conf
165 * lxdx.conf
166
167 ...and replace *all* instances of _0116_ with _5305_ and all instances of
168 _043D_ with _413C_
169
170 Once that is done, add your printer from the cups admin console
171 (localhost:631). Once you get to the driver part, select Lexmark 3600-4600 and
172 you should be set!
173
174 **Whew**
175
176 Finally, here are the resources I found to help me out with this
177 solution.
178
179 * http://ubuntuforums.org/showpost.php?p=7809488&postcount=1
180 * http://ubuntuforums.org/archive/index.php/t-1243920.html
181 * http://ubuntuforums.org/archive/index.php/t-1554718.html
182 * http://ubuntuforums.org/showthread.php?t=1379902
183 * http://ubuntuforums.org/showthread.php?t=1554718&page=1
184
185
186 Category:Linux
187 Category:Debian
188
189
190 // vim: set syntax=asciidoc:
|