Let's Play ADRIFT on Linux! (Mint 16 Petra Xfce)

A couple years ago, I tried the Linux port of the ADRIFT runner on my first Linux system, Kubuntu 12.10. Since then, I’ve had several distros on this old PC. I’ll never be an expert UNIX hacker, but I’m perfectly comfortable with Linux for most things. I’m currently using Linux Mint 16 Petra, with the Xfce desktop.

(You’ll have to click the thumbnail screenshots to view on Flickr – sorry.)

When I first downloaded the tar.gz package, my first reaction was to extract it to my home folder:

I found the …/usr/local/bin directory and tried to execute the shell script. It didn’t work. After verifying that it was indeed marked executable, I went back and found the readme in …/usr/local/adrift5.

There, I discovered that I was supposed to extract to the root directory:

This is very foreign to my prior experience using third-party Linux software. I’m used to compiling from source by extracting to a temporary location and following a list of terminal commands in the build instructions. I’m used to extracting to my home folder and running a script from there. I’m used to adding unofficial PPA repositories and then installing with the apt-get command. I’m not used to extracting to root.

I knew the real way to extract to root would be to use the terminal – the built-in tar command. I don’t know how to use that command, and as much as I’m to learn, I don’t have time today to Google it and figure out the appropriate syntax. (I should be doing something else, but instead I’m playing with ADRIFT because I’m loser.) So, I merely right-clicked on my Downloads folder and selected “Open folder as Root.” (Did I mention that Mint is awesome?) This gave me the permissions necessary to extract the files with the GUI.

There was still a problem. I thought it had something to do with packages. I had searched for “mono” in the Synaptic Package Manager before exracting, and I geussed that I needed to install libmono2.0-cil:

I installed the packages in the readme in the terminal with apt-get. I already had libmono-corlib2.0-cil.

Still, it didn’t work. The error message I was getting when trying to run the “adrift” script from the terminal in either directory (my home folder sub-directory or root) was this:

Installing Font mv: cannot stat ‘/usr/local/lib/adrift5/LYDIAN.TTF’: No such file or directory /home/paul/.fonts: caching, new cache contents: 0 fonts, 0 dirs /var/cache/fontconfig: not cleaning unwritable cache directory /home/paul/.cache/fontconfig: cleaning cache directory /home/paul/.fontconfig: not cleaning non-existent cache directory fc-cache: succeeded Cannot open assembly '/usr/local/lib/adrift5/MonoRunner.exe': No such file or directory.

I eventually figured out that extracting to root hadn’t worked out all that well:

Looking at the structure of the downloaded tar, I noticed that it mirrored the structure of my computer’s /usr/local/ directory. Again using the Thunar file manager as Root, I copied the script “adfit” into /usr/local/bin/ and the folder “adrift5” into /usr/local/lib/. Then I clicked on that version of the “adrift” script, and the Runner finally launched.

To run it, I have to either click on it in a Root terminal or enter the command sudo ./adrift from the terimal (entering my password, of course). Otherwise, an error message pops up repeatedly after just about every click. For a moment it seemed that the error would prevent the app from closing, but eventually the message stop coming if you close the error window enough.

I downloaded Jacaranda Jim as a test subject. I launched it successfully. (Unfortunately, it doesn’t look like a game I want to play.)

[size=150]Feedback on the “Open Adventure” dialog[/size]
The shortcuts on the left don’t make much sense for Linux. The “Desktop” shortcut does not display the shortcuts on my actual desktop. The “Personal” shortcut leads to the /usr/, which is not very useful. I put jim.blorb in my IF subdirectory in my home folder. It would be much more useful to have a shortcut to the home folder. In order to browse to where I put jim.blorb, I had to click on “My Computer” and then click on my hard drive, shown only by its hacky identification string.

I haven’t played much of Jacaranda Jim, but the Runner seems to work. I’m happy that it has been ported to Linux! However, it’s distribution model presents a serious obstacle to an average non-techincal Linux user like me. (The stereotype that all Linux users are programmers or expert terminal hackers has probably not been true at all for a long time now, and it’s becoming increasingly less and less true every year.)

Thanks for taking the time to give it a try, and I’m sorry it wasn’t a smooth process. Does anyone have any suggestions for creating a better install package? It’s basically a case of copying the binaries to a suitable location, installing a font, then copying a launch script to another suitable location.

Re the Open Adventure dialog, I don’t think I have any control over that. Isn’t that just part of your Mint file structure?

To me, it looks more like the common places in Windows. I’m not surprised to hear that you can’t easily change the shortcut options on the left side of the dialog, but it would be convenient if you could at least change the default locations that they open.

For instance, the bottom shortcut on the list says, “My Network” – which must refer to the network locations folder in Windows. If Linux has an equivalent directory, I don’t know about it. In all the Linux file browsers that I’ve used, the sidebar shortcuts lead to subdirectories of the home drive (/home/username). These are called “Documents,” “Download,” “Music,” “Pictures,” etc, much like the folders for the same purposes in Windows.

You’re obviously more familiar with the Linux file system than I am. It would be very helpful if there were a way to at least throw in a link to the user home directory, as opposed to /usr. My experience with using Ubuntu and Linux Mint derivatives is that the desktop is set up to run off of the default user’s home folder. I don’t think modifying files outside of the home folder with the root password is discouraged or intentionally designed to be difficult, but it seems like most things done in the GUI default to the home folder.

