Counterpoint on Red Hat Linux

Counterpoint (http://www.synchronics.com) 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?

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.

Printing

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:

-==-

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:

-==-

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).

Samba

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:

-==-

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:

-==-

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

-==-

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.

Win4Lin

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.

Anzio

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

-==-

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:

-==-

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:

-==-

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

-==-

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:

-==-

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:

-==-

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.

Originally appeared at http://www.aplawrence.com(http://www.aplawrence.com/Linux/cp.html)

Please Read This Disclaimer
Copyright and Reprint Info

A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top