DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

$ sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

# No USB scanners found. If you expected something different, make sure that
# you have loaded a kernel driver for your USB host controller and have setup
# the USB system correctly. See man sane-usb for details.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
$ scan-image -L
scan-image: not found
$
Reply With Quote
Old 12th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Re syslog: in the file /etc/syslog.conf you will find the following:
Code:
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                             /var/log/all.log
So what you do is:
1. edit /etc/syslog.conf and remove that '#' mark in front of the "*.* /var/log/all.log" line.
2. Create the file.# touch /var/log/all.log
3. change the permissions# chmod 0600 /var/log/all.log
4. Change the ownership.[cdm=#] chown robbak:wheel /var/log/all.log.[/cmd]
4. Restart syslogd # /etc/rc.d/syslogd restart
Then you will get all log messages. It may be better to only have this set when you are debugging, as it will log a fair number of generally unnecessary messages. to do this, re-comment the line in /etc/syslog.conf.

(Oh, and the reason we are trying to be helpfull? Because we enjoy helping! You have given us a problem that intrigues us. )

I'm agreeing that HAL might be your issue: hey, try this.

as your regular user, rename .xinitrc and/or .xsession. These are the files that start your window manager. Then start (or restart) X (we don't know how you are starting X, so I cannot tell you how) and you will get a very basic graphical screen. run xsane or xscanimage or scanimage there. then gnome's HAL or DBUS will not get in the way.

Alternatively, close X, and run scanimage from the command line. See what happens.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 12th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

OH, its scanimage, not scan-image.

Could you make sure that /dev/ugen0 is still there? It has gone missing on previous occasions, further confusing matters.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Sorry to start from the end but I was excited lest I could not copy and paste the results. So now from the beginning

I did go to /etc/rc.conf and added hald_enable="YES" Rebooted and checked at /var/log/messsages Now these is no more Hal error but the following is repeated continuously: "console-kit-daemon[951]: GLib-CRITICAL: g_hash_table_lockup: assertion `hash_table !=NULL' failed" and another line exactly the same but instead of "lookup" there is "destroy" I do hope that I have no copy mistakes.

To sum up in /etc/rc.conf both dbus and hald are enabled.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

ls -l /dev/ugen0
ls: /dev/ugen0: No such file or directory
$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
$

Now this is very funny as I can find no /dev/ugen0 running it as root as well which was not the case yesterday.

Re: "/etc/syslog.conf " I can find the file today in the console as # but definitely could not find it yesterday. I will proceed. The file does not exist though even today in gnome's file system!
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Tried to scan as root from xterminal, could not do it until I unplugged and replugged the scanner.
Reply With Quote
Old 12th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Yes, ugen0 seems to come and go. I wonder if it is dropping into some power-save mode. I wouldn't put that past canon.

Maybe those "cat test > " commands we were trying to use to see if permissions were OK were disabling the device - also possible.

Nevermind. Remember, from now on: always check that /dev/ugen0 exists before testing.

Could you try sane-find-scanner and scanimage from the command line as the ordinary user again? It might work now.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

And now welcome back ugen0

$ ls -l /dev/ugen0
crw-rw---- 1 root operator 0, 115 Oct 12 12:17 /dev/ugen0
$

The un-replug the scanner caused it?
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

$ sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon], product=0x221c [CanoScan], chip=GL842) at libusb:/dev/usb4:/dev/ugen0
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
$ scanimage -L
device `genesys:libusb:/dev/usb4:/dev/ugen0' is a Canon LiDE 60 flatbed scanner
$
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Well I got a trick to copy and paste: file /etc/syslog.conf:

I edited the nr. 1. instruction and got stuck!

uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.* /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.* @loghost
# uncomment these if you're running inn
# news.crit /var/log/news/news.crit
# news.err /var/log/news/news.err
# news.notice /var/log/news/news.notice
!startslip
*.* /var/log/slip.log
!ppp
*.* /var/log/ppp.log
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Now I can see also in gnome the /etc/syslog.conf file!!!!!! I suppose I had been doing something very wrong all this time. #ee /etc/syslog.conf used to tell me: new file and it was empty, in gnome's file system as jv or root I could not find it and now it is there and alive. Bad spelling, bad eyes.
Reply With Quote
Old 12th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Before we go any further in that, try to scan something! scanimage seems to be talking to the scanner just fine. Try $ scanimage > image.pnm and see what happens!
Then, even try xsane!

With syslog.conf, the line you want to uncomment is this one:
Code:
#*.* /var/log/all.log
. The other ones are instructions to you, and syslogd will not be able to understand them.
Please, put the '#' back in front of that first one, and try the one I suggested.
Most programs' config files have a way of including comments: human-readable text to tell users how to use the config file. Generally, they mark these lines using shell-style # marks, C++ style '//' marks, C style /*....*/, samba style ';', or even HTML/XML- style <!--....-->. All lines or areas marked like this are ignored by the program. So in that syslog.conf file, any line with a '#' is ignored, so, as far as syslogd is concerned, that file looks like this:
Code:
*.err;kern.warning;auth.notice;mail.crit		/dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err	/var/log/messages
security.*					/var/log/security
auth.info;authpriv.info				/var/log/auth.log
mail.info					/var/log/maillog
lpr.info					/var/log/lpd-errs
ftp.info					/var/log/xferlog
cron.*						/var/log/cron
*.=debug					/var/log/debug.log
*.emerg						*
*.*						/var/log/all.log
!startslip
*.*						/var/log/slip.log
!ppp
*.*						/var/log/ppp.log
Get the idea?
Putting a comment mark (#, for instance) in front of a valid statement is called 'commenting out', because it is functionally the same as deleting it. Such 'commented-out' (not, not comment-outed, because that sounds silly!) lines are used to provide examples. You then "un-comment", or remove the comment mark, to enable the example line.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.

Last edited by robbak; 12th October 2008 at 12:42 PM.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

$ scanimage > image.pnm
scanimage: open of device genesys:libusb:/dev/usb4:/dev/ugen0 failed: Error during device I/O
$ xsane

I am sorry for my mistake, I put the # back ! Re the following parts of your instructions 2. etc, should I print in the console what you suggest? ie "# touch /var/log/all.log" ? Does touch mean create? I have been always uncomfortable with the way I created initially the "/etc/devfs.rules" file. I did only ee and added the required lines therein, without "activating" the file somehow. It does show up as such though.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Sorry I forgot to state that I uncommented the "*.* /var/log/all.log" line.

$ xsane showed the same as scanimage but in a window.
Reply With Quote
Old 12th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Having become wiser a bit ! I commented what I had put when I installed gnome, gdm_enable="YES", rebooted and tried to start xsane as jv in the original xterminal. Same result: no device found.
Reply With Quote
Old 12th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Ah. More standards that require explanation.

When we quote command lines, we generally put the prompt in front of them. A line like this # chown root:wheel /var/log/all.log means that you type "chown root:wheel /var/log/all.log" at the root (or superuser) prompt. If you have ever logged in as root, you will notice that the last character of the prompt is "#". Most of us use utilities like "sudo" to run these commands - then, that line would become $ sudo chown root:wheel /var/log/all.log


When you see $ ls -l /dev/ugen0, that means that you type "ls -l /dev/ugen0" as an ordinary user. You will notice the '$' at the prompt at most times.
By the way, there is a special [cmd=#][/cmd] bbcode tag made just for this.

If you see "No device found" it means that the scanner has gone awol again. Unplug and replug to get it working.

Another definition: right now, that black screen with white writing? That is what we call the "console". Just so you know.

The "touch" command - well, it is a little hard to describe just what it does, and why we might need it. If the file does not exist, creates an empty file. If the file does exist, it makes it look like the file was edited (changes the file's "mtime", or the time-and-date stamp on each file that tells you when it was modified). Generally, we use "touch" merely to quickly create an empty file.

Hope this helps!
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 13th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

2
Reply With Quote
Old 13th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

ok, I created /var/log/all and I can open it as root in Gnome's gedit. I did not find anything about ugen0 but then I did not look further up the page as I do not know how to scroll up. Tried the search utility writing /dev/ugen0 but it showed nothing. So I cannot look for ugen0 errors. I did try to run xsane as jv before looking in /var/log/all and got the error message. I did run xsane though as root again.
Reply With Quote
Old 14th October 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Personally, I'd test my scanner with 'scanimage', not xsane. We do not know if the problem is with the scanner, or with xsane connecting to various graphical thingies, like dbus and hal.

Once we have the scanner working with scanimage, then we can see about why xsane is complaining.

Another useful command: tail. It prints the last 10? lines of the file: great to check what may have just happened. This command will print the last 10 lines, and the watch for any additions to the file, and print them to: great to keep a watch on what is happening. Open this in one xterm, and try something in the other to see if there are any messages posted.
# tail -f /var/log/all.log
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 14th October 2008
borgibo borgibo is offline
Real Name: John Vliouras
borgibo
 
Join Date: Sep 2008
Location: Crete, Greece
Posts: 28
Default

Oct 14 14:59:02 borgiboi386 gconfd (jv-7799): GConf server is not in use, shutting down.
Oct 14 14:59:02 borgiboi386 gconfd (jv-7799): Exiting
Oct 14 14:59:14 borgiboi386 gconfd (root-7819): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 0
Oct 14 14:59:39 borgiboi386 console-kit-daemon[975]: GLib-CRITICAL: g_hash_table_lookup: assertion `hash_table != NULL' failed
Oct 14 14:59:39 borgiboi386 kernel: Oct 14 14:59:39 borgiboi386 console-kit-daemon[975]: GLib-CRITICAL: g_hash_table_lookup: assertion `hash_table != NULL' failed
Oct 14 14:59:39 borgiboi386 console-kit-daemon[975]: GLib-CRITICAL: g_hash_table_destroy: assertion `hash_table != NULL' failed
Oct 14 14:59:39 borgiboi386 kernel: Oct 14 14:59:39 borgiboi386 console-kit-daemon[975]: GLib-CRITICAL: g_hash_table_destroy: assertion `hash_table != NULL' failed
Oct 14 15:00:02 borgiboi386 /usr/sbin/cron[7942]: (root) CMD (newsyslog)
Oct 14 15:00:02 borgiboi386 /usr/sbin/cron[7944]: (root) CMD (/usr/libexec/atrun)
Oct 14 15:00:02 borgiboi386 /usr/sbin/cron[7943]: (operator) CMD (/usr/libexec/save-entropy)
Oct 14 15:02:39 borgiboi386 kernel: ugen0: at uhub4 port 1 (addr 2) disconnected
Oct 14 15:02:39 borgiboi386 kernel: ugen0: detached
Oct 14 15:02:47 borgiboi386 root: Unknown USB device: vendor 0x04a9 product 0x221c bus uhub4
Oct 14 15:02:47 borgiboi386 kernel: ugen0: <Canon CanoScan, class 255/255, rev 2.00/3.06, addr 2> on uhub4
Oct 14 15:05:02 borgiboi386 /usr/sbin/cron[8138]: (root) CMD (/usr/libexec/atrun)
Oct 14 15:09:29 borgiboi386 kernel: ugen0: at uhub4 port 1 (addr 2) disconnected
Oct 14 15:09:29 borgiboi386 kernel: ugen0: detached
Oct 14 15:09:40 borgiboi386 root: Unknown USB device: vendor 0x04a9 product 0x221c bus uhub4
Oct 14 15:09:40 borgiboi386 kernel: ugen0: <Canon CanoScan, class 255/255, rev 2.00/3.06, addr 2> on uhub4
Oct 14 15:10:02 borgiboi386 /usr/sbin/cron[8294]: (root) CMD (/usr/libexec/atrun)
Oct 14 15:11:02 borgiboi386 /usr/sbin/cron[8325]: (operator) CMD (/usr/libexec/save-entropy)
Oct 14 15:11:39 borgiboi386 kernel: ugen0: at uhub4 port 1 (addr 2) disconnected
Oct 14 15:11:39 borgiboi386 kernel: ugen0: detached
Oct 14 15:11:44 borgiboi386 root: Unknown USB device: vendor 0x04a9 product 0x221c bus uhub4
Oct 14 15:11:44 borgiboi386 kernel: ugen0: <Canon CanoScan, class 255/255, rev 2.00/3.06, addr 2> on uhub4

Very excited that I could copy and paste the results of my "tail" ! here are some notes:

a. Not much can be done as jv ( user ) I get the same cannot open genesys ...... I/O error.


b. But even as root I have to unplug-replug the scanner definitely after rebooting and even in between if I want to xsane. Going scanimage, as root always, the scanner starts and stops continuously, is udesisive and produces millions of hieroglyphics.

The tail screen has not registered all actions but most though. I.e. some scanimages were omitted.

Myself, I am very happy to play around with FreeBSD and and talk to her ( him, it ) but I am really worried that I am tiring you. Accept my apologies.
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NetBSD 5.0 wifi/wireless network browser/scanner vermaden NetBSD General 9 5th July 2009 12:56 AM
qmail scanner problem t4y4n FreeBSD General 1 5th August 2008 07:36 PM


All times are GMT. The time now is 04:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick