# Printing from Linux environment

**URL:** <https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples, Natural-on-Windows-Unix\
**Created:** [January 7, 2015, 2:11pm UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996 "2015-01-07T14:11:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [January 7, 2015, 2:11pm UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996/1 "2015-01-07T14:11:45Z")

</div>

Hi everyone,

I need some help please.  
I need to print (i.e. hardcopy) to a local printer (the printer is connected directly to my laptop and not to a network), but the program runs on the Linux environment.

I have tried the following, with no luck:

DEFINE PRINTER (REPORT1 = 1) OUTPUT ‘LPT1’  
WRITE (REPORT1) ‘REPORT 1 PRINTED ON PRINTER LPT1’

Thanks  
Phillip

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [January 7, 2015, 6:18pm UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996/2 "2015-01-07T18:18:00Z")

</div>

DEFINE PRINTER is a logical definition. The physical printer must be defined via the Natural Configuration utility on the Linux host.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [January 8, 2015, 6:24am UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996/3 "2015-01-08T06:24:58Z")

</div>

Thanks.  
I defined the printer in the NATPARM (see attached screen shot), but the program still gives me a NAT1586  
 ![Capture2.JPG](https://global.discourse-cdn.com/techcommunity/original/2X/5/5b0d0d39b54469c2988af7fb1f7576ccb6c89ef1.jpeg)

 ![Capture.JPG](https://global.discourse-cdn.com/techcommunity/original/2X/5/5acd1555e4e6cd2328587fc164fd938e0f5e2c18.jpeg)

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [January 8, 2015, 7:48am UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996/4 "2015-01-08T07:48:11Z")

</div>

Presuming your printer name is correct, try changing the Method setting from TTY to GUI in the NatParms.

You said the Natural program runs on a Linux host, but the Configuration utility and error window attachments are both Windows-based. Just testing?

The NATPARM utility in Linux is character-based. Yuch.

As I recall, it is possible to point Linux print services to a device connected to a Windows machine, but it’s not a trivial set-up.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:32pm UTC](https://techcommunity.softwareag.com/t/printing-from-linux-environment/179996/5 "2021-04-02T15:32:39Z")

</div>


