How to run AnywhereUSB Manager on Linux host without GUI

Please note:

These instructions are provided "as-is", have been tested and proven working at the time of writing. For any support or issues, an Expert Agreement will be required.


How to run AnywhereUSB Manager on Linux host without GUI

  1. To install AnywhereUSB Manager on Linux please follow the Digi website and download the Linux package at this URL:
    TAR compressed archive contains .DEB and .RPM files
  2. This example will install on Ubuntu and use a DEB package file. Copy the .DEB file to your Linux server and install it with the dpkg utility:

    root@otp:/home/rna# dpkg -i ./40003060_B_amd64.deb
    Selecting previously unselected package awusbmanager.
    (Reading database ... 72301 files and directories currently installed.)
    Preparing to unpack ./40003060_B_amd64.deb ...
    Unpacking awusbmanager (0.6) ...
    Setting up awusbmanager (0.6) ...

    - Kernel version >= 4.13
    - vhci_hcd driver available for the running kernel.
    To verify run the command:
    modinfo vhci_hcd
    This command will display information about the module, rather than “Module vhci_hcd
    not found”
    root@otp:/home/rna# modinfo vhci_hcd
    filename:       /lib/modules/5.4.0-148-generic/kernel/drivers/usb/usbip/vhci-hcd.ko
    license:        GPL
    description:    USB/IP 'Virtual' Host Controller (VHCI) Driver
    author:         Takahiro Hirofuchi
    srcversion:     F715FD76638E24FF10BDBA2
    depends:        usbip-core
    retpoline:      Y
    intree:         Y
    name:           vhci_hcd
    vermagic:       5.4.0-148-generic SMP mod_unload modversions

    If the Manager is installed from the DEB or RPM package, the process will automatically create the "awusb" Linux group (if it doesn't already exist). In order to have full access to the AnywhereUSB® Plus devices, Manager users must belong to this group.

    To add a user to the awusb group: sudo usermod -a -G awusb where "" should be replaced with the name of the user who will run the Manager.

    root@otp:/home/rna# getent group awusb

    We see executable file in the directory:
    rna@otp:~$ locate awusbmanager


  3. The key problem is that awusbmanager is a program that requires an X11-based graphical environment. Attempts to launch awusbmanager will lead to errors in calling missing libraries since our server system has no full-fledged graphical shell.
    We will run a manager that requires a graphical environment in an environment without a full-fledged graphical environment using the xvfb-run utility from the xvfb package.
    Let's install the xvfb and libgtk2.0-0 packages.

    root@otp:/home/rna# apt-get install xvfb libgtk2.0-0

    After that, using xvfb-run, we will try to call awusbmanager in help mode.

    root@otp:/home/rna# /usr/bin/xvfb-run /usr/sbin/awusbmanager --help
    AnywhereUSB Manager, ver
    Usage: awusbmanager [-h] [-c <str>] [-t <str>] [-e] [-g] [-r <str>] [-l <str>] [-n] [command......]
      -h, --help            Display this help
      -c, --config=<str>    Configuration file to use
      -t, --control=<str>   Issue command (in quotes) to running client
      -e, --autofind-off    Start with auto-find off
      -g, --start-minimized Start the Manager minimized
      -r, --redirect=<str>  When used with option t, redirect output to file instead of console
      -l, --log=<str>       Log file (or "OSEventLog" for syslog, "MemoryLog" for Memory log)
      -n, --daemon          Run as a daemon

  4.  Due to the absence of the ability to assign the Client ID value via the command line interface, we should prepare a special directory that will store the configuration file for awusbmanager.
    If you run awusbmanager in graphical mode from the root user account and configure the connection to a USB hub in this mode, the following file structure will be created in the default configuration:

    root@otp:~# tree /etc/awusbmanager/
    - awusbcerts
         - AW24-000000.pem
    - awusb_client_cert.pem
    - awusb.ini

    Let`s create a directory for configuration file

    # mkdir /etc/awusbmanager

    Next, create a configuration file there

    # nano /etc/awusbmanager/awusb.ini

    The file content must have the following format:
    ClientId= <the name of the host`s Client ID>
    ManualHubs=<IP address/or DNA hostname of the Digi device>:18574
    AW24-000000.10=1   < ======== Serial Number of Digi device and USB Port Group number (value is 10 in the example)
    Syntax: SerialNumber.GroupNumber=[0,1] - Disabled/Enabled.

  5.  Add a new client in Web UI  on Digi AnywhereUSB Plus Hub:  System > AnywhereUSB Configuration.

  6.  Let`s run awusbmanager for the first time with the command

    # /usr/bin/xvfb-run /usr/sbin/awusbmanager --log=OSEventLog --autofind-off --config=/etc/awusbmanager/awusb.ini

    We use the --log option to specify that the awusbmanager process log should be written to the standard syslog. If this is not explicitly specified, the awusb.log log file will be created in the /root/.AnywhereUSB directory.

    We use the --autofind-off option to disable unnecessary network polling to detect hubs.
    We use the --config option to specify the location of the awusb.ini configuration file we configured earlier. If this is not explicitly specified, the awusbmanager process will look for the file in the /root/.AnywhereUSB directory.

    root@otp:~# /usr/bin/xvfb-run /usr/sbin/awusbmanager --log=OSEventLog --autofind-off --config=/etc/awusbmanager/awusb.ini
    Creating cert in /etc/awusbmanager/awusb_client_cert.pem
    Certificate /etc/awusbmanager/awusb_client_cert.pem generation complete.

    A self-signed client certificate awusb_client_cert.pem will be automatically generated in the configuration file directory, then an attempt will be made to contact the hub and bind using the client certificate. If the procedure for binding the client to the hub was successful, then in the web console of the hub on the client management page, we will see the status of the client certificate change to Available:

    You must see Hub`s certificate in the directory awusbcerts:

    root@otp:~# tree /etc/awusbmanager/
    -     awusbcerts
            -    AW24-000000.pem
    -     awusb_client_cert.pem
    -    awusb.ini

    1 directory, 3 files

  7. Configuring the systemd service for AnywhereUSB Manager
    To solve the problem of automating the launch of the awusbmanager process during server boot/reboot, let's create a simple systemd unit:

    # nano /etc/systemd/system/awusbmanager.service

    Add the configuration below to the unit.

    Description=Digi AnywhereUSB Manager Service

    ExecStart=/usr/bin/xvfb-run /usr/sbin/awusbmanager --log=OSEventLog --autofind-off --config=/etc/awusbmanager/awusb.ini


    Next, we turn on the automatic start of the service and start it (before starting the service, the process that we started earlier manually must be interrupted):

    # systemctl enable awusbmanager.service
    # systemctl start awusbmanager.service

    Let`s check the service and connection status:

    root@otp:~# systemctl status awusbmanager.service
    ● awusbmanager.service - Digi AnywhereUSB Manager Service
         Loaded: loaded (/etc/systemd/system/awusbmanager.service; enabled; vendor preset: enabled)
         Active: active (running) since Tue 2023-05-30 12:21:24 UTC; 1h 17min ago
       Main PID: 643 (xvfb-run)
          Tasks: 14 (limit: 4610)
         Memory: 94.1M
         CGroup: /system.slice/awusbmanager.service
                 ├─643 /bin/sh /usr/bin/xvfb-run /usr/sbin/awusbmanager --log=OSEventLog --autofind-off --config=/etc/awusbmanager/awusb.ini
                 ├─702 Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -auth /tmp/xvfb-run.q21vh9/Xauthority
                 └─752 /usr/sbin/awusbmanager --log=OSEventLog --autofind-off --config=/etc/awusbmanager/awusb.ini

    May 30 13:35:05 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:35:35 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:36:05 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:36:35 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:37:05 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:37:35 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:38:05 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:38:35 otp awusbmanager[752]: AnywhereUSB Manager: Could not connect to
    May 30 13:38:58 otp awusbmanager[752]: AnywhereUSB Manager: Using client cert /etc/awusbmanager/awusb_client_cert.pem
    May 30 13:38:59 otp awusbmanager[752]: AnywhereUSB Manager: connected as connection 156 (secure)

    Linux host is connected to the AnywhereUSB Plus Hub:


    To allow USB devices to work for multiple users on the server, you need to add these USB rules: 

    cat /etc/udev/rules.d/50-myusb.rules

Last updated: Sep 07, 2023

Filed Under


Recently Viewed

No recently viewed articles

Did you find this article helpful?