Section 1 : Building from Source Code and Installation

Q115: How do I get HylaFax running with SuSE Linux?


? Got something to say about this answer? Hit the question mark to invoke the mailer and send your comments to the HylaFAQ maintainers.

Q.
How do I get HylaFax running with SuSE Linux?

A.
Follow these step-by-step instructions.

Note 1:

I use SuSE 6.2 and make comments for SuSE 6.3 . I can't be sure about lower versions of SuSE. These are very detailed instructions for a complete install.

Note 2:

In these instructions, I will use ttyS# for simplicity. You should not type in ttyS# at any time! You should type in the serial port which your modem uses, such as ttyS1 or ttyS2 or ttyS3, etc.

Step 1:

The SuSE manual mentioned two methods of faxing You have chosen HylaFax. OK. Go into YAST and make sure that the packages mgetty and sendfax or not installed. mgetty can conflict with HylaFax. If you already installed mgetty and sendfax, then uninstall them. In this case, uninstall HylaFax as well, then do a fresh install of HylaFax.

Step 2:

If you use SuSE 6.3 or higher, skip down to Step 3. SuSE 6.2 and lower comes with HylaFax 4.0 . Ouch! This is a buggy version. You want HylaFax 4.1 beta 2. I use SuSE 6.2 and downloaded the 4.1 rpm: Go into YAST. "Choose/install packages"->"Install packages" Hit <enter> Type in the directory path where the downloaded HylaFax rpm is. Hit <enter> to show a list of all files. Choose and install.
Note: RPMs have to be compiled specifically for SuSE.

Step 3:

Make sure that you have installed all the necessary packages. For HylaFax to work: and one of these three (sendmail, smail, or postfix) . I use sendmail.

You probably want to use SuSEFax. Install:

Want to view your faxes? Then install:

Step 4:

Make sure HylaFax and Faxgetty are not running.

A. Make sure that HylaFax is not running at bootup. Go into YAST "system administration" -> "Change configuration file" and set START_HYLAFAX to "no"
Note: This is temporary.

B. Make sure that Faxgetty is not running at bootup. Go into /etc/inittab and make sure that the faxgetty line is commented out.
Note: This is temporary.
Here is what mine looks like when commented out.

<snip>
# fax getty (hylafax)
# mo:2345:respawn:/usr/lib/fax/faxgetty /dev/ttyS1
<snip>
(your 'mo' line may end with ~/modem, ~/ttyS2, etc.)

C. Restart processes as Single user mode As root, type

    init S
    

This restarted your Linux system in single user mode. No need for reboot in Linux, for those from the Windows world.
Type in your password for root.

Step 5:

Preparation advice before running faxsetup and faxaddmodem.

A. If you live in the USA, then ignore this step. But if you live in another country, then you will probably want to use the file "dialrules.europe". The file "dialrules" is setup for US standards. The file "dialrules.europe" gives you more options. So when you run faxsetup and faxaddmodem, make sure the line you type in looks like:

etc/dialrules.europe
Do not put a "/" before "etc"!

B. During faxaddmodem, the manual tells you to type in "S.u.S.E. GmbH"with the quotes. Don't. This is the line that appears at the top of your outgoing faxes after the word "From:". Put your personal/company's name and phone number. With quotes!

C. During faxaddmodem you will be asked "Which device is your modem set to?" Do not answer /dev/modem or /dev/ttyS# etc.
Simply answer

modem
or
ttyS#
Better to choose ttyS#, this way you won't run into lock file problems. If you do choose ttyS#, then you will want to make sure that all other programs are set direct to the /dev/ttyS#, not to /dev/modem. I, for instance, was using /dev/modem for ppp connection to the internet. In faxaddmodem, I chose ttyS1 . Afterwards, my ppp connection would not work. I simply set my modem settings to /dev/ttyS1 also, in my ppp settings. That fixed it. You have to choose one method for all your programs. Can't mix them up with /dev/modem here and /dev/ttyS# there.

D. Which class of modem? I can only tell you my experience. Faxaddmodem classified my modem as Class 2 . So I chose class 2 and it did not work. I chose class 1 and then it worked fine.

E. The following question is asked by faxsetup in the beginning of the configuration :

  There is no entry for the hylafax service in /etc/inetd.conf.

  The HylaFAX client-server protocol process can be setup to run
  standalone or started by the inetd program. A standalone setup
  is preferred for performance reasons, especially if hfaxd is to
  support multiple protocols (e.g. SNPP); however it may require
  manual setup if your operating system does not have a System-V
  style init program.

  Should an entry be added to /etc/inetd.conf [no]?
You must answer 'no' to this question! If you have nethertheless answered with 'yes', then remove the entry
hylafax stream tcp nowait fax /usr/lib/fax/hfaxd hfaxd -I
from /etc/inetd.conf! It will be the very last line in the file.

Step 6:

Run faxsetup and faxaddmodem.
A. Run faxsetup as instructed in the SuSE manual from the console.
B. Run faxaddmodem as instructed in the SuSE manual from the console. Note: If faxsetup and faxaddmodem or not letting you input fresh changes, then delete the following files:
  • /var/spool/hylafax/etc/config
  • /var/spool/hylafax/etc/config.modem or config.ttyS#
These are the files you create via faxsetup and faxaddmodem by the way.

Step 7:

Let's change some things.

A. Edit the file /var/spool/hylafax/etc/config If you have HylaFax 4.1 are higher installed, you should see a line that looks like

ModemGroup: "any"
change it to
ModemGroup: "any:.*"
If you decided to stick with the older version of HylaFax (4.0 and lower), then edit the /var/spool/hylafax/etc/config file and change:
ModemClass: "any"
to
ModemClass: "any:.*"
Note: "ModemClass" was renamed "ModemGroup" as of version 4.1 .

B. File /var/spool/hylafax/etc/hosts.hfaxd does not need editing. Note: In HylaFax 4.0 and lower, /var/spool/hylafax/etc/hosts.hfaxd is known as /var/spool/hylafax/etc/hosts Why am I even mentioning this? Because someone on the HylaFax thread may tell you that SuSE users need to edit this file, but that is not true. I have the two simple lines

localhost
127.0.0.1
in my hosts.hfaxd file, and all users are able to fax.

C. Edit the /var/spool/hylafax/etc/config.modem or config.ttyS# file. Uncomment the ATDT%s@ line. It looks like this:

ModemDialCmd: ATDT%s@         # T for tone dialing,@ for silence
Note: During faxaddmodem, I inputted ttyS1 for my modem, that created a file /var/spool/hylafax/etc/config.ttyS1 in my case.

D. If you use Pulse dialing, not Tone dialing then edit the file /var/spool/hylafax/etc/config.modem or config.ttyS# . Change ATDT%s@ to ATDP%s@. Your line should look like:

ModemDialCmd:      ATDP%s@          # T for tone dialing,@ for silence

E. Make sure that HylaFax is running at bootup. Go into YAST "system administration" -> "Change configuration file" and set START_HYLAFAX to "yes"

F. Make sure that Faxgetty is running at bootup Go into /etc/inittab and make sure that you have a faxgetty line Note: mingetty is not a fax program.

Add one of these lines:

mo:2345:respawn:/usr/lib/fax/faxgetty   /dev/ttyS#
or
mo:2345:respawn:/usr/lib/fax/faxgetty    /dev/modem
depending on where your modem is set to. Here is what mine looks like:
<snip>
#fax getty (hylafax)
mo:2345:respawn:/usr/lib/fax/faxgetty  /dev/ttyS1
<snip>
Note1: I chose ttyS1 in faxaddmodem. Note2: You may notice that some people use "mo" or "fx" or "S0" or "S1" as the first two characters in the faxgetty command line. You can use any two characters you want as long as they are unique and do not interfere with another command line.

G. Delete non-needed config files Go into the directory /var/spool/hylafax/etc You should have two config files

You should have only one config.{port} file . If you have for instance both
config.modem and config.ttyS1
then get rid of one. Keep the one that references the correct port (modem or ttyS#), in accordance to your selection during faxaddmodem.

H. Delete and recreate /var/log/messages Type

rm /var/log/messages
touch /var/log/messages

(All sorts of information gets thrown into this file.So it gets really long.This step will save the headache of scrolling down a really long messages file, in case you need to look inside it.Trust me on this one.)

I. Restart processes

If you normally boot up into the console (command line) then type
init 2

If you normally boot up into a GUI/graphical login then type
init 3

(In case you are not a SuSE person, your init numbers may be different.  See your manual.)
Let's check it out.

A. Look inside your file /var/log/messages towards the very bottom. You should see the following lines within your bootup messages:

<snip>
Jan 19 01:21:57 host-name FaxQueuer[217]: HylaFAX (tm) Version 4.1beta2
Jan 19 01:21:57 host-name FaxQueuer[217]: Copyright (c) 1990-1996 Sam Leffler
Jan 19 01:21:57 host-name FaxQueuer[217]: Copyright (c) 1991-1996 Silicon Graphics, Inc.
Jan 19 01:21:57 host-name HylaFAX[218]: HylaFAX INET Protocol Server: restarted.
Jan 19 01:21:57 host-name HylaFAX[218]: HylaFAX Old Protocol Server: restarted.
Jan 19 01:21:57 host-name HylaFAX[218]: HylaFAX SNPP Protocol Server: restarted.
Jan 19 01:21:58 host-name FaxGetty[216]: OPEN /dev/ttyS1
Jan 19 01:21:58 host-name FaxGetty[216]: MODEM set DTR OFF
Jan 19 01:21:58 host-name FaxGetty[216]: DELAY 2600 ms
Jan 19 01:22:00 host-name FaxGetty[216]: MODEM set DTR ON
<snip>

You should see "HylaFax" lines immediately followed by "FaxGetty lines".
That means HylaFax and Faxgetty are starting up at bootup.

B. If part A checks out, then try shooting out a test fax from the consol as root. Print a one page document to file, not to printer. Give it a .ps ending. Type in the simplest of HylaFax commands

sendfax -n -D -d {phone number} /{path}/{file name}
For instance, to send the file /home/george/Office51/work/test.ps to a modem at phone number 123-4567
sendfax -n -D -d 123-4567 /home/george/Office51/work/test.ps
if you use A4 paper, not 8.5x11, then
sendfax -n -s a4 -D -d 123-4567 /home/george/Office51/work/test.ps
The -D will send a message of success to the /var/spool/mail/root file. Go take a look in it afterwards too.
Look at the sendfax man page for more details on these commands.

A nice trick is to open up another console, type

tail -f /var/log/messages
and watch the fax process.

If you need to kill the fax for some reason, do a

faxstat -s
to get the job number, then use the command
faxrm {job number}
to kill it.

If everything works, then go get yourself a nice frontend/GUI like SuSEFax or tkhylafax.

If it didn't, get on the HylaFax thread and whine a lot. Worked for me[grin].

Note: Some modems don't like the '@' symbol in the

ModemDialCmd: ATDT%s@      # T for tone dialing,@ for silence
which can be found in the file /var/spool/hylafax/etc/config.modem or config.ttyS# . It's nice to have it, but changing the command to
ModemDialCmd: ATDT%s    # T for tone dialing,@ for silence
may allow you to fax.

Good luck!
If you feel you have some constructive commentsfor the improvement of this page, no matter how small, please send them to genz1968@mtu-net.ru If this page was helpful please let me know. Do not ask for technical help.
The above is all I know. Go to the real pros, who are on the thread.


 Back to FAQ Index FAQ Index  Next question in List Q201: How do I view received facsimile?
faq@hylafax.org. Last updated $Date: 2001/06/23 05:25:41 $.