APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Counterpoint on Red Hat Linux

© June 2001 Tony Lawrence

Counterpoint (Counterpoint web site) is a provider of point of sale and accounting software. Recently, they have provided Linux versions of their software. I've done three installations of this in recent months, and this article details my experiences.

Workstation or Server?

The installation notes for Linux warn that Counterpoint must be installed on a "Workstation" install of Red Hat. This isn't really true, and probably would cause a person new to Linux more trouble than they could handle.

The problem, I'm sure, is that Red Hat offers several different "Server" installations, and each includes different configurations of software. I have no idea just what is missing that causes problems for Counterpoint, but the solution is simple: do an "Everything" install. The disk requirements aren't much, and you don't have to think about what you might need later- just throw it all on and be done with it.

However, if you feel you must follow Counterpoint's dire warnings and do the Workstation install, you'll probably need a few additional packages. The Workstation install does not, for example, include the telnetd server- which means no inbound telnet connections. If you have multiple users on a network, you'll need to at least add that from the RPM's: mount the Red Hat install CD and install the "telnet-server" package from the RedHat/RPMS directory (note that each CD has PART of the RPMS- so if what you want isn't on CD 1 it may be on CD 2 etc.). While you are there, you might also want to install the Samba packages- the Workstation install does not completely install Samba either. I can't even remember all the things I needed that are not installed on Workstation- it can get pretty annoying constantly going back to install more RPMS, and probably the biggest annoyance is figuring out what you need- packages aren't always so obviously named as "telnet-server". Still, if you needed support from Counterpoint, they are going to ask if you installed Workstation or Server, and you had better not have the wrong answer. If you are the faint-hearted type, you might want to do it their way and put up with the pain.

Did Someone say Pain?

There's no shortage of pain or at least minor difficulty with these Linux installs. For example, one of the things I'm accustomed to doing is modifying the users .profile to do an "exec" of the application. Well, "exec" is just a little bit broken on the bash version supplied with some versions of Red Hat. If you use it, you'll probably find that your application program doesn't work at all, and that certainly was the case with Counterpoint. For the moment, I just changed the .profiles to do a "cd /syn; ./syn; exit 0". That's not equivalent to an exec, but it was the best I could do while I went looking for a fix.

Red Hat Network

Before working with the customer's machines, I figured I'd see if the problem existed on my own, fully installed, machine. Indeed it did, so it was now time to get updates from Red Hat.

With recent versions of Red Hat, you have to register before you can use their Update Agent (Programs->System->Update Agent). The idea is that they will let you have free updates for one machine, but if you are maintaing multiple machines, you'll have to subscribe for a fee. I have no problem with that, but even after registering I couldn't get the Update Agent to work- it would always hang at "Romoving packages with files marked to skip from list". Fortunately, "up2date" (which is the program that actually does the updates) also runs in command line mode- running it there I found that it was crashing because it couldn't open /etc/ntp-step-tickers. I simply did "touch /etc/ntp/step-tickers" and then up2date retrieved information about 163 packages it said I needed to update.

Well, that's a bit of a mess, isn't it? 450 MB of updates? I have a fast internet connection, but that's a little much, so I thought maybe I could pick and choose what I really needed. As "up2date" itself was on the list, I thought that would be a good place to start, so I checked it off and proceeded. The update manager warned me that dependencies required certain other packages, and offered to retrieve those also, and I told it to go ahead, but when it came time to install, it failed miserably, complaining that dependencies were not resolved.

Well, nothing to do but bite the bullet and get everything. That immediately is an annoyance itself- there's no apparent way to just say "get everything"- you have to check off everything individually- very annoying. Once that's done, the downloaad proceeds, and after it is done, the packages are installed. That takes a bit longer than the download on my machine (fast internet, pokey old hardware). This time everything installed without error, but the exec still wasn't working right.

Later, after delivering the customer's machines, I decided to experiment with a newer bash. I didn't want to put it on the customer's boxes if it hadn't been blessed by RedHat, but I did want to investigate the problem. So, I went to www.rpmfind.net, and a quick search for bash there turned up a later version. I downloaded 2.05.4(1) bash, did an "rpm -U", and the exec problem was fixed.


Well, of course there were more problems. Printing was the first, and this was puzzling. Synchronics handles spooled printers in the same way the RealWorld Unix systems do: an environment variable containing the print command is exported before running the application. This is usually done by putting the variables in the "synsuppl" file in the working application directory. Here's a "synsuppl" with a few printers defined:

# have to copy the SYNLINUX.MAP from the Counterpoint CD
# if you want to run this from the console.
[ $TERM = linux ] && loadkeys SYNLINUX.MAP
dd_printer=">lpr -P lp"; export dd_printer
dd_forms=">lpr -P forms"; export dd_printer

In the Printer Groups setup within Synchronics, you'd use "printer" and "forms" where you'd otherwise specify a device. On SCO Unix installations, this works as it should, but it didn't work on Linux. Fortunately, there's a simple work-around:

# script to create a device file for Synchronics to use with a spooled printer
# start this from /etc/rc2.d/S99local
rm -f /dev/forms
mknod /dev/forms p
chmod 666 /dev/forms
while true
cat /dev/forms | lpr -P forms

The following information is from Counterpoint:

Important information regarding CounterPoint and Red Hat 7.1 Linux:

CounterPoint is not currently supported on RedHat 7.1.

( Note: More recently, Counterpoint has advised me that they have tested with RedHat 7.2 using the abi module and have no problems- APL)

Previous versions of the Linux kernel included an iBCS module that allowed Unix binaries to run under Linux. RedHat 7.1 ships with the 2.4.2 kernel and iBCS is not available for 2.4.x kernels. Starting with the 2.4.3 kernel, an ABI module is available to allow Unix binaries to run under Linux.

ibcs2 has been deprecated in favor of the ABI kernel patches. See linux-abi.sourceforge.net

The 2.4.2 kernel that ships with RedHat 7.1 is not compatible with iBCS nor ABI. It is our expectation that RedHat will be updating Linux to provide compatibility with Unix binaries; however, this is not the case today. When this happens, Synchronics can support CounterPoint on that compatible version of Linux.

Basic CounterPoint applications run without the Unix binary compatibility (provided either by iBCS or ABI). However, the following functions will not run without binary compatibility:

When exiting CounterPoint, you get the message "./syn: ./syndel: cannot execute binary file", which means that if there were any open users, you will eventually get the message "Maximum number of users exceeded". This can be corrected by deleting the contents of the TEMP directory once all users have exited.

If you encounter these problems, you have the following choices:

a) Establish your own method for cleaning up the TEMP directory and don't use Multi-Site, or
b) Move to RedHat 7.0 (make a backup of your CounterPoint programs and data, rebuild the machine using the older version, re-load your backup), or
c) Update from the 2.4.2 kernel to the 2.4.3 kernel for all applicable modules, then obtain the ABI source https://linux-abi.sourceforge.net/ and merge it with the 2.4.3 kernel and recompile and re-install the kernel. Synchronics cannot help you accomplish this or provide support for this updating, and so this is not recommended solution.

