Solved

Printing from Emacs to Local Printer

Posted on 1997-09-19
5
266 Views
Last Modified: 2010-03-18
Hi, I'm running Redhat 4.2 and I would like to be able to print to my local printer from emacs in X windows. I want to print a man page for example. I have set my printer up with the name lp1 and can print from ghostview quite nicely. How do I set my printer up for emacs? Note: With my unix expierience I always thought there was a .emacs file but I can't seem to find it.

thanks
zeos
0
Comment
Question by:zeos
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:unicorntech
ID: 1586604
What commands are you using to print now.  You should be able to print a man page by typing:
 man <subject> | lpr -Plp1

Let me know how it goes,

Jason
0
 
LVL 4

Accepted Solution

by:
unicorntech earned 50 total points
ID: 1586605
What commands are you using to print now.  You should be able to print a man page by typing:
 man <subject> | lpr -Plp1

Let me know how it goes,

Jason
0
 

Author Comment

by:zeos
ID: 1586606
Jason, thanks for the quick reply. Your suggestion worked, thanks. But if I'm in X windows and I want to be able to print the current buffer do you know of a way that I can have emacs default to lp1?

thanks
mike
0
 
LVL 4

Expert Comment

by:unicorntech
ID: 1586607
If you use something such as the following in .emacs this should do the job;

(setq printer t)  ; Anything but a string.
     (setq ps-lpr-command "whatever")
     (setq ps-lpr-switches '("-q" "-dNOPAUSE"
                        "-sDEVICE=printer type"
                        "-r240x72"
                        "-sOutputFile=LPT2"
                        "-"))

Try the Emacs help on-line at http://monarch.mcs.csuhayward.edu/doc/emacs/

Hope this does the trick.

Let me know if you need more help....

Jason
0
 

Author Comment

by:zeos
ID: 1586608
Jason, Thanks for your help. It worked!

Thanks again
Mike
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Parse output of Host command and place into a variable 9 113
Embeded Linux on Router 9 110
LDAP setup? 9 87
recommendations for external nmap pen test (from a Windows laptop) 5 173
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question