How to run Shadowrun: Dragonfall on Ubuntu Linux

I’m very happy that Harebrained Schemes chose to release its Shadowrun game series (Shadowrun Returns, Shadowrun: Dragonfall, and Shadowrun: Hong Kong) for Linux. It can be a little difficult to get this stuff running on Linux. In this post, I will explain the errors you may see when trying to run Shadowrun on Linux.

Installation Procedure

I purchased and downloaded Shadowrun:Dragonfall on sale from Humble Bundle.

1. Verify file integrity. The md5 checksum is provided on Humble’s download page-check the output from this command against what Humble provides. This is how you make sure that you aren’t installing a corrupted or infected application on your system:

md5sum shadowrun-dragonfall-linux.tar.gz_2.0.9.zip 

2. Unzip the downloaded file:

unzip shadowrun-dragonfall-linux.tar.gz_2.0.9.zip

Continue reading How to run Shadowrun: Dragonfall on Ubuntu Linux

Advertisements

New Relic APM on Fedora/CentOS/RedHat with SELinux Enforcing: Solved

I found the solution for getting the New Relic APM Agent to run on a CentOS 7 system with SELinux Enforcing. The only SELinux modification you have to make is to change the context of the log file directory /var/log/newrelic. You can temporarily make these changes with the chcon command:

chcon -R -t httpd_log_t /var/log/newrelic/

Kill any running instances of newrelic-daemon. If you’re using New Relic’s recommended default setup, make sure that the fileĀ /etc/newrelic/newrelic.cfg does not exist. Verify that all required values in /etc/php.d/newrelic.ini are correct (especially the license key and the application name). Finally, restart httpd:

systemctl restart httpd

Continue reading New Relic APM on Fedora/CentOS/RedHat with SELinux Enforcing: Solved

Running Unity games via Steam in Linux

There seems to be a lot of confusion about how to run games built on the Unity engine distributed by Steam on a Linux system. I recently solved this problem after backing the promising survival sandbox game Planet Nomads on Kickstarter. Here is how to configure an Ubuntu Linux system and launch Planet Nomads successfully.

Prerequisites

If you have an Nvidia card, you must download and install the official proprietary drivers provided by Nvidia. I could not get Unity to launch with the open-source drivers. Once I installed the proprietary (closed source) drivers, I was able to launch Planet Nomads from the Steam application.

Launching on Linux

When you need to troubleshoot something, there is no substitute for using the command line. At this point, forget about Steam altogether. Open a terminal and run the following command. Once you get it working, you can create a “launcher” or shortcut in your desktop environment so that you won’t have to remember the command. It also may run directly from Steam once you’ve solved the underlying problem.

Open a terminal and type the following command to launch Planet Nomads. For other games build on Unity and distributed using Steam, use a similar command, but change the command to reflect the actual path to the game binary:

~/.steam/steam/steamapps/common/Planet\ Nomads/PlanetNomads.x86_64

I’m assuming you are already familiar with running commands in a terminal. If this Unix/Bash syntax is confusing, please post a comment and I will explain.

When the game launches successfully, the output looks like this:

Found path: /home/your_username/.steam/steam/steamapps/common/Planet Nomads/PlanetNomads.x86_64
Mono path[0] = '/home/your_username/.steam/steam/steamapps/common/Planet Nomads/PlanetNomads_Data/Managed'
Mono path[1] = '/home/your_username/.steam/steam/steamapps/common/Planet Nomads/PlanetNomads_Data/Mono'
Mono config path = '/home/your_username/.steam/steam/steamapps/common/Planet Nomads/PlanetNomads_Data/Mono/etc'
displaymanager : xrandr version warning. 1.5
client has 4 screens
displaymanager screen (0)(DVI-D-0): 1920 x 1080
Using libudev for joystick management

Importing game controller configs

Troubleshooting

You can specify a log file to hold full output from the game launch:

~/.steam/steam/steamapps/common/Planet\ Nomads/PlanetNomads.x86_64 -logfile ~/planetnomads_log.txt

