Unix Technical Forum

sane, slack10 and usb scanner

This is a discussion on sane, slack10 and usb scanner within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> NOTE: This message was sent thru a mail2news gateway. No effort was made to verify the identity of the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-19-2008, 01:59 PM
An Metet
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

NOTE: This message was sent thru a mail2news gateway.
No effort was made to verify the identity of the sender.
--------------------------------------------------------

pgp trash troll delete

+Alan Hicks+ <alan@lizella.network> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1


> Was it really necessary to quote 51 lines just to add two?


> - --
> It is better to hear the rebuke of the wise,
> Than for a man to hear the song of fools.
> Ecclesiastes 7:5
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)


> iD8DBQFBKqX7lKR45I6cfKARAkhEAKCuxzx7vlJj3Us0Q10U56 t9lGWl+ACfZM5G
> G/ZtlOJ7uaVU2JzzSaUC1vA=
> =s4wP
> -----END PGP SIGNATURE-----




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-19-2008, 01:59 PM
kinslerp@delillo.lsr.ph.ic.ac.uk
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

ruffrecords <ruffrecords@yahoo.com> wrote:
> That would be my next move too but I thought it was worth checking
> with other slackers first.


One thing I have to do to read stuff from my camera using
gphoto is to change the permissions on the relevant usb
files that get created in /proc/usb when it gets detected.
THey get created root.root, but I want root.usb, so I've
added a chown -R to the hotplug scripts. Probably there's
a better waym, but it works...

#Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-19-2008, 01:59 PM
name
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

On 2004-08-23, kinslerp@delillo.lsr.ph.ic.ac.uk wrote:
> ruffrecords <ruffrecords@yahoo.com> wrote:
>> That would be my next move too but I thought it was worth checking
>> with other slackers first.

>
> One thing I have to do to read stuff from my camera using
> gphoto is to change the permissions on the relevant usb
> files that get created in /proc/usb when it gets detected.
> THey get created root.root, but I want root.usb, so I've
> added a chown -R to the hotplug scripts. Probably there's
> a better waym, but it works...
>
> #Paul


It works. Also have to make it writable?
--
Email is wtallman at olypen dot com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-19-2008, 01:59 PM
ruffrecords
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

kinslerp@delillo.lsr.ph.ic.ac.uk wrote:
> ruffrecords <ruffrecords@yahoo.com> wrote:
>
>>That would be my next move too but I thought it was worth checking
>>with other slackers first.

>
>
> One thing I have to do to read stuff from my camera using
> gphoto is to change the permissions on the relevant usb
> files that get created in /proc/usb when it gets detected.
> THey get created root.root, but I want root.usb, so I've
> added a chown -R to the hotplug scripts. Probably there's
> a better waym, but it works...


Which hotplug script would that be exactly?

Ian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-19-2008, 02:00 PM
kinslerp@delillo.lsr.ph.ic.ac.uk
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

ruffrecords <ruffrecords@yahoo.com> wrote:
> Which hotplug script would that be exactly?


diff usb.agent usb.agent.orig
83,85d82
< if [ -f hotplug.functions.custom ] ; then
< . hotplug.functions.custom
< fi
423,426d419
< # done here because my camera needs no modules
< # (uses gphoto2), so there is no usb/blah script
< pk_change_ownerperm
<

diff usb.rc usb.rc.orig
40,42d39
< #if [ -f hotplug.functions.custom ] ; then
< # . hotplug.functions.custom
< #fi
144,145c141
< # PK add "-o gid=114" to mount "usb" group owned
< mount -t usbfs -o gid=114 usbfs /proc/bus/usb
---
> mount -t usbfs usbfs /proc/bus/usb



cat hotplug.functions.custom
# change usb owner and permissions
# 20040627 Paul Kinsler
#
pk_change_ownerperm()
{
#date > /tmp/usb.x
#ls -ld $(find /proc/bus/usb) >> /tmp/usb.x

chgrp -R usb /proc/bus/usb
chmod -R g+w /proc/bus/usb/???/???

#ls -ld $(find /proc/bus/usb) >> /tmp/usb.x

mesg "...changed owner and permissions in /proc/bus/usb (PK)"
}


