Discussion:
gw4capisuite "cookbook"
Alexander Kiesl
2005-08-24 20:01:48 UTC
Permalink
Hi all,

getting gw4capisuite to work for sending faxes from my Windows XP
account via capisuite on SuSE 9.2 I experienced some cliffs to get
around. So I decided to write a small step by step cookbook how it can
be set up to work with multiple Windows XP accounts. So here it is:

About
=====

This document describes how I got gw4capisuite running on a SuSE 9.2
system.
I use it for printing from a Windows XP machine directly to fax.

What do I need?
===============

A running capisuite installation and:

Package Program My version
Quelle
------------------------------------------------------------------------
-
ghostscript-library /usr/bin/gs 7.07.1rc1-207.1
SuSE-Dist
a2ps /usr/bin/a2ps 4.13-1051.1
SuSE-Dist
uudeview /usr/bin/uudeview
0.5.20-26.1 SuSE-Dist
unix2dos /usr/bin/unix2dos 2.2-225
SuSE-Dist
/usr/local/bin/base64 1.3
http://www.fourmilab.ch/webtools/base64
xpdf /usr/bin/pdftotext 3.00-78.9
SuSE-Dist
/usr/sbin/sendmail
SuSE-Dist


And then?
=========

Compile the base64 package downloaded from fourmilab and install it to
/usr/local/bin. I didn't find a "base64-encode" for SuSE but base64 does
the same. If you're lucky enough to find the original base64-encode use
that one instead and be happy you don't have to compile something. :-)


What next?
==========

- Perform all steps as described in file INSTALL.Debian.
- Make sure all paths to the programs mentioned above are correct within
/etc/capisuite/gw4capisuite.conf
- Set MIMENCODE="/usr/local/bin/base64 -e" in
/etc/capisuite/gw4capisuite.conf when using the encoder of fourmilab
- Learn about the usage in the README file.

And then it should work already?
================================

Basically yes. :-) But you'll have to set up a few more things to be
able to fax from Windows XP by simply printing a document.


What do I need to do to be able to fax from a Windows machine now?
==================================================================

gw4capisuite uses the capisuitefax command with option -u <name>. The
<name> parameter is provided by the windows system. Using XP it is your
logon name which is case sensitive.

Using capisuitefax -u <name> requires that capisuitefax gets called with
root privileges.
Now capisuitefax is run by gw4capisuite which again gets called by
cupsd.
In a normal SuSE 9.2 environment cupsd is run as user lp. So
capisuitefax would fail. No fax would be sent. To change this proceed as
follows:

--> Configure sudo to enable user lp to call capisuitefax as root

- Start visudo (at a superuser prompt)
- Go to the end of the file: $G
- Insert the following line:

lp <your hostname> = NOPASSWD: /usr/bin/capisuitefax

- Save changes and exit: :wq

--> Call capisuitefax as sudo from gw4capisuite

- Open /etc/capisuite/gw4capisuitefax in an editor
- After line AWK insert the following line:

SUDO="/usr/bin/sudo"

- Save the file and exit

- Open /usr/lib/cups/backend/gw4capisuite in an editor
- Find the line "$SENDFAX -u $Mailname -d $NUMBER $PSFILE 2>&1" and
change it to:

$SUDO $SENDFAX -u $Mailname -d $NUMBER $PSFILE 2>&1
- Save the file and exit

---

As next steps you have to set up the user(s) who should be allowed to
fax and have their own fax profile.

--> First of all they have to be established as valid Linux users:

- Start the Yast module for user management
- Add the new user(s)
. Choose the same user name as the Windows XP user (Case sensitive!!)
- If those users are not supposed to log on to the system just
deactivate the accounts
- They don't need to be in any group other than users.
- Commit the changes and exit the user management module

--> To prevent the user names being shown at the logon dialog of KDE:

- Start the KDE control center
- Choose System management -> logon manager
- Choose the tab Users
- Choose which users to hide (you need super user privileges)

---

--> Finally tell capisuite about the fax users:

- Open /etc/capisuite/fax.conf in an editor (as superuser)
- Create a section that looks as follows:

[<users xp and linux logon name case sensitive>]
fax_action="MailAndSave"
fax_headline="Sent by CapiSuite (www.CapiSuite.org)"
fax_numbers="1234567"
fax_stationID="+49 89 1234567"
outgoing_MSN="1234567"

- For the appropriate values of the parameters consult the capisuite
documentation
- Do this for every user
- Save and close
- Restart capisuite (# /etc/init.d/capisuite restart)

Be aware when using the option "MailAndSave" email gets delivered to the
local Linux account of the user and take appropriate action if the fax
users are not allowed to log on to the Linux system locally. "SaveOnly"
might be a better idea.

That's it. Done here. Go to your Windows XP system:

- Create a new network printer
- As connection type choose URL and state:
"http://<ip-of-your-linux-system>:631/printers/Faxdrucker"
- As printer driver choose: "Apple Color LW 12/660 PS"

Do a "Hello World" document in Word and print it to the Faxdrucker! (use
a document with at least three lines...)

Enjoy! :-)

Additional hints
================

gw4capisuite can't extract fax number from within the document:

pdftotext sometimes has difficulties with fonts used in some
applications and then cannot convert the postscript files to proper pdf.
As a result decoding fax numbers from within documents fails (e.g.
printing from windows using notepad or printing from within linux using
kate). I guess there's nothing you can do about it. At least no one I
spoke to had a solution for that issue. Printing from Windows' Excel or
Word using Arial, Times or Courier fonts for the fax number works just
fine.

I also have the impression that conversion of documents fails if the
document contains only one or two lines.

Author: Alex Kiesl <aski.muc-***@public.gmane.org>
====================================

Disclaimer:
===========
I'm just a user like you probably. So this guide has been created by try
and error. Use the content of the document at your own risk. I don't
take responsibility if there's any damage done to your system because
you followed the instructions of this document. Feel free to contact me
if you think this is brilliant or this is bullshit. I'm always open for
better solutions. ;-)
Alexander Kiesl
2005-08-22 20:36:18 UTC
Permalink
About
=====

This document describes how I got gw4capisuite running on a SuSE 9.2
system.
I use it for printing from a Windows XP machine directly to fax. There
might be several other ways but this works for me and makes use of the
-u switch for distinguishing the sending users.

What do I need?
===============

A running capisuite installation and:

Package Program My version
Quelle
------------------------------------------------------------------------
-
ghostscript-library /usr/bin/gs 7.07.1rc1-207.1
SuSE-Dist
a2ps /usr/bin/a2ps 4.13-1051.1
SuSE-Dist
uudeview /usr/bin/uudeview
0.5.20-26.1 SuSE-Dist
unix2dos /usr/bin/unix2dos 2.2-225
SuSE-Dist
/usr/local/bin/base64 1.3
http://www.fourmilab.ch/webtools/base64
xpdf /usr/bin/pdftotext 3.00-78.9
SuSE-Dist
/usr/sbin/sendmail
SuSE-Dist


And then?
=========

Compile the base64 package downloaded from fourmilab and install it to
/usr/local/bin. I didn't find a "base64-encode" for SuSE but base64 does
the same. If you're lucky enough to find the original base64-encode use
that one instead and be happy you don't have to compile something. :-)


What next?
==========

- Perform all steps as described in file INSTALL.Debian.
- Make sure all paths to the programs mentioned above are correct within
/etc/capisuite/gw4capisuite.conf
- Set MIMENCODE="/usr/local/bin/base64 -e" in
/etc/capisuite/gw4capisuite.conf when using the encoder of fourmilab
- Learn about the usage in the README file.

And then it should work already?
================================

Basically yes. :-) But you'll have to set up a few more things to be
able to fax from Windows XP by simply printing a document.


What do I need to do to be able to fax from a Windows machine now?
==================================================================

