Issue 23232 - Command line printing should not require the window system
Summary: Command line printing should not require the window system
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC All
: P3 Trivial with 2 votes (vote)
Target Milestone: OOo 2.3
Assignee: caolanm
QA Contact: issues@gsl
URL:
Keywords:
: 74156 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-12-05 10:20 UTC by jvromans
Modified: 2007-08-01 15:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jvromans 2003-12-05 10:20:01 UTC
Unix/Linux/*nix specific.
When printing from the command line, OOo requires the window system to be
accessible. This defeats many of the advantages of command line printing, and is
technically unneccessary. Therefore this requirement should be eliminated.

Note that I'm aware this is a hard one, because it probably involves substantial
redesign. However, I think it should not be forgotten.
Comment 1 christof.pintaske 2003-12-11 18:20:24 UTC
I agree that this would be desireable. We will put this on the table again if we
have ressources for it.
Comment 2 christof.pintaske 2005-02-22 17:54:57 UTC
cp->ssa: please take over
Comment 3 stephan_schaefer 2005-12-02 11:18:12 UTC
SSA: reassign to PL
Comment 4 stuhood 2007-01-24 17:43:57 UTC
This bug is still around in OO 2.*, so it should probably be bumped up. If I try
printing with `openoffice -p filename.doc` from within an ssh session (with -X
flag), the splashscreen shows, and then OO crashes.
Comment 5 philipp.lohmann 2007-01-24 18:08:18 UTC
That crash should be fixed, but has nothing to do with this issue. Since you
have Xserver access (you even see the introbitmap) that cannot be the issue. If
you have a reproducible bug, then please file a new issue for this.

BTW: I fully agree, that printing without Xserver access would be a valuable
feature.
Comment 6 jvromans 2007-01-24 19:37:28 UTC
It may be more urgent than you think. Think web-based print services where you
can submit an ODF document for printing. Or remote print servers. 
Comment 7 stuhood 2007-01-24 21:41:45 UTC
Now that I am back at my desktop, I can see that the file did in fact print.
What I got was a warning anyway:

> ** (process:12907): WARNING **: Unknown error forking main binary / abnormal
early exit ...

A little more testing showed that of the following:
->/usr/lib/openoffice/program/soffice.bin
->/usr/bin/soffice
->/usr/bin/openoffice
... only `openoffice -p` shows the splashscreen and subsequent warning. All of
the scripts/binaries successfully print.

Soo, ignore my previous comment, my issue is not bug-worthy.
Comment 8 philipp.lohmann 2007-02-06 16:15:14 UTC
*** Issue 74156 has been marked as a duplicate of this issue. ***
Comment 9 dojcubic 2007-02-06 16:26:11 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

#!/bin/sh
if [ ! -f /tmp/Xvfb/Xvfb_screen0 ] ; then
  mkdir /tmp/Xvfb
  PATH=\$PATH:/usr/X11R6/bin DISPLAY= Xvfb :10 -screen 0 800x600x24 -fbdir
/tmp/Xvfb/ &
  sleep 1
fi
soffice -display :10 -p "$1"


As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 10 dojcubic 2007-02-06 16:28:11 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

#!/bin/sh
if [ ! -f /tmp/Xvfb/Xvfb_screen0 ] ; then
  mkdir /tmp/Xvfb
  PATH=\$PATH:/usr/X11R6/bin DISPLAY= Xvfb :10 -screen 0 800x600x24 -fbdir
/tmp/Xvfb/ &
  sleep 1
fi
soffice -display :10 -p "\$1"


As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 11 dojcubic 2007-02-06 16:28:42 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

#!/bin/sh
if \[ ! -f /tmp/Xvfb/Xvfb_screen0 \] ; then
  mkdir /tmp/Xvfb
  PATH=$PATH:/usr/X11R6/bin DISPLAY= Xvfb :10 -screen 0 800x600x24 -fbdir
/tmp/Xvfb/ &
  sleep 1
fi
soffice -display :10 -p "$1"


As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 12 dojcubic 2007-02-06 16:30:14 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

#!/bin/sh
if [ ! -f /tmp/Xvfb/Xvfb_screen0 ] ; then
  mkdir /tmp/Xvfb
  PATH=$PATH:/usr/X11R6/bin DISPLAY= Xvfb :10 -screen 0 800x600x24 -fbdir
/tmp/Xvfb/ &
  sleep 1
fi
soffice -display :10 -p "$1"


As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 13 dojcubic 2007-02-06 16:30:23 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

#!/bin/sh
if [ ! -f /tmp/Xvfb/Xvfb_screen0 ] ; then
  mkdir /tmp/Xvfb
  PATH=$PATH:/usr/X11R6/bin DISPLAY= Xvfb :10 -screen 0 800x600x24 -fbdir
/tmp/Xvfb/ &
  sleep 1
fi
soffice -display :10 -p "$1"


As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 14 dojcubic 2007-02-06 16:33:18 UTC
For all of you needing a way to work around this issue, here's my solution.
However I strongly ask for a real solution/fix to this problem.

A sample shell script is attached.

As I use this for batch printing, I don't care if the Xvfb is still running
afterwards, as a new batch will be started soon anyway. Of course you could kill
it after soffice quits.

For more information what Xvfb does read Xvfb(1).
Comment 15 philipp.lohmann 2007-06-27 13:17:09 UTC
with the headless plugin for vcl added in CWS mergesvp, this problem should be
solved. Just add -headless on the commandline. No need for a running X11 server,
but the X11 libraries are needed to satisfy the linker.
Comment 16 philipp.lohmann 2007-07-17 12:36:41 UTC
please verify in CWS mergesvp
Comment 17 philipp.lohmann 2007-07-19 13:57:49 UTC
verified in CWS mergesvp
Comment 18 caolanm 2007-08-01 15:37:24 UTC
seen in m233