I suspect that the defective bash shell may be the source of this problem, too. While you are sticking stuff in S99local, you may as well add a call to "modprobe iBCS"; Synchronics needs that module loaded.

With this printer script, you can just use "/dev/forms" in the Synchronics printer setup. The "forms" printer could be a local printer or a network printer; Synchronics thinks it is printing to a device but the script redirects that to the spooler. On most of the installs I did, the printers were attached to Windows machines and shared. On the Linux side, I configured them with the Print Tool as smb printers. I use the "text only" printer type for dot matrix printers; otherwise you will find Linux using ghostscript to create graphics of your text (that can also be shut off by setting EXPORT ASCII_TO_PS=NO in /var/spool/lpd/printername/general.cfg).


That, of course, requires Samba. As I said earlier, only part of Samba gets installed with the Workstation option, and you will want to install the rest if you want the Linux machine to be available in network neighborhood. Samba configuration is pretty easy; you'll find the configuration file /etc/samba/smb.conf and it has pretty clear examples. You can also use "Swat", which is the html based configurator. However, installing Samba doesn't enable swat or Samba: enable swat by editing the "swat" file in /etc/xinetd.d, and samba by "ln /etc/init.d/smb /etc/rc2.d/S35smb; /etc/rc2.d/S35smb start". or you can use chkconfig:

chkconfig --level 2345 smb on 

The O'Reilly Samba book is a good reference to have.

Because most of the clients I work with are small and more concerned about ease of use than security, I make the Samba configuration use share level security by modifying the smb.conf file like this:

netbios name=cpserver
workgroup = WORKGROUP
security = share

Of course this would not be suitable for larger installations or when the machine is accessible from the outside world. Since small system users so often don't even log in to Windows, I also give them a public share:

   comment = Public Stuff
   path = /public
   public = yes
   writable = yes

Someone who read this article really took me to task on that, really making it sound like this was almost a criminal act. It's not: small offices want to share data easily and they fully understand that anyone else could delete or otherwise pervert the files stored here. That's not the point- these are small environments of cooperative users. They don't lock their office desks and they want ease of use more than somebody elses idea of a "secure" system.


I also installed Win4Lin on some of these systems. This lets the server also function as a client, using the same Windows emulation software as the rest of the users and providing an environment that the typical user is more accustomed to.

The only problem I had at all with Win4lin on these RedHat systems was that part of the install wanted libncurses.so.4, and failed until I linked /usr/lib/libncurses.so.5 to that.


