Skip to main content

Installing CODESYS TargetVisu for Linux SL without a Package Manager

Manual installation of the runtime system on the target device

  1. After the installation of the CODESYS Control​ for Linux package, the required files are located on the Windows PC:

    • <user>/CODESYS TargetVisu for Linux SL/Delivery/visualization<architecture>/codesysvisualization_visualizationamd64_4.13.0.0_amd64.deb

    Copy these files to the target device.

  2. Unpack the package:

    $ ar -x codesyscontrol_linux_<Version>

    The following files are created:

    • control.tar.gz: Contains the scripts which the package manager runs before and after installation or uninstallation. This is not relevant for manual installation.

    • data.tar.gz: Contains runtime system binaries, libraries, startup scripts, and configurations

    • debian-binary: Specifies the version of the .deb package. This is not relevant for manual installation.

  3. Unpack the data.tar.gz file. Create a new folder for this beforehand:

    $ mkdir data
    $ tar -xf data.tar.gz -C data

    In data/, you will now find the files which are important for the operation of the runtime system:

    data
    ├── etc
    │   └── codesysvisualization
    │       ├── CODESYSVisualization.cfg
    │       ├── CODESYSVisualizationTV.cfg
    │       └── CODESYSVisualization_User.cfg
    ├── opt
    │   └── codesysvisualization
    │       ├── bin
    │       │   └── codesysvisualization.bin
    │       └── codesysvisualization.service
    ├── usr
    │   └── share
    │       └── doc
    │           └── codesysvisualization
    │               └── copyright
    └── var    
        └── opt        
            └── codesysvisualization
    
  4. Now the package manager (dpkg) would normally copy this directory structure to the root directory of the system. This has to be done manually without a package manager:

    Change to the data/ directory where the data.tar.gz file was unpacked:

    $ cd data/
  5. Copy the individual directories to the respective root directories of the target:

    Important

    If you make a mistake, then this step can make your target device unusable and you will have to reset it.

    $ sudo cp -r etc/* /etc
    $ sudo cp -r opt/* /opt
    $ sudo cp -r usr/* /usr
    $ sudo cp -r var/* /var
  6. Now the package manager would perform some post-installation steps to complete the installation. Perform these steps manually:

    $ sudo chmod a+rw /etc/codesysvisualization/CODESYSVisualization.cfg
    $ sudo chmod a+rw /etc/codesysvisualization/CODESYSVisualization_User.cfg

    If the codesysvisualization group does not already exist on the target device, then add it.

    $ groupadd codesysvisualization
  7. Create additional folders and prepare the service.

    $ mkdir -p .config/systemd/user/
    $ cp /opt/codesysvisualization/codesysvisualization.service .config/systemd/user/
    $ mkdir -p .config/systemd/user/graphical.target.wants/
    $ ln -s .config/systemd/user/codesysvisualization.service .config/systemd/user/graphical.target.wants/.
  8. Set the permissions and users for the directories.

    $ sudo chmod -R u+x /etc/codesysvisualization/
    $ sudo chmod 740 /opt/codesysvisualization/bin/codesysvisualization.bin
    $ sudo chmod 640 ~/.config/systemd/user/codesysvisualization.service
    $ sudo chmod -R 640 /var/opt/codesysvisualization/
    $ sudo chmod -R u+X /var/opt/codesysvisualization/
    $ sudo chmod 640 /usr/share/doc/codesysvisualization/copyright
    $ sudo chown --recursive <USER> /var/opt/codesysvisualization
    $ sudo chown --recursive <USER> /opt/codesysvisualization/
    $ sudo chown --recursive <USER> /etc/codesysvisualization/
    $ sudo chown --recursive <USER> .config/systemd/