LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   scanner work locally, but not remotely, normal behavior ? (https://www.linuxquestions.org/questions/linux-general-1/scanner-work-locally-but-not-remotely-normal-behavior-699359/)

lxme 01-23-2009 08:49 AM

scanner work locally, but not remotely, normal behavior ?
 
Dear all,

This problem is starting to get on my nerves and I don't know if I should file a bug report or if I made a mistake somewhere:
Here is the situation:

2 PCs
- PC1 Headless server running Ubuntu 8.10 with a Canon canoscan Lide50 (USB)
- PC2 Desktop PC running Ubuntu 8.10

1) If I attach a monitor to PC1 and logon locally as *root* and from a terminal do:


Code:

root@PC1:/home/user# scanimage -L
device `plustek:libusb:001:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

Scanner is OK

2) If I attach a monitor to PC1 and logon locally as *user* and from a terminal do:


Code:

user@PC1:/home/user# scanimage -L
device `plustek:libusb:001:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

Scanner is OK

3) If I logon remotely to PC1 from PC2 via VNC or SSH as *root* and from a terminal do:

Code:

root@PC1:/home/user# scanimage -L
device `plustek:libusb:001:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

Scanner is OK

4) If I logon remotely to PC1 from PC2 via VNC or SSH as *user* and from a terminal do:

Code:

user@PC1:~$ 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).

Scanner WON'T WORK


5) If I log on locally to PC1 *AND* If I logon remotely to PC1 from PC2 via VNC or SSH afterward as *user* and from a terminal do:

Code:

user@PC1:/home/user# scanimage -L
device `plustek:libusb:001:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

Scanner is OK
The goal is of course to log on PC1 remotely and be able to use the scanner remotely without having to log on locally on PC1.
So, is this behavior normal, or did I miss something ?

Any help welcome

niknah 01-23-2009 10:22 AM

You're saying that it works as root but not as the user?

When you're logged in as a plain user run...
sudo scanimage -L

lxme 01-23-2009 11:37 AM

I am saying that it works as user but only if there is a local session open not when I log on remotely.

Code:

user@PC1:/home/user# scanimage -L
device `plustek:libusb:001:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner


tredegar 01-23-2009 12:48 PM

This is an odd situation and is "interesting". Thank you for the clear information you have provided so far.

I am thinking that this may be a permissions issue. I have a few questions -
Check this: ssh to PC1 and it cannot find the scanner (as your post #1). Start a local login to PC1, and check that the remote login can now find the scanner. Logout the local login, can the remote connection still find the scanner? What happens if you drop and then re-establish the ssh connection. Same behaviour?

What happens if you are not logged into PC1 locally, ssh to it from PC2 and then just issue the groups command?
Does it show that you (on PC1) are a member of the scanner group (on PC1)?

Does your username on PC1 have the same UID as your username on PC2? Find out your UID with the command echo $UID in a terminal on each machine.

What is the output of ls -al /dev/scanner ?
(Maybe your distro doesn't call it /dev/scanner - hunt around a bit if it is "not found")

That should be enough ideas for you to experiment with for now.

[Edit] Having slept on this problem, I realise that the error you are receiving is "No scanners were identified" and not "permission denied". So maybe the scanner isn't being recognised as being plugged-in and the device node ( probably /dev/scanner ) maybe isn't being created.
Please check to see if this is the case. If so, maybe we can make it be recognised with something like /etc/init.d/udev restart
[/Edit]

As an aside, I should advise that you should not allow ssh access to a user identifying themself as root. The proper way to do it is to ssh as yourself and then su / sudo to root if you need to be root.


All times are GMT -5. The time now is 12:51 PM.