So I seem to both mount gid=114 _and_ do a chgrp -R usb -- I
dont recall that this was necessary, most likely it's because
I never got arount to cleaning up, or because the gid=114
wasn't sufficient to make sure subdirs got the usb group.

#Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-19-2008, 02:00 PM
John
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

I just finished setting up a psc 1210 on Slack 9.1 and have typed up some
rough instructions to share on apsfilter-help. This is my best
recollection of what I did. I'll gladly follow up with my files
referenced if there is any interest. I just installed 10.0 on my
notebook, si I will be going through this again.

I use xsane to scan.

Ok, Here goes.
1. Get hpoj 0.91 installed. A simple ./configure, make&&make install as
root did it for me. Yes, I know you said you weren't interested in
scanning, but it is so simple and it is worth it.

a. run ptal-init setup. You will find out critical info re your psc
1200. You can now forget about any /dev path to your psc. From now on
you will be printing to a ptal suedo device. hpoj/ptal knows where
your printer is. fahgettaboutit!
b. take a look at the attached
printcap and notice the lp= stmt. That's your printer although your
path may be different. I formed the string by viewing ls -lh
/var/run/ptal-printd/ . You will need this info in 3.b below.
c. Look
at rc.lprng(attached). I have modified it to ensure that hpoj is
loaded before lpd as documented. My rc.lprng runs during system boot
up. Modify your startup scripts as needed.
d. A reboot here will
ensure that your startup scripts work as expected. 'ps ax' will show
if ptal was loaded before lpd.

2. Modify files used by SETUP/apsfilter:
a. Put the attached driver file(psc_1200_series) in ./drivers/ijs/. I
conly have used the entry for the 'medium' case stmt.
b. look at
file(printer-ijs) and add/update as fits your environment. I deleted
the entries I don't need.
3. Run SETUP
a. When SETUP gets to the screen about dithering you will select '3' to
tie to the case stmt in psc_1200_series.
b. On the menu where you set
the device use '1' to select parallel/usb as before but, enter the
string formed in 1.b above. In my case it is
'/var/run/ptal-printd/mlc_usb_psc1200'. Sneaky! It ends up in
printcap.
c. Install and Quit as usual. (I just skip the test print and
go into xWindow and print something from gedit.).
d. lpc reread or
whatever fits your environment.

4. Go print and scan with whatever software suits you!

Comments welcome.

John


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 02-19-2008, 02:01 PM
ruffrecords
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

John wrote:
> I just finished setting up a psc 1210 on Slack 9.1 and have typed up some
> rough instructions to share on apsfilter-help. This is my best
> recollection of what I did. I'll gladly follow up with my files
> referenced if there is any interest. I just installed 10.0 on my
> notebook, si I will be going through this again.
>
> I use xsane to scan.
>
> Ok, Here goes.
> 1. Get hpoj 0.91 installed. A simple ./configure, make&&make install as
> root did it for me. Yes, I know you said you weren't interested in
> scanning, but it is so simple and it is worth it.


According to the hpoj web site, hpoj has been supercedded by hpijs
which I already have installed to make my PSC 1205 print. Should I
remove and install hpoj instead?

>
> a. run ptal-init setup. You will find out critical info re your psc
> 1200. You can now forget about any /dev path to your psc. From now on
> you will be printing to a ptal suedo device. hpoj/ptal knows where
> your printer is. fahgettaboutit!


So far this seems to be the same as hpijs.

> b. take a look at the attached
> printcap and notice the lp= stmt. That's your printer although your
> path may be different. I formed the string by viewing ls -lh
> /var/run/ptal-printd/ . You will need this info in 3.b below.


Attachment seems to be missing.

> c. Look
> at rc.lprng(attached). I have modified it to ensure that hpoj is
> loaded before lpd as documented. My rc.lprng runs during system boot
> up. Modify your startup scripts as needed.


Attachment missing - probably a newsgroup thing. ANy chance you could
email this to me directly?


Ian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 02-19-2008, 02:01 PM
John
 
Posts: n/a
Default Re: sane, slack10 and usb scanner


I believe hpoj is needed to use the scanner and hpijs is needed to help
apsfilter/ghostscript send the correct bitstream on its journey to the printer.

If you only want to print then you will not need hpoj.

I believe my ptal-* came from hpoj-091.

In any event, once you decide to use the scanner, it is necessary to learn
to make the correct printcap entry (lp= ).


ANy
chance you could
> email this to me directly?
>
>


Here are the files. (not wrapped hopefully)

print-ijs
# $ApsCVS: src/apsfilter/setup/printer-ijs,v 1.1.2.3 2002/11/09 16:54:28 andreas Exp $
psc 1200 series|ijs/psc_1200_series
HP DeskJet 656|ijs/DESKJET_656

=====================
psc_1200_series
# $ApsCVS: src/apsfilter/driver/ijs/psc_1200_series
#please answer '3' for medium(300dpi) or '4' for high(600dpi) in SETUP, default:
#params="Quality:Quality=0,Quality:ColorMode=2,Qua lity:MediaType=0,Quality:PenSet=2" ;;

PRINTER="$(echo $PRINTER | sed 's/_/ /g')"

case "$COLOR" in
full) case "$QUALITY" in
draft) RESOLUTION=300x300
params="Quality:Quality=1,Quality:ColorMode=2,Qual ity:MediaType=0,Quality:PenSet=1" ;;
low) RESOLUTION=300x300
params="Quality:Quality=1,Quality:ColorMode=2,Qual ity:MediaType=0,Quality:PenSet=2" ;;
medium) RESOLUTION=300x300
params="Quality:Quality=0,Quality:ColorMode=2,Qual ity:MediaType=0,Quality:PenSet=2" ;;
high) RESOLUTION=600x600
params="Quality:Quality=0,Quality:ColorMode=2,Qual ity:MediaType=0,Quality:PenSet=2" ;;
photo) RESOLUTION=600x600
params="Quality:Quality=2,Quality:ColorMode=2,Qual ity:MediaType=2,Quality:PenSet=2" ;;
esac ;;
*) case "$QUALITY" in
draft|low) RESOLUTION=300x300
params="Quality:Quality=1,Quality:ColorMode=0,Qual ity:MediaType=0,Quality:PenSet=1" ;;
medium) RESOLUTION=300x300
params="Quality:Quality=0,Quality:ColorMode=0,Qual ity:MediaType=0,Quality:PenSet=1" ;;
*) RESOLUTION=600x600
params="Quality:Quality=0,Quality:ColorMode=0,Qual ity:MediaType=0,Quality:PenSet=1" ;;
esac ;;
esac

GS_FEATURES="$GS_FEATURES -sIjsParams='$params' -sDeviceManufacturer=HEWLETT-PACKARD"
# $ApsCVS: src/apsfilter/setup/printer-ijs,v 1.1.2.3 2002/11/09 16:54:28
andreas Exp $ psc 1200 series|ijs/psc_1200_series
HP DeskJet 656|ijs/DESKJET_656

=======================
printcap: NOTE the :lp=[can be entered directly into SETUP].
# APS1_BEGINrinter1
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
lp|ijs/psc_1200_series;r=300x300;q=medium;c=full;p=letter ;m=auto:\
:lp=/var/run/ptal-printd/mlc_usb_psc1200:\
:if=/etc/apsfilter/basedir/bin/apsfilter:\
:sd=/var/spool/lpd/lp:\
:lf=/var/spool/lpd/lp/log:\
:af=/var/spool/lpd/lp/acct:\
:mx#0:\
:sh:
# APS1_END - don't delete this


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 02-19-2008, 02:01 PM
ruffrecords
 
Posts: n/a
Default Re: sane, slack10 and usb scanner

John wrote:
> I believe hpoj is needed to use the scanner and hpijs is needed to help
> apsfilter/ghostscript send the correct bitstream on its journey to the printer.
>
> If you only want to print then you will not need hpoj.
>
> I believe my ptal-* came from hpoj-091.
>
> In any event, once you decide to use the scanner, it is necessary to learn
> to make the correct printcap entry (lp= ).
>
>
> ANy
> chance you could
>
>>email this to me directly?
>>
>>

>
>
> Here are the files. (not wrapped hopefully)
>


Many,many thanks

Ian
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 02-19-2008, 02:01 PM
John
 
Posts: n/a
Default Re: sane, slack10 and usb scanner


> Many,many thanks

You are very welcome.
>
> Ian
>>
>>

I just noticed that I inadvertantly pasted print-ijs at the bottom of
psc_1200_series. It is the last three lines in the latter that s/b
removed.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:23 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com