Set up GLSL in Wine for Artemis

Following up on How I run Artemis Spaceship Bridge Simulator on Devuan ceres, I wrote a script that will set the GLSL variable in wine.

Basically, if Artemis Spaceship Bridge Simulator fails in Wine, the first thing to try is to disable GLSL (which I just learned is superseded, so I have to go test with that new key at some point).

I used the Wine regedit utility to export my registry key to a file, artemis-disable-glsl.reg.

��Windows Registry Editor Version 5.00


Obviously you can just copy this and modify it for the “enabled” value.

And the main script.

# File: /mnt/public/Support/Games/Artemis/
# License: CC-BY-SA 4.0
# Author: bgstack15
# Startdate: 2020-11-10
# Title: Script that sets up GLSL in Wine for Artemis on Weaker Systems
# Purpose: Make it easy to toggle the registry setting
# History:
# Usage:
#    GUESS=1  If set to any non-blank value, try to guess WINEPREFIX if WINEPREFIX is blank
#    ACTION=enable|disable  Enable or disable glsl. Normally underperforming systems need to disable glsl.
#    DEBUG
# Reference:
# Improve:
#    2020-11-11
#       says to use a different key now.
# Dependencies:
#    wine
# Documentation:

is_64bit() {
   # call: is_64bit "${WINEPREFIX}" && echo "this is 64-bit"
   find "${_wineprefix}/drive_c/Program Files (x86)" -maxdepth 0 -printf '' 2> /dev/null ;
   #return $(( 1 - $? )) ;
   return $?

get_parent_wine_dir() {
   # call: get_parent_wine_dir /home/bgstack15/.wine-artemis/drive_c/Program\ Files/Artemis
   # returns: /home/bgstack15/.wine-artemis
   while ! basename "${_thisdir}" | grep -qE "wine" ;
      _thisdir="$( dirname "${_thisdir}" )"
   echo "${_thisdir}"

# validate input
test -z "${WINEPREFIX}" && test -z "${GUESS}" && {
   echo "Use GUESS=1 to force the guessing of which WINEPREFIX to use." 1>&2 ; exit 1 ;

test -z "${WINEPREFIX}" && test -n "${GUESS}" && {
   # will have to guess
   ARTEMISDIR="$( find ~/.wine-artemis ~/.wine32 ~/.wine /usr/share/wine /opt/wine -type d -path '*/.wine*' -path '*/Program\ Files*' -name 'Artemis' -print 2>/dev/null | head -n1 )"
   WINEPREFIX="$( get_parent_wine_dir "${ARTEMISDIR}" )"
   test -z "${WINEPREFIX}" && {
      echo "Fatal! Unable to find a wineprefix where Artemis is installed. Aborted." 1>&2
      exit 1
   echo "Found ${WINEPREFIX} with Artemis installed." 1>&2
   export WINEPREFIX

test -z "${WINEARCH}" && {
   is_64bit "${WINEPREFIX}" && WINEARCH=win64
   export WINEARCH

test -z "${ACTION}" && {
   echo "Using default action of \"disable\" glsl." 1>&2
   export ACTION=disable

# default
case "${ACTION}" in
   disable|off|DISABLE|OFF|NO|0) :;;
   enable|on|ENABLE|ON|YES|1) tf="/mnt/public/Support/Games/Artemis/artemis-enable-glsl.reg" ;;
   *) echo "Unknown action \"${ACTION}\" so defaulting to disable." 1>&2 ;;

test -n "${DEBUG}" && {
   echo "WINEPREFIX=${WINEPREFIX} WINEARCH=${WINEARCH} wine regedit ${tf}"
test -z "${DRYRUN}" && wine regedit "${tf}"

Use environment variables to control the operation! So to disable glsl, run:
ACTION=enable ./
As usual with my scripts, you can also use DEBUG and DRYRUN.

Devuan wine error: chdir to /run/user/1000/wine/server-fe01-b6066c : No such file or directory


test -e /run/user/$( id -u )/wine && unlink /run/user/$( id -u )/wine ; ln -sf /tmp/.wine-$( id -u ) /run/user/$( id -u )/wine


I was building a new system with Devuan and fluxbox and wine, and I came across an interesting error. When I try to run anything with wine, I get this error:

wine: chdir to /run/user/1000/wine/server-fe01-b6066c : No such file or directory

I made sure that directory existed, and file existed, but no luck. So I had to search on the Internet. I ended up reverting to Google to find the answer, and I found a recent debian discussion. Some debian patch needs to be adjusted, and this is a very recent development. So it should be a temporary thing.
In the mean time, you can just symlink the second location to the first one. /run is typically a volatile filesystem (tmpfs) so if you end up completely borking your /run/user/$( id -u )/wine directory, you should not worry. A reboot will reset it.


google: “wine: chdir to /run/user : No such file or directory”


Solution from Benjamin Poirier at #946951 – can’t start wine: chdir to /run/user/1000/wine/server-805-14c0be6 : No such file or directory – Debian Bug report logs

Voobly notes

Voobly on Wine in Linux

For some reason, one of my voobly installations in Wine on Linux (devuan specifically) runs like a dog. While the system is indeed really old, Voobly was running smoother on it before the OS reinstall.

After an strace, I learned it kept looking for a tzres.dll in C:\Program Files\Voobly\, and there wasn’t one. So I copied it in from the system32 directory and re-ran Voobly. It seems to operate a little better now, although it’s still not exactly a smooth experience.

cp -p ~/.wine/drive_c/windows/system32/tzres.dll ~/.wine/drive_c/Program\ Files/Voobly/

Fix Jazz Jackrabbit 2 on Wine

0009:err:seh:setup_exception_record stack overflow 992 bytes in thread 0009 eip 7e572f2a esp 00240f50 stack 0x240000-0x241000-0x340000
0044:err:ntdll:RtlpWaitForCriticalSection section 0x7e5cb7a0 "freetype.c: freetype_cs" wait timed out in thread 0044, blocked by 0009, retrying (60 sec)
^C0045:fixme:console:CONSOLE_DefaultHandler Terminating process 8 on event 0

This issue was particularly difficult to nail down. At one point, I saw a stack trace (but failed to save the output) where some amd driver was the next-to-last in the stack, so I think this issue is related to my AMD Radeon card (nothing to write home about).

The error tends to happen when loading a new level of the game. However, it is possible to trigger it within a level.

Running the game with the “-Safe” flag to run in safe mode prevents the crashes entirely.

I thought at first the freetype.c thing meant it was font-related, and that possibly I was missing an i686 package for a font. However, I had every i686 package for every x86_64 one, so it wasn’t loading the wrong type. I also ensured I started wine with WINEARCH=win32.

I eventually fixed the issue by changing the game settings for the audio! To prevent game crashes, you need to configure “Sound & Music Properties” and uncheck “Use DirectSound (faster).” If you leave that option checked, it will crash the game usually when loading levels.

Using Google Talk Plugin in Palemoon Portable in Wine on Linux


My main browser is Palemoon Portable which I run in Wine on GNU/Linux. I also use Gmail, Google Talk (the pre-Hangouts tool), and Google Voice.

In order to make and receive phone calls from my main web gmail page, I used this process.

  1. Install Adobe Flash Player for Firefox on Windows. I used the offline installer from the download link at Weblink 2.
    1. Used my Linux native Firefox to navigate to the normal Adobe flash player download page.
    2. Selected “Need Flash Player for different computer?”
    3. Selected Windows 7/Vista/XP and FP 25 for Firefox – NPAPI.
    4. From a terminal, I ran the following command and installed Flash like ~/Downloads/install_flash_player.exe
  2. Install Google Talk plugin.
    1. Unfortunately the gmail link for “Download voice chat plugin” failed to complete. When I ran wine ~/Downloads/GoogleVoiceAndVideoSetup.exe from a terminal, I observed that the process failed because of some network issue related to wine:fixme:secur32:schannel_get_cipher_algid unknown algorithm 23
      fixme:secur32:schannel_get_mac_algid unknown algorithm 200

      I bet it has something to do with the way my GNU/Linux computers always have some long MAC address in my dhcp list instead of a normal 12-character value. I don’t know how to fix that, nor was I able to trick the installer to continue.
    2. So I had to install the Google Talk plugin manually.
      1. I used a Windows computer that already had a working environment of Google Talk for Palemoon Portable. I copied these files:C:\Users\bgstack15\AppData\Roaming\Mozilla\plugins\npgoogletalk.dll
        To location
        Where /usr/share/PMP257 is my D:\PortableApps location.
      2. I also copied this entire directory:C:\Users\bgstack15\AppData\Local\Google\Google Talk Plugin\
        As the directory
        /usr/share/PMP257/Lib/Mozilla/Plugins/Google Talk Plugin/
      3. I set up the wine registry with a key and values from a registry file as seen
        touch "${tf}"; chmod 0644 "${tf}"
        cat << EOF > "${tf}"
        [HKEY_CURRENT_USER\Software\Google\Google Talk Plugin]
        "install_dir"="z:\\usr\\share\\PMP257\\Lib\\Mozilla\\Plugins\\Google Talk Plugin\\"
        regedit "${tf}"

        If the registry file does not import properly, try sticking a blank line after REGEDIT4. WordPress and the html <code> tag do not play nicely together with blank lines in code.


This entire process was made possible by the fantastic users of the community: portablealpha, taosk8r, acamp, and robertcollier4. It was that one page (weblink 1), and my working but disused Windows installation that made this whole process possible.


I realize I make life hard for myself, for using a web interface in a portable version of a small fork of a web browser in an emulator.

The story behind why I use this portable browser, in wine, on Linux, is this. When I first started getting on the Internet, I was a teenager and did not own my own computer. I had a flash drive, and I used it to store my personal files. I discovered PortableApps which let me use probably Firefox 2 or 3 from my flash drive. Even as I grew and got my own computers, I still kept my main web browser as a portable one so it would be relatively free from OS hooks so it was easy to transplant from system to system, as I migrated my main workstation. I built up a new installation every couple of years, hopping from Firefox 17 at one point to 27 to 33 to 38. After that, I switched to Palemoon 25 Portable and that is what I’m still on as of this post.

Now, 2016 was the Year of Linux on the Desktop for me, as I wanted to avoid the Windows 10 debacle. I had installed Korora 22 Cinnamon on a spare laptop in November of 2015 and from there made it my main system. In February of 2016 I copied over my Palemoon Portable install and it ran in Wine just fine! The only problem it had was it didn’t work with Google Voice.

This week I was trying to solve a VLC dlna problem where it was not finding my Plex server. I got frustrated with that (a bug that’s still unresolved and transitioned into looking into the Google talk problem on Palemoon Portable.



  1. Entire portableapps thread explaining how to get a PortableApp to use Google Talk.

Portablealpha on September 15, 2010 – 9:18pm

Adding Google Voice plugin

Just wanted to let people know how I got the Google Voice plugin to work so that I could use the “Call Phone” feature from within gmail. This is *not* elegant but it’s the only way I could figure it out because the target computer is behind some nasty firewalls (and the Google Voice installer isn’t allowed to call home to download its files).

1. Install the Google Voice plugin on your home computer.
2. Locate the Google Voice and Video Accelerator plugins in FF using about:plugins.
3. Copy those to your Firefox Portable plugins directory on the flash drive.
4. Locate the “Google Talk Plugin” folder on your hard drive and copy it to the flash drive (doesn’t matter where).

When you want to use Google Voice through Firefox Portable, run the exe in the Google Talk Plugin first, then start FFP and go to gmail. Note that once you exit gmail, it will stop the exe, so you’ll have to run it again manually if needed.

Anyone have any suggestions to automate this?

Taosk8r on June 11, 2011 – 1:42am

Oh good

I found this thread again.. I cant seem to find where ff 4.0 puts these.. the info I get is:



Is this even still relevant?

Acamp on October 21, 2011 – 3:13am


Works like a charm!

You have to search your computer for those two files (real pain in the ass on newer windows machines because they try not to display any scary system files). Once windows can’t find it, click advanced, check include non-indexed, hidden and system files.

You also need to search for the folder “Google Talk Plugin” and copy that to the flash drive. It contains the executable that needs to be launched before Firefox is opened

Robertcollier4 on September 28, 2012 – 7:33am

Works without needing to load the EXE manually

Create the following directory structure if not already existing:

Place the following files/folders in Plugins directory:
“Google Talk Plugin” (complete folder)
“Google Talk Plugin Extras” (complete folder)

The files are located at:
DocsandSettings\Username\Local Settings\Application Data\Google\Google Talk Plugin\
DocsandSettings\Username\Application Data\Mozilla\plugins\

Then it will work and the EXE will automatically load from Gmail.

Robertcollier4 on September 30, 2012 – 2:02pm

Specify path in registry to load EXE automatically

Hi – there is one update. If you want the EXE to run automatically, you must add the following registry key with the proper path to googletalkplugin.exe so that it knows where to find it and load it automatically. It will work without adding the registry path – but if the registry path is not there as shown below then you must run the googletalkplugin.exe manually before loading the browser.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Google\Google Talk Plugin]
“install_dir”=”D:\\FirefoxPortable\\Data\\Plugins\\Google Talk Plugin\\”

  2. Normal adobe flash player download page

Irfanview on Linux


Irfanview is a fantastic image viewer and batch utility for the Windows platform. But did you know that you can run Irfanview on GNU/Linux, and this post will show you how to do that. There is a caveat, though: Irfanview is not open source. It’s freeware. That might turn off some people, but I still choose to use it. It’s unparalleled in the GNU world.
There are several ways to get Irfanview on a GNU/Linux system, and they all use Wine.

Installing Irfanview with Winetricks

Winetricks is a fancy helper script that makes repetitive tasks in wine easier. It has an option built-in for installing Irfanview. It’s a piece of cake.
Make sure you have wine with your package manager.
dnf install wine
Then download winetricks from the link above and run the install irfanview command.
./winetricks -q irfanview
The -q is for unattended install. If you want to adjust the settings, run it without the -q.
Observe that winetricks mentions installing mfc42.dll for you. That is needed for the installer only.

Installing Irfanview with a custom-rolled package

You can choose to install Irfanview by assembling a package from the rpm spec and debian control scripts I’ve assembled at
git pull
What is in the git repository is the source for just the packaging. The actual software source code is downloaded from official web sources upon building the rpm, and upon the installation of the dpkg file. As I said above, the software itself is freeware, so the source is not available for distribution.
A wrapper for rpmbuild and dpkg-deb is provided, as usr/share/irfan/build/pack.
Run ./pack rpm or ./pack deb and the system will build you the type of package you specified, provided you have the rpm-build or dpkg-dev package.
For the rpm, you might need to generate some directories:
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS ~/rpmbuild/RPMS ~/rpmbuild/BUILD ~/rpmbuild/BUILDROOT
In fact, you should run all this, which will download from gitlab for you the package source.
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS ~/rpmbuild/RPMS ~/rpmbuild/BUILD ~/rpmbuild/BUILDROOT
cd ~/rpmbuild/SOURCES
mkdir irfan-4.44-1; cd irfan-4.44-1
git init
git pull
cd irfan-4.44-1
usr/share/irfan/inc/pack rpm

The generated rpm will appear in ~/rpmbuild/RPMS/noarch.
Then you can run dnf install ./irfan-4.44-1.noarch.rpm.

The benefits of rolling your own package

The package provided on gitlab includes a menu shortcut to Irfanview, as well as mimetype defaults for jpg and png. You will be able to see Irfanview in the list of applications when you select a file in the file manager, right click, and select “Open with…” The winetricks option does not include that.


  1. Main irfanview site
  3. Main wine site
  4. Latest winetricks script
  5. Irfan rpm and deb package source