Linux Configuration

Prerequisites:
Root permissions are required under Linux.

This chapter describes how to set up the POS Client under Linux.

Information on the following topics will be provided:

  • Configuring the POS Client under Linux
  • Auto-start of the GK/Retail POS application

Configure the POS Client under Linux

Create User

The following users are created during installation:

User Password Comments
root beetle Administrative rights, must be changed before delivery
wnlpos wnlpos Only available on Image Generator systems
JavaPOS javapos99
wincor nixdorf
test user Only available if JavaPOS is installed

The predefined PIN for the postconfig http://wnlpos.com/wiki/index.php5?title=wnlpos/tools/postconfig \o wnlpos/tools/postconfig tool is 1793.

A user with limited rights is created for the user of the POS application. This user is not allowed to change system files or the configuration of the Linux operating system.

The user is created via the graphical user interface. To do so, call system-config-users. The command requires administrative rights and a running X server.

The user must belong to the following groups:

  • wndev (for access to devices /dev/wn*)
  • uucp (for access to devices /dev/ttyS*)

This group assignment is necessary in order to use JavaPOS and the GK/Retail application as a non-privileged user.

Access to JavaPOS as a Non-Privileged user

Only users with administrative rights (root) are allowed to use JavaPOS drivers, by default. Perform the following steps, to allow access to JavaPOS drivers for non-privileged users:

  1. As a first step, ensure that all files and directories under /usr/local/javapos and /usr/local/javacim can be read by the POS Client user (or by their group). The user should also be allowed to change these directories. This requires the following commands:
    • find /usr/local/javapos/ |xargs chmod a+r,a-w,g+r,g-w
    • find /usr/local/javacim/ |xargs chmod a+r,a-w,g+r,g-w
    • find /usr/local/javapos/ -type d |xargs chmod 755
    • find /usr/local/javacim/ -type d |xargs chmod 755
  2. Ensure that the directories /usr/local/javapos, /usr/local/javacim and /usr/local/javapos/wn/diagnostics are writable for the user (command without line break!):
    • chmod 777 /usr/local/javapos /usr/local/javacim /usr/local/javapos/wn/diagnostics

The directory /usr/local/javapos/wn/diagnostics is used for diagnostic functions. These functions are required if malfunctions of the JavaPOS system should be examined.

The directory /usr/local/javapos must be writable in order to allow the JCL Loader ( jcl.jar ) to evaluate the corresponding XML files. In order to save XML templates, while reading and parsing XML files, a subdirectory jpos is temporarily created. This directory and its content are deleted after reading the XML files.

Access to GK/Retail POS as a Non-Privileged user

Perform the following steps to allow the access to the GK/Retail application for non-privileged users:

  1. Set the permission for logging:
    • chown -R <user> /var/log/gkretail
  2. Set right permissions to the directory gkretailand to the database directory:
    • chmod -R a+rw /usr/local/gkretail
  3. In /var/lock/, set write access to serial devices:
    • chmod -R a+rw /var/lock/
  4. Ensure that all directories under gkretail are readable and writable
    • find /usr/local/gkretail -type d | xargs chmod a+rwx
  5. Define the rights and the owner for the console:
    • chmod a+rw /dev/console
    • chown <user> /dev/console
  6. Define rights and owner for beep_filter.pl:
    • chmod a+rwx /usr/local/gkretail/pos/native/beep_filter.pl
    • chown <User> /usr/local/gkretail/pos/native/beep_filter.pl

Systems with POS Groups

e.g. Take Away Scale, Service Scale, Flow Service...

Note:
To avoid error messages about network recv/send buffer sizes, make sure that the buffer size set by the following Linux kernel parameters is set to a higher value:
  • net.core.rmem_max
  • net.core.wmem_max

For information about the required values of recv/send buffer sizes, see the jgroups config file referenced in posGroups.properties by the parameter PosGroupsConfig.jgroupsConfigFilePath for UDP or TCP protocol.

Auto-start of the GK/Retail POS application

To configure auto-start for the GK/Retail POS application, proceed as follows:

  1. Create a start script in the home directory of the POS Client user:
    #/bin/bash
    cd /usr/local/gkretail/pos-client
    ./run_tpos.sh
  2. Save this script as file posstart.sh in the home directory of the POS Client user and make it executable:
    chmod a+x ~/posstart.sh
  3. Then create a script for the call via xinit and startx .
    #/bin/bash
    ~/posstart.sh &
    mwm
  4. Save this script both as ~/.xinitrc (for xinit) and as ~./.Xclients (for startx) and make it executable.
    chmod a+x ~/posstart.sh
    chmod a+x ~/posstart.sh
  5. When the user logs in to Terminal #1, the X server shall be started automatically. When the X server is stopped, the user shall be logged out automatically. This is required for automatic restart.
    Add the following commands at the end of the file ~/.bash_profile of the POS Client user:
    if [ `tty` = "/dev/tty1" ]; then
    startx
    logout
    fi
  6. Adjust the initialization file /etc/inittab.

Make the following changes with root permissions:

  1. Set the default run level to "3":
    • old: id:3:initdefault:
    • new:id:3:initdefault:
  2. Set auto-start configuration as follows:
    • old: 1:2345:respawn:/sbin/mingetty tty1
    • new 1:2345:respawn:/sbin/mingetty --autologin <User> tty1