# Print problem on linux

**URL:** <https://forum.xojo.com/t/print-problem-on-linux/18523>\
**Category:** Linux\
**Created:** [August 12, 2014, 10:05am UTC](https://forum.xojo.com/t/print-problem-on-linux/18523 "2014-08-12T10:05:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_Basile](https://forum.xojo.com/user_avatar/forum.xojo.com/stefano_basile/32/1487_2.png) [@Stefano\_Basile](https://forum.xojo.com/u/Stefano_Basile)\
**Post date:** [August 12, 2014, 10:05am UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/1 "2014-08-12T10:05:14Z")

</div>

If i call the “OpenPrint” instead the “OpenPrintDialog” method on Linux, Xojo call the window of the Printer.

How can I fix this problem?

I must print a file without opening the dialog.

I’m on Linux Mint 17.

Thanks to all.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [August 12, 2014, 12:08pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/2 "2014-08-12T12:08:19Z")

</div>

[quote=119724:@Stefano Basile]If i call the “OpenPrint” instead the “OpenPrintDialog” method on Linux, Xojo call the window of the Printer.

[/quote]

You mean `OpenPrinter()` and `OpenPrinterDialog()` , right ?

---

<div class="post-metadata">

**Author:** ![Stefano\_Basile](https://forum.xojo.com/user_avatar/forum.xojo.com/stefano_basile/32/1487_2.png) [@Stefano\_Basile](https://forum.xojo.com/u/Stefano_Basile)\
**Post date:** [August 12, 2014, 12:12pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/3 "2014-08-12T12:12:15Z")

</div>

> [@](#):
>
> You mean OpenPrinter() and OpenPrinterDialog() , right ?

Yes, if you use OpenPrinter() opens the printer as in OpenPrinterDialog() !

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [August 12, 2014, 12:28pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/4 "2014-08-12T12:28:58Z")

</div>

Xojo version? Can you make a simple demo, proofing the problem, to share and people try to figure out?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [August 12, 2014, 12:36pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/5 "2014-08-12T12:36:14Z")

</div>

> [@119749:@Stefano Basile](#):
>
> Yes, if you use OpenPrinter() opens the printer as in OpenPrinterDialog() !

I just tried. It appears Linux Mint does indeed require the user to select the printer each time one needs to print.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [August 12, 2014, 1:12pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/6 "2014-08-12T13:12:48Z")

</div>

I have set a default printer, but still OpenPrinter triggers the dialog.

The only way I see to print silently is to prepare a graphic file, and print it through a shell to lpr, which I verified to work when a default printer has been selected :

```auto
lpr shuttlelaunch.jpg
```

In terms of code, it is not quite different from Xojo regular printing ; only a Picture.Graphics is used instead of the printer g object.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:22pm UTC](https://forum.xojo.com/t/print-problem-on-linux/18523/7 "2020-10-29T17:22:13Z")

</div>


