How to take printout of linux file from windows xp using putty?

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
How to take printout of linux file from windows xp using putty?


I have installed Putty in my windows xp pc. I am connecting the RHEL
AS 3 server using putty from my windows xp. My printer is connected to
my windows xp.
Now, i want to print text.txt of RHEL AS 3.0 in my windows xp printer
through putty.

For Example:
my pc ip is
our RHEL AS 3 is
my printer is SAMSUNG - ML-1520

what i have to configure and how can i take a printout of the files
from linux?

# 2  
Hmm, there are a couple of things I'd do, depending on the requirements given by the teacher of your class.

Probably the easiest would be to just pscp the file to the windows box and print it directly.

Alternately you'd have to share your printer to the network, install samba on the red hat box, configure the printer in samba, possibly configure the printer in red hat, and send the file to the printer via samba.

Oh, and a third possibility would be to just connect the printer to the red hat server and print directly, but that's not in your requirements list.

# 3  
Look in the Settings

First, make sure you have the latest version of Putty as I don't think older ones had this option. If you look through the settings pane in the Terminal section, there is an option to select a remote printer (that would be the printer on your XP box). Just click the drop down and select your local printer. Once that's selected, you should be able to print using the correct ASCII escape sequences. The following is taken from "Unix Power Tools" My comments are in square brackets:


43.6 Printing to a Terminal Printer

Does your terminal have an extra port on the back for plugging in a printer [that "extra port" is the printer you selected in your Putty Terminal settings]? You might be able to hook up a serial printer to the port. Then you can make a little shell script named something like myprint and use it this way:

% myprint somefile
% someprogram | myprint

The myprint shell script can be as simple as this:

echo "\033[5i\c"
cat $*
echo "\033[4i\c"

depending on what version of echo your UNIX has . (46.10) Your terminal may need different escape sequences; these are for a VT100-compatible terminal. (Articles 41.10 and 5.2 can help.) Some terminals may require a newline after the escape sequences; if yours doesn't work, try the echo commands without the /c or -n.


I think that should work, but you'll need to do some digging around if those ASCII escape sequences don't work for you.
# 4  

What i did is....

From the above link i configured putty. Like as you your reply

After that

i tried this command from putty.

$ lpr -P SamsungML1520 test.txt

i get the following error....

lpr: unable to print file: server-error-service-unavailable

what might be the reason?

onemore thing....if i configure cups in the server can i able to print through putty.?
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #995
Difficulty: Medium
IBM announced its System/370 series in 1970 with full virtualization features.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Text color in Linux scripts via putty

hi Folks, Can anyone help with changing the color of the words in a linux shell script? I get how to change default background etc in putty, but for some reason the text in the script has different colors for different parts of the cript. Is there a way to have one color in a linux shell... (5 Replies)
Discussion started by: jonnyd
5 Replies

2. UNIX for Dummies Questions & Answers

Can we build a tool for Windows to retrieve data from UNIX servers (putty console)

Hi Friends, Is it possible to build a windows tool ( a java applet maybe? ) which can retrieve data and display after performing certain commands on unix servers ( simple grep / script output) after logging into putty console. I am on a company server so please bear that in mind. I might have... (23 Replies)
Discussion started by: srkmish
23 Replies

3. Windows & DOS: Issues & Discussions

Connecting to UNIX from Windows without using putty

Hi Is there any command which we can try connecting unix from windows without using any third party tool. Thanks in advance KVB (9 Replies)
Discussion started by: bikky6
9 Replies

4. UNIX for Dummies Questions & Answers

On Linux, Putty Log is not WYSIWYG like the screen?

Hi all, I am not sure if this is a known issue. I am using Putty and logging the session into a log, only the printable one. On Solaris, all is working fine. But on Linux servers, Redhat or Suse, while the screen looks correct, the log file is not. Note example below: On the screen,... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. Linux

Help!! trying to connect to linux SSH from windows putty client

Hi, i am trying to connect my Putty session on a windows box to a linux SSH, i have generated private and public key pairs using puttygen, i have set the public one to be in an OPENSSH format... and have put this in my authorized_keys file in linux, when i connect i get the following errors: ... (1 Reply)
Discussion started by: Jtyreman
1 Replies

6. UNIX for Dummies Questions & Answers

startX windows application during boot.....putty connection takes the windows

Dear all i am new to linux/debian i run my application on the computer...during startup in bashrc i wrk wid dis script to invoke startx..i do this above command and it works perfectly... if && ; then startx -- -br 1>/dev/null exit 0 fi i use winscp for file transfer and putty for... (1 Reply)
Discussion started by: venkat_330
1 Replies

7. Linux

C-Cedilla (), Putty and Linux

Having just transferred a project from Sun Solaris to Red Hat Linux 5.1 on an HP Blade, we have an issue seeing C-Cedilla () characters in Putty. While a 'more' command shows the correctly, cut and paste converts it to ^A and vi converts it to yet another ctrl A character. The character... (4 Replies)
Discussion started by: finkangel
4 Replies

8. UNIX for Advanced & Expert Users

Use putty problems in windows

Hello all, I have encountered a strange question. I installed a Ubuntu 8.10 in the VMware in the XP, and use putty to connect to ubuntu. Everything is fun except I can't use the wget in putty, neither does command "sudo apt-get ***". But they are OK in the VM. Can someone help me out? Thank... (2 Replies)
Discussion started by: tpltp
2 Replies

9. Shell Programming and Scripting

Renaming putty windows with a shell script

i frequently have to open multiple putty windows to ssh into a unix server running HP-UX 11.23. Since i use some of the windows for dedicated processes i would like to rename them (the caption displayed in the titlebar) to something more convenient than the standard <Host>.<Server>.com While... (4 Replies)
Discussion started by: orno
4 Replies

10. Shell Programming and Scripting

Putty Input thru Windows

Hi anyone knows how to pass values to putty command prompt from MS windows. since i am have a shell script to get input of several lines. i dont want to type it rather than input values from some windows based application is there any way thanks in advance. (2 Replies)
Discussion started by: JACKDSOUZA
2 Replies

Featured Tech Videos