gw4capisuite uses the capisuitefax command with option -u <name>. The
<name> parameter is provided by the windows system. Using XP it is your
logon name which is case sensitive.

Using capisuitefax -u <name> requires that capisuitefax gets called with
root privileges.
Now capisuitefax is run by gw4capisuite which again gets called by
cupsd.
In a normal SuSE 9.2 environment cupsd is run as user lp. So
capisuitefax would fail. No fax would be sent. To change this proceed as
follows:

--> Configure sudo to enable user lp to call capisuitefax as root

- Start visudo (at a superuser prompt)
- Go to the end of the file: $G
- Insert the following line:

lp <your hostname> = NOPASSWD: /usr/bin/capisuitefax

- Save changes and exit: :wq

--> Call capisuitefax as sudo from gw4capisuite

- Open /etc/capisuite/gw4capisuitefax in an editor
- After line AWK insert the following line:

SUDO="/usr/bin/sudo"

- Save the file and exit

- Open /usr/lib/cups/backend/gw4capisuite in an editor
- Find the line "$SENDFAX -u $Mailname -d $NUMBER $PSFILE 2>&1" and
change it to:

$SUDO $SENDFAX -u $Mailname -d $NUMBER $PSFILE 2>&1
- Save the file and exit

---

As next steps you have to set up the user(s) who should be allowed to
fax and have their own fax profile.

--> First of all they have to be established as valid Linux users:

- Start the Yast module for user management
- Add the new user(s)
. Choose the same user name as the Windows XP user (Case sensitive!!)
- If those users are not supposed to log on to the system just
deactivate the accounts
- They don't need to be in any group other than users.
- Commit the changes and exit the user management module

--> To prevent the user names being shown at the logon dialog of KDE:

- Start the KDE control center
- Choose System management -> logon manager
- Choose the tab Users
- Choose which users to hide (you need super user privileges)

---

--> Finally tell capisuite about the fax users:

- Open /etc/capisuite/fax.conf in an editor (as superuser)
- Create a section that looks as follows:

[<users xp and linux logon name case sensitive>]
fax_action="MailAndSave"
fax_headline="Sent by CapiSuite (www.CapiSuite.org)"
fax_numbers="1234567"
fax_stationID="+49 89 1234567"
outgoing_MSN="1234567"

- For the appropriate values of the parameters consult the capisuite
documentation
- Do this for every user
- Save and close
- Restart capisuite (# /etc/init.d/capisuite restart)

Be aware when using the option "MailAndSave" email gets delivered to the
local Linux account of the user and take appropriate action if the fax
users are not allowed to log on to the Linux system locally. "SaveOnly"
might be a better idea.

That's it. Done here. Go to your Windows XP system:

- Create a new network printer
- As connection type choose URL and state:
"http://<ip-of-your-linux-system>:631/printers/Faxdrucker"
- As printer driver choose: "Apple Color LW 12/660 PS"

Do a "Hello World" document in Word and print it to the Faxdrucker! (use
a document with at least three lines...)

Enjoy! :-)

Additional hints
================

gw4capisuite can't extract fax number from within the document:

pdftotext sometimes has difficulties with fonts used in some
applications and then cannot convert the postscript files to proper pdf.
As a result decoding fax numbers from within documents fails (e.g.
printing from windows using notepad or printing from within linux using
kate). I guess there's nothing you can do about it. At least no one I
spoke to had a solution for that issue. Printing from Windows' Excel or
Word using Arial, Times or Courier fonts for the fax number works just
fine.

I also have the impression that conversion of documents fails if the
document contains only one or two lines.

Author: Alex Kiesl <aski.muc-***@public.gmane.org>
====================================

Disclaimer:
===========
I'm just a user like you probably. So this guide has been created by try
and error. Use the content of the document at your own risk. I don't
take responsibility if there's any damage done to your system because
you followed the instructions of this document. Feel free to contact me
if you think this is brilliant or this is bullshit. I'm always open for
better solutions. ;-)

Lesen Sie weiter auf narkive:
Loading...