Hello,
Despite all the topics found on this forum I do not succeed in doing my cron working :
I try to print xls document to a ps printer
It works fine when using the command line as follows :
PrintXls2ps.sh
#!/bin/sh
/usr/lib/openoffice/program/soffice -p PSPRINTER /home/ftp/export/Excel/simple.xls
Then I do crontab -e (as root)
SHELL=/bin/sh
PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin
30 * * * * /usr/bin/PrintXls2ps.sh >>/home/frp/export/Excel/FileLog.txt 2>&1
I have the error
/usr/lib/openoffice.org/program/soffice.bin X11 error: Can't open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See "man X" resp. "man xhost" for details)
I tried with
1- 30 * * * * /bin/sh /usr/bin/PrintXls2ps.sh >>/home/frp/export/Excel/FileLog.txt 2>&1
2- /usr/lib/openoffice/program/soffice -headless -p PSPRINTER /home/ftp/export/Excel/simple.xls
3- using source /home/"username"/.bash_profile in sh script
4- export DISPLAY:=0:0 in sh script
and nothing's working
could someone help me ?
I use etch with ooo 2.0.3
Print soffice doc with crontab
Print soffice doc with crontab
OOO 2.0.3
Debian etch
Debian etch
- kingfisher
- Volunteer
- Posts: 2123
- Joined: Tue Nov 20, 2007 10:53 am
Re: Print soffice doc with crontab
If the error is in cron, I use '-display :0.0' (without the ' ' of course).
Apache OpenOffice 4.1.9 on Linux
Re: Print soffice doc with crontab
Hello,
So I tried this
/usr/lib/openoffice/program/soffice -display=:0.0 -headless -p PSPRINTER /home/ftp/export/Excel/simple.xls
But the same message in FileLog.txt
it is not the same as
export DISPLAY:=0:0 in sh script ?
What's wrong !!?
So I tried this
/usr/lib/openoffice/program/soffice -display=:0.0 -headless -p PSPRINTER /home/ftp/export/Excel/simple.xls
But the same message in FileLog.txt
it is not the same as
export DISPLAY:=0:0 in sh script ?
What's wrong !!?
OOO 2.0.3
Debian etch
Debian etch
Re: Print soffice doc with crontab
Hello
Is there anybody that could help me ?
Thanks
Is there anybody that could help me ?
Thanks
OOO 2.0.3
Debian etch
Debian etch
Re: Print soffice doc with crontab
Does the headless print line work on its own from the console?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS