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

Internet Service Comparison: Spectrum Cable Modem vs AT&T Fiber

I’m moving to a new address in Central Florida which has multiple Internet Service Providers (ISPs) available. Spectrum (formerly BrightHouse) provides speeds up to 100Mbps via cable modem. AT&T just installed fiber in the neighborhood, so I was excited to find out what they would offer.

Spectrum Cable Internet

Here’s a cost breakdown by service:

  • Lightning Internet (200Mbps download data rate, 30Mbps upload): $90/month
  • Static IP address: $10/month
  • Modem rental: $4/month  (you must rent a modem to get a static IP)
  • Taxes: $0.26
  • Total monthly bill: $104.26

It was very easy to move my service to a new physical address, and my static IP address will move with me. I’m fortunate to be “grandfathered in” on a BrightHouse plan that permits me to have a static IP address on a residential plan. Going forward, you’ll be required to choose a business plan if you want a static IP address (probably for substantially more money). Continue reading Internet Service Comparison: Spectrum Cable Modem vs AT&T Fiber

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!

Audit terminology: SAS 70, SSAE 16, SSAE 18, SOC1, SOC2, Type 1, Type 2

If you are involved in information technology and compliance in a heavily regulated industry,  or work with larger organizations, you have probably run across the terms SAS 70, SSAE 16, SSAE 18, SOC 1 report, SOC 2 report, Type 1 Report, and Type 2 Report. These terms are frequently abused and misunderstood, even by compliance “experts,” so I’ve written this brief one-page summary. Everything I state below has a direct reference on the AICPA site; I have learned not to trust third-party sources in regards to compliance. Continue reading Audit terminology: SAS 70, SSAE 16, SSAE 18, SOC1, SOC2, Type 1, Type 2

Configuring Laravel/Lumen applications to connect to SQL database sockets

The Laravel/Lumen framework documentation does not explain how to connect an application to a database using UNIX sockets instead of a TCP-based network connection. I recently had to configure the Polr URL shortener (built on the Lumen microframework by Laravel) to connect to Google Cloud SQL with a UNIX socket. Since all of Polr’s configuration takes place in the .env file, and there is no environment variable that’s specific to database sockets, this took some research. I finally found the answer in an obscure StackOverflow response.

Previous TCP connection:

DB_HOST=some-server-name
DB_PORT=3306

Socket-based SQL connection:

DB_HOST=localhost;unix_socket=/cloudsql/cloud-project-name:us-east1:sql-instance-name

This approach will work with any UNIX socket; you just need to give it the absolute path to the socket.

 

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

Service account credentials with the Python client for the Google Drive API (v3)

There are numerous ways to authenticate against the Google Drive API. If you have an application running on Google Compute Engine that needs to access Drive, a Service Account is probably the easiest way to do it. One use case is for an application to write reports or log files to Drive so that users can see them without logging into a server.

Before you try this example, go through all of the steps in Google’s Using OAuth 2.0 for Server to Server Applications guide and save your service account’s private key locally in JSON format.

Getting credentials from a service account file is easy:

SCOPES = [
        'https://www.google<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>apis.com/auth/drive'
    ]
    SERVICE_ACCOUNT_FILE = './name-of-service-account-key.json'

    credentials = service_account.Credentials.from_service_account_file(
            SERVICE_ACCOUNT_FILE, scopes=SCOPES)

Continue reading Service account credentials with the Python client for the Google Drive API (v3)

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

Viewing logs for a cluster of instances on Google Stackdriver Logging

StackDriver Logging is a great feature of Google Compute Engine (GCE). You pretty much need a centralized logging solution if you are taking maximum advantage of the features offered by GCE. For example, most production applications will run on a cluster of web servers. If you set up the cluster as a managed instance group on GCE, Google can auto-scale the size of the cluster based on traffic. The challenge is that it’s much  harder to troubleshoot errors across a cluster. The requests that caused the error could be spread across any number of servers, with randomly assigned names. If load drops and the server pool contracts, you will entirely lose any log data on a server that’s auto-deleted. StackDriver Logging is the answer to this problem. Configure all servers to send all logs to StackDriver, and you can view all of your web server logs in one interface, with the entries in chronological order.

View StackDriver Advanced Filter as a Gist on GitHub

Continue reading Viewing logs for a cluster of instances on Google Stackdriver Logging