Solved

Printing from Emacs to Local Printer

Posted on 1997-09-19
5
263 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Squid Connection Pools 3 82
OpenWrt 1 47
Setup static routes for IP address in CentOS 2 66
How to Edit Files in Linux 6 122
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
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…

791 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