I admit, that using a dialup connection is more difficult, but here are the
circumstances for which it would work, you are dialing directly into the
network which has the telnet server.  It would be more difficult to do if
you are connecting over the Internet, but it is still possible.  The
situation in which it probably won't work is if you are dialing in to a
shell server.  Simply stated, if you are using dial-up networking, it will
work, if not, it won't.

If you are using dial-up networking, here is what you do.  

Note your hostname, your computer name, and you workgroup name.  If you have
a static IP, that will help, if not, you probably need to have a valid host
name (like with DHCP/WINS or similar).  When you are logged into the Linux
server through telnet, ping your hostname and/or your IP address just to
make sure it works.

 Send-          $ ping hardy
 receive        -       PING hardy (10.0.0.13): 56 data bytes
 receive-       64 bytes from 10.0.0.13: icmp_seq=0 ttl=128 time=0.3 ms
or
 Send-          $ ping 10.0.0.13
 Receive-       PING 10.0.0.13 (10.0.0.13): 56 data bytes
 Receive-       64 bytes from 10.0.0.13: icmp_seq=0 ttl=128 time=0.2 ms
        (if this doesn't work, stop now and make this work)

If you can, set your Samba Workgroup to be the same as your dial in clients,
by editing your smb.conf
                [global]
                workgroup = LONGBOATKEY #or whatever your workgroup is

On your windows computer, share the printer and give it a nice short name
with only lower case letters.  If using Windows NT Workstations, add a user
called printer and give it access to the shared printer.  (you can use any
name for the user)

Back on the Linux computer, test your share to see if it works.  Let's
assume you shared your printer as lj4 and your workstation's name is hardy.
We also need the NetBios (SMB) name of your Linux box- for example, nis1.
type the following command, 
        $ smbclient \\\\hardy\\lj4 -I 10.0.0.13 -n nis1 -U printer  (after
the lj4 is a capitol i.)

You may be prompted for a password, and once entered, you will be presented
with an smbclient prompt,
        smb: \>
You can then type:
        smb: \> put /etc/smb.conf
to print your samba config file (which might be kind of long).

I think you will find that this works OK over a dial up connection.  This
will even work over the Internet.

Once this works, you can set up a print queue using the Samba Howto and
related docs.  Once you do that, set up DOS-EMU like so, (assuming that your
print queue is called lj4):
        $_printer = "lp, lj4" # to set your lpt1 to the default print queue,
and lpt2 to your new samba queue.

If this doesn't work, send me a line, and we'll talk more.

p.s. There is another way to do it, but I don't know how.  You can test it
by using the lynx web browser and printing.  If the web browser understands
you terminal type, it sends a special escape code to your terminal, which
tells it to send everything to it's printer port, and then dumps the
***text*** that you are printing to the terminal.  It then sends an escape
code that says I'm done now, and your terminal begins sending all output to
the screen again.  I think this is how it works.  I wish I knew a way to
make this work for DOS-EMU programs.

        Matthew Nuzum
        IS Director
        Florida Vacation Accommodations
        [EMAIL PROTECTED]


 -----Original Message-----
From:   Gregory Doyle [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, October 22, 1999 10:58 AM
To:     Matthew Nuzum
Subject:        RE: Directing Printing to a file under DOSEMU

 
--

On Fri, 22 Oct 1999 09:21:42   Matthew Nuzum wrote:
>Here is what I did in a very similar situation:
>
>On the computer that has the printer, I shared the printer,
>I then used samba to set up a printer on my Linux box and tested it with
lpr
>I then set my lpt1 in DOS-EMU to the correct que,
>Then, I printed my little heart out.
>
>I actually added several levels of complexity on top of this to do more
>advanced things.  Because my users roam around a lot, they often need to
>print to different printers, My particular DOS app only allows the
selection
>of 2 lpt printers so I created a little script that changes the users
>.dosemurc to set up the correct printers that they will be using for that
>session.  When they telnet in, they have see a menu they first choose the
>menu option that sets their printer, then they choose the menu item that
>starts their DOS app.  Nifty, huh?
>
>My next project is to figure out how to make Linux print to different trays
>on our Laser Jet so that we can start using pre-printed paper.
>
>I'd love to help anyone who is having troubles in this area.  I've spent
>about 1200 hours over the last few months making this system work.
>
>Matt Nuzum
>       Florida Vacation Accommodations
>       [EMAIL PROTECTED]
>
>P.S.  I just got a **really** good deal on a 24-7 support contract for
>Linux, unlimited calls, any subject (Linux related), 2 hour response time,
>from HP for US$130 per month.  
>
>

Hi Matt,
Thanks for you quick response.  Since I have such a newbie to Linux I am not
sure whether what we are talking about is the same.  What I was looking at
doing would be to have users Telent into the Linux Box from remote locations
(ie. locations off the Network).  They could Telnet in via dial-up or
TCP/IP.  Therefore I don't think SAMBA would work in those instances, though
I am not certain of this, but I thought SAMBA is useful in circumstances
where the same Network is involved.  I would be having off-Network Telnet
sessions.  Does this make any sense to you?  Perhaps I could call you and
explain a little clearer exactly what I am trying to do.  I am most
interested in finding out if what I am thinkinig about is possible.

Thanks

GP. Doyle


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

Reply via email to