I understand that there may be no way to change the behavior of the Linux port from the way the Windows version works enough to tailor the default shortcuts. I can see that it’s obviously a very plain and direct port, and I can imagine that there may be no straightforward way to change something for just the Linux version.

An install script that would put the files in the right places and perhaps add a desktop and/or menu shortcut would be convenient, too. (I think a menu shortcut would be preferable, but I’m not sure if there’s a universal way to register a menu item across the different menu software used in the various desktop environments.) I don’t know how it works, but I’ve downloaded installers with a “.deb” extension. I’ve also downloaded shell scripts that automate the process of downloading and installing the actual software – that’s how the Linux version of TileMill is distributed.

Another observation.

Full Screen from the View menu doesn’t work on my system. It makes Xfce’s top menu bar disappear and expands the window, but it doesn’t clear the screen. It seems that the Xfce panel prevents its from expanding over the whole screen. I set up two panels on my desktop (actually four – two hidden until mouseover – these don’t seem to cause a problem but do pop up over the ADRIFT window):

When Full Screen is enabled, the text over the tab in the bottom panel says “Untitled window” rather than “ADRIFT runner.” This probably is part of the same bug, because if Full Screen really worked, the bottom panel wouldn’t be visible.

(This is probably something that can’t be changed without modifying the code for only the Linux version. I don’t really expect it to be fixed, but I might as well make note of it, if only for reference for other Linux users.)

There is. Desktop environments follow the “Freedesktop” specifications on this, which defines the format for *.desktop files (they create “start” menu entries for applications) as well as the locations those *.desktop files should be installed into:

standards.freedesktop.org/deskto … troduction
standards.freedesktop.org/menu-s … atest.html

Also see:


on how to do other things, such as registering file types (for example to launch a game automatically when double-clicking it, and to set the icon that should be used for Adrift files.)

Okay, I looked at the specs and opened some of the desktop files in my system’s applications folder, and I made a desktop file for the ADRIFT runner:

[code][Desktop Entry]
Name=ADRIFT Runner
GenericName=Interactive Fiction Interpreter
Comment=Play interactive fiction created for the ADRIFT platform
Exec=/usr/local/bin/adrift %F

[Desktop Action Open]
Name=Launch adventure[/code]

I named the file “co.adrift.desktop”. I don’t really think that that’s what the spec meant when it says that the files should be named in a “reverse DNS” style, but that’s the best that I can make sense of it. I also ripped the icon from my Windows installation of the Runner and put it in /usr/local/lib/adrift5/, which seemed like the right place for it.

This sort of works. When I first clicked on the co.adrift.desktop file I saved, the icon changed to the real ADRIFT icon, and the label changed to “ADRIFT Runner”. I can drag this spiffy new launcher to my desktop, but I don’t know how to manually add the shortcut to the Whisker Menu. (It didn’t automatically register in the menu, which was what I hoped for.) I can’t add a shortcut to one of my panels, either, because when I add a launcher the panel, it seems I can only search for the apps that are registered in the Whisker Menu.

Still, I’m pleased that I was able to make an aesthetic improvement with a mimimum amount of effort.

This is really only for installers. For personal use, you should just configure this in your desktop environment without copying files. Usually you can just add entries to your application menu by right-clicking on it, and you configure file types by right-clicking on a file. Or you might do this through some control panel your desktop offers.

I loaded Fortress of Fear in the Linux ADRIFT 5 runner, and I’m having a problem with word wrapping. At first glance, it looks like the interpreter window just needs to reset after being resized, but the problem persists even after entering a command. This problem occurs with the pane separating the main game text from the graphics and/or map, as well as with resizing the interpreter window.

When resizing the window or dragging the divider, it looks like it’s trying to wrap the text correctly. When the graphics pane is dragged over to the right, less text is truncated than when it is expanded larger, but there is still truncating. There is even some truncating if the graphics and map are both disabled.

Another note: “File>Open adventure” actually does open to my home folder, so that is a good thing. Actually, I think it’s opening the last opened location, which seems acceptable.

Just a thought, but if you go to View > Options and set Margin to 0, does this then prevent the truncation (albeit without a margin)?

Slightly off-topic, but since we’ve got Campbell around: since ADRIFT has three different versions and each has their own interpreter (I’m omitting 3.80, but I actually do have a separate 3.80 folder in my collection), wouldn’t it make sense to have the games list in the ADRIFT page also be able to filter by version?

No, but it did lessen the truncation.

Then I noticed the “Always use my font” checkbox. Clicking that to make the font default to 12-pt Liberation Sans fixed the problem. Here is the default Liberation Sans on top, and then below when I disabled “Always use my font” again:

So, it’s working, although the Runner is slow. It takes several minutes to load Fortress of Fear, and there is a noticeable lag after entering commands. My computer is relatively slow, so if someone else has a Linux installation on a better machine, it would be interesting to see how the Runner benchmarks.

Yes, I suppose so. If you’ve just uploaded a TAF file, the icon will have a small 3.8, 3.9, 4.0 or 5.0 against it, but that’s of no use if the game was uploaded as a ZIP.

Even taking the icons into consideration, I was browsing the other day looking specifically for v5 games for a recommendation. Browsing per version would be extremely helpful.

I know in the recent past this hasn’t been an issue because there haven’t been those many versions, and when a new version came out it virtually replaced the other completely. :slight_smile: So it’s a recent thing, which is probably why no one’s yet thought “Hang on, this might be a dashed good idea”.