Note that even a successful launch of the game will create some misleading errors in the log, such as:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Database.SQLite.Finalize () [0x00000] in :0 
[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Note that these “error” messages do not impact your ability to play the game!

Configure CentOS/RedHat VMs with Kickstart files on Virtualbox

Kickstart is a type of file that’s used to automatically install RedHat or CentOS Linux on a physical or virtual server. If you are managing more than a few servers, it’s a good idea to configure the servers via kickstart files instead of logging in and configuring each one manually. However, some unfortunate choices were made when defining the Kickstart file format, and it’s not the easiest thing to use. When creating a new Kickstart or making major changes, it’s good to have way to quickly iterate and test your changes. Iterating on a Kickstart file is slow and inconvenient in an enterprise environment in which a freshly booted server obtains an image and Kickstarter file via PXEboot. To speed up Kickstart testing and debugging, I’ve developed a simple way to use Kickstart files with CentOS/RedHat guest virtual machines that run in VirtualBox on my Mac. This process should also work with Windows or Linux hosts.

Continue reading Configure CentOS/RedHat VMs with Kickstart files on Virtualbox

General error: 2006 MySQL server has gone away

“MySQL Server has gone away” is a cryptic error that can be hard to troubleshoot (look at all the various responses on Stack Overflow!) Many problems can cause this error; I would like to document one specific case. In this example, the client is a PHP app using the Phalcon framework:

[Mon, 09 Apr 18 03:34:08 -0400][ERROR]  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /path/to/ModelBase.php:
Stack trace:
#0 [internal function]: PDOStatement->execute()
...
#17 {main}

Continue reading General error: 2006 MySQL server has gone away

Warning: CentOS/RedHat 7.4 installs FreeRADIUS 3 with breaking changes

When you run yum upgrade on a CentOS/RedHat 7 instance, you will be upgraded to 7.4. If you have a FreeRADIUS server, you will be upgraded from version 2 to 3, and your server will likely stop authenticating! Good times! Fortunately, the solution was not complicated for us, because we had good documentation.

Symptoms

Your radius server suddenly starts denying logins.

Continue reading Warning: CentOS/RedHat 7.4 installs FreeRADIUS 3 with breaking changes

Managing persistent disks on Google Compute Engine

It can confusing when you have multiple persistent disks on an instance running on Google Compute Engine. For example, a server may have separate disks for the filesystem root, MySQL data, logs, and /tmp. Once you’ve created the Compute Engine disks and attached each one to the instance, how do you know which Compute Engine disk maps to each volume on the instance?

Continue reading Managing persistent disks on Google Compute Engine

MySQL/MariaDB, logrotate, and SELinux

Assumption: You have SELinux Enforcing on your database server. If you’re still solving problems by permanently setting SELinux to Permissive, I don’t think you can really call yourself an IT professional.

Here are the commands to set the SELinux context of all text MySQL log files to var_log_t so that they can be rotated by logrotate:

semanage fcontext -a -t var_log_t "/var/lib/mysql(/.*.log(-[0-9]+(.gz)*)*)+"
restorecon -R -v -F /var/lib/mysql

NOTE: This expression will also match the file /var/lib/mysql/tc.log and change its context, which will prevent MySQL from starting. If your version of MySQL uses tc.log, here is one possibility:

semanage fcontext -a -t var_log_t "/var/lib/mysql(/db-server-01.log(-[0-9]+(.gz)*)*)+"

This expression is server-specific, because MySQL uses the hostname to name the log file.

Continue reading MySQL/MariaDB, logrotate, and SELinux

Synology DiskStation DS1515+ Review

Summary: The Synology DS 1515+ is a capable little NAS with a large feature set, but it has some software reliability issues and limited technical support.

Hardware

The DS1515+ is a compact unit that feels sturdy. It holds five 2.5″ or 3.5″ drives, and 3.5″ drives can be installed without any tools. You will need a Phillips-head screwdriver to install an additional RAM module, but that’s also a very simple process. The fans are also easily replaceable.

Configuration

You will need to connect the DiskStation to the Internet to install the operating system, which is called DiskStation Manager (DSM). The installation process went smoothly. From a security standpoint, this process is slightly scary, and I hope that the automated installation process used some method to verify the integrity of the operating system.

Once the operating system is installed, there is a nice graphical user interface to manage all aspects of the system. It is possible to enable SSH to allow access to the unit by command line, but the CLI is officially undocumented, and Synology support won’t answer questions about it. The documentation on the Synology support site is pretty thorough, so I won’t go through the process to create a RAID or volumes.

Continue reading Synology DiskStation DS1515+ Review

anacron run-parts generates invalid or malformed syslog messages

On RedHat and CentOS 6 and 7, anacron generates syslog messages that are mangled when they are forwarded by rsyslog. I found the cause and a solution in a comment by Tomas Heinrich on this old Fedora bug. Sadly, that bug was closed instead of getting fixed, probably because Fedora is oriented toward desktop users who are not generally forwarding syslog messages! Syslog uses the following default template for messages:

"%TIMESTAMP% %HOSTNAME% %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%"

The syslogtag field is truncated to 32 characters, but cronie-anacron includes a lot of data in its tag. The tag gets truncated to 32 characters, resulting in invalid syslog. If you try to send them to Logstash, you’ll get errors like this:

{"message":"Nov 4 19:01:01 my-web-03 run-parts(/etc/cron.hourly)[1858 starting 0anacron","@version":"1","@timestamp":"2016-11-05T00:01:01.146Z","port":55456,"type":"syslog","tags":["_grokparsefailure"],"host_ip":"192.168.17.23"}

Continue reading anacron run-parts generates invalid or malformed syslog messages