Sneaking up on a solution

Timbo on 2003-08-22T23:26:27

Remember this? Probably not, as I wasn't exactly overwhelmed with responses. Anyway, turns out you can create a perl (or anything else, for that matter) script to just loop infinitely and respawn lpd -P printer < fifo. It blocks while waiting for input on the pipe, so no processor utilization or resources are used. At least that works under Linux... I still haven't gotten printing to a pipe from a Windows Parasite(TM) to work. I think now it's related to Windows vs. Linux EOF character semantics.

I love difficult problems, but wish I had more time to devote to this one.


check your route

phillup on 2003-08-23T00:30:13

It may be easier than you think...

do a: "route print" at a command line and look at what Windows thinks your routing should be... then connect to your vpn and check again.

I'd bet you still have a route to your local network... it just has a lower precedence.

Your printing probably uses broadcasts to find the printer... which sends the packets over the VPN.

You can solve this (usually) by setting up the printer as an LPD or direct IP printing type device. Then, it doesn't use a broadcast to resolve the printer name.

I don't use Windows much... but I have solved this problem before using this technique.

Hope it helps.

Re:check your route

Timbo on 2003-08-24T09:14:48

No joy. I really appreciate the suggestion, but (and I just tested this to be sure) the companies I VPN into turn off local LAN access when connected with the VPN client (Cisco, in one case, Lucent "Contivity" in the other).

I wonder if I could just run a regex looking for Ctrl-Z (the DOS/Windows EOF marker) from the pipe.

Frustrating.

Bummer

phillup on 2003-08-24T14:23:42

That's a bummer... but, I wonder where in the stack they grab the packets...

If you can print to a serial or parallel port... perhaps you could use a "net" command to map LPT1: to your network printer...

I don't have a WinBox handy, but I think it would be something like this:

net use lpt1: \\systemname\printsharename\

Then you print to lpt1: and the OS sends it to the mapped printer.

Thier coding may have been sloppy enough that this would fool the VPN software...

I guess, worst case, I'd just print to a file on a Samba share... then toggle to Linux and dump the file straight to the printer...

Re:Bummer

phillup on 2003-08-25T17:20:37

Of course... if you could dump a file to a Samba share...

Man, I can't believe I said that...

Sorry.