Xepr license work around


< admonition type=danger title=“Disclaimer” Disclaimer: the author does not condone piracy but this may be used as a temporary measure < /admonition >

​As readers of my work-sided blog posts will be aware, I’ve had some recent problems with spectrometers and their control PCs. As a result I’ve been swapping computers and network cards right, left and centre to try and get things working. As a temporary measure and so as to avoid contacting Bruker every 20 minutes for a new Xepr license file for the latest network card I’m trying I’ve written a little script to get around the Xepr license check.

Basically when Xepr is started, there is a small pop-up window which quickly appears but displays the Xepr version number. At this time Xepr is checking for a valid license file, if the license file is not valid/nonexistent then the program quits.

The validity is a simple check of the MAC address of the eth0 port (which you can view as a super user with ifconfig).

Now I am not condoning piracy in any way, and Bruker are usually very good at giving out new license files if you justify yourself. To reiterate this is a short-term measure to stop annoying Bruker.

Create a new file in your favourite text editor, and copy and paste the following:

#   Xepr2 -- Morgan's xepr startup script
# This script changes the network port eth0 to the MAC address
# required for Xepr to start. Waits 2 seconds and then changes
# the MAC address back.
# This script currently requires a license file to be installed
# and for it to be in date. The script could be editted for
# finding the license file expiry date and changing the system
# clock accordingly but this risks other programs and requires
# a lot more coding. Just ask Bruker for a valid one.
# This script should be run as a normal user but can be called
# as a super user. If it is called as a normal user then the
# script will ask for an administrator password as it needs
# super user privileges to access ifconfig and change the
# hardware address
# M. Bye v12.8
# Author:       Morgan Bye
# Work address: Henry Wellcome Unit for Biological EPR
#               University of East Anglia
#               NORWICH, UK
# Email:
# Website:
# Aug 2012;     Last revision: 17-August-2012


# MAC address for the license file, ie what your computer is not


# Path to license file (for checks on expiration date)



# Get user

# Get license expiry date
# EXP=$(cat /usr/Bruker/flexlm/licenses/license.dat ....)

# Get current MAC address and save it as a variable
OLD=$(sudo -i ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')

# Change machine MAC address
# ==========================

sudo -i ifconfig eth0 down
sudo -i ifconfig eth0 hw ether $MAC
sudo -i ifconfig eth0 up

NEW=$(sudo -i ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')

# Call Xepr - taken from standard Xepr file
# =========================================

Xepr &

# Wait to allow Xepr's license check
sleep 2

# Change machine MAC address back
# ===============================

sudo -i ifconfig eth0 down
sudo -i ifconfig eth0 hw ether $OLD
sudo -i ifconfig eth0 up

This assumes that Xepr has been aliased into the shell correctly. Change the MAC address in the variable section to your license file MAC address (it should be at the end of the XEPR line). Save the file, I personally called it Xepr2.

Close the file, it can now be called with


It will ask for the administrator password. Xepr should start with no problems and the terminal will be returned to the user and can be closed if wanted.

As normal you can alias this if you like, so that you can call Xepr2 from anywhere (including desktop launchers)

​# Troubleshooting If Xepr gives you error messages then check the MAC address entered in the variable section matches that in the license file. If you’re on an older PC then try adjusting the sleep time. By default I’ve used 2 seconds (as my network pings the PC every 5 seconds and I dont want the dynDNS server changing getting confused and trying to report the port), but on older PCs 2 seconds may not be enough for Xepr to start, so try changing it to 10.