The specs for these installs called for Anzio on the Windows side. Anzio doesn't quite work right with Counterpoint- it doesn't keep the colors correct as you arrow through the menus (neither does SCO's Termlite, so the problem may actually be Counterpoint though they insist it isn't), but other than that it's fine. I configured Anzio to use SCOANSI emulation, and in the synsuppl file I tell Counterpoint that the TERM is just ansi. In these installs, there wouldn't be anything but SCOANSI or the System console, so I just did a flat "TERM=ansi" in the synsuppl file, but you could also do

[ $TERM = "scoansi" ] && TERM=ansi

in a more complex environment.

Root login

I try to keep users away from the root login, but there are of course times when it is necessary. Of course, by the time it becomes necessary, the users will have completely forgotten everything they needed to know, so I set up a simple program (call it /usr/local/bin/remind) that will help them:

echo "
su -     to become root
df       to see disk space
w        to see logged in users
shutdown to shutdown server
resetsyn to reset syn user count
setdate  to change date

Now how will they remember to use "remind"? Well, one way is to use a PROMPT_COMMAND in .bash_profile:


That causes "remind" to run before each shell prompt. You might want to cut that back to something that just reminds them of "remind".

The last two commands mentioned in that script aren't supplied by RedHat or Synchronics. The "resetsyn" clears the Synchronics of false users- it sometimes gets confused and if sessions are hung, this can be run:

echo "All users log off and then press ENTER"
read ak
killall -9 rtssyn
cd /syn/TEMP && rm -f *

The "setdate" is just a more user-friendly front end to changing the date and time:

echo -n "Enter Date or leave blank for `date +%m/%d/%y`: " 
read mydat
echo -n "Enter Time or leave blank for `date +%H:%M`: " 
read mytime
if [ "$mydat" != "" ]
mmdd=`echo $mydat | sed 's/\///g;s/..$//'`
yr=`echo $mydat | sed 's/\///g;s/^....//'`
mmdd=`date +%m%d`
yr=`date +%y`

if [ "$mytime" != "" ]
newtime=`echo $mytime | sed 's/://g'`
newtime=`date +%H%M`
date "$mmdd$newtime$yr"

That script also works on SCO and most other Unixes.

There are some other changes I make. Synchronics provides an End Of Day backup which just copies data files to another location on disk. That's useful to have before posting, etc. I modify their script to use cpio instead of cp or copy:

        backup () {

       if [ ! -d EODBACK/$1 ]
          mkdir EODBACK/$1

       find $1 | cpio -pdmv EODBACK/$1


       cd $1
       if [ ! -d EODBACK ]
          mkdir EODBACK
       backup IMDATA
       backup ARDATA
       backup SADATA
       backup SYDATA
       backup PSDATA
       cd ..

Microlite Edge

I used the 01.01.08 version of Microlite Edge on all of these. Installing on Linux is easy and the new automatic configuration just steps you through everything very nicely. The only part I don't like is the question "Are you on a network?". That really should be "Can I get the host information for this machine from DNS?" or it should be smart enough to look in/etc/hosts itself. Other than that, and the fact that you need to know to stop and run the Manual Check to get the Locate Threshold, this is a slick, easy install.

Support Modem

It's always good to have a modem for dial-in, even if other methods are available. You can configure the modem with minicom (not installed with Workstation!) after making a link from /dev/ttyS0 (or 1) to /dev/modem. These happened to be Multitech modems, so I configured the DTE rate to 38400 by "AT$SB38400" and set "ATS0=1" for answer on one ring. I then added an "mgetty -D -s 38400" line to inittab like this:

7:2345:respawn:/sbin/mgetty -D -s 38400  /dev/ttyS0

The "-D" tells mgetty that this modem isn't going to be used for anything but data, and the -s sets the DTE rate. I could have set the DTE rate higher, but there's no advantage for a support modem and some serial ports sometimes have trouble with the higher speeds(mostly true on older equipment).

Note that mgetty isn't included in a Workstation install either.

Final Thoughts

The nice things about this are the reliability and flexibility combined with low cost hardware. Using Samba and Win4lin makes the Windows folks happy, and using Linux cuts down on support calls. I hope Synchronics continues to offer Linux versions.

Publish your articles, comments, book reviews or opinions here!

Copyright June 2001 A.P. Lawrence. All rights reserved

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Counterpoint on Red Hat Linux

Inexpensive and informative Apple related e-books:

Take Control of OS X Server

Take Control of Apple Mail, Third Edition

Take Control of iCloud, Fifth Edition

Photos for Mac: A Take Control Crash Course

Take Control of Pages

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

The less accurate your mental model of a given process is, the less accurate is any guess you make about its malfunction. (Tony Lawrence)

Linux posts

Troubleshooting posts

This post tagged:





Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode