Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need help installing DF on linux mint 19.2 (Tina)  (Read 762 times)

ferociousmadman

  • Escaped Lunatic
    • View Profile
Need help installing DF on linux mint 19.2 (Tina)
« on: December 17, 2019, 06:39:25 pm »

What I need essentially are step by step instructions that work, end to end. Everything I've tried (and all the videos or websites or answers to similar questions I've looked at) has not worked. At one point I was able to get the lazy newb pack working, but the game itself won't work. I know it's possible for this game to work on a Linux box, and I'd prefer to install it with sound sense and stone sense, but so far no luck.

Once I get an answer that works (here or somewhere else) I plan on posting it in the forum here so future folks don't have to go through all the pain I have over the past few days. It's kind of unexpected, because I've gotten all my Windows based games which are not compatible with Linux by default to work on my Linux machine, but not DF (which makes no sense I know, but there it is).

My specs are as follows:

OS: Linux Mint 19.2 (Tina)
Machine: Acer Nitro 5 AN515-54 laptop (default hardware and build)
Logged

therahedwig

  • Bay Watcher
    • View Profile
    • wolthera.info
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #1 on: December 17, 2019, 08:07:54 pm »

Did you install the appropriate libraries as instructed by the README.linux? It might also help to run DF in a terminal emulator to see what kind of error messages you get.
Logged
Stonesense Grim Dark 0.2 Alternate detailed and darker tiles for stonesense. Now with all ores!

feelotraveller

  • Bay Watcher
  • whip cracking mad overseer
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #2 on: December 18, 2019, 12:29:46 am »

What I need essentially are step by step instructions that work, end to end. Everything I've tried (and all the videos or websites or answers to similar questions I've looked at) has not worked. At one point I was able to get the lazy newb pack working, but the game itself won't work. I know it's possible for this game to work on a Linux box, and I'd prefer to install it with sound sense and stone sense, but so far no luck.

Once I get an answer that works (here or somewhere else) I plan on posting it in the forum here so future folks don't have to go through all the pain I have over the past few days. It's kind of unexpected, because I've gotten all my Windows based games which are not compatible with Linux by default to work on my Linux machine, but not DF (which makes no sense I know, but there it is).

My specs are as follows:

OS: Linux Mint 19.2 (Tina)
Machine: Acer Nitro 5 AN515-54 laptop (default hardware and build)

Have a look at: http://dwarffortresswiki.org/index.php/DF2014:Installation.

After that if there are still problems detail them here.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #3 on: December 18, 2019, 03:50:42 am »

somebody should make a shell script that interrogates the installed linux version, then calls an appropriate apt-get (or similar package manager per distro type) to satisfy all the requirements.
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #4 on: December 18, 2019, 05:40:45 am »

You probably need the libSDL files mentioned in the README.linux. If you search the internet for "linux dwarf fortress libsdl" you will see others have run through this issue.

Open a terminal and change to the df_linux/libs/ folder, then run the command "ldd Dwarf_Fortress" and check each line of the output for a "not found" message, to find what is missing.
Logged

ferociousmadman

  • Escaped Lunatic
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #5 on: December 19, 2019, 05:33:32 pm »

What I need essentially are step by step instructions that work, end to end. Everything I've tried (and all the videos or websites or answers to similar questions I've looked at) has not worked. At one point I was able to get the lazy newb pack working, but the game itself won't work. I know it's possible for this game to work on a Linux box, and I'd prefer to install it with sound sense and stone sense, but so far no luck.

Once I get an answer that works (here or somewhere else) I plan on posting it in the forum here so future folks don't have to go through all the pain I have over the past few days. It's kind of unexpected, because I've gotten all my Windows based games which are not compatible with Linux by default to work on my Linux machine, but not DF (which makes no sense I know, but there it is).

My specs are as follows:

OS: Linux Mint 19.2 (Tina)
Machine: Acer Nitro 5 AN515-54 laptop (default hardware and build)

Have a look at: http://dwarffortresswiki.org/index.php/DF2014:Installation.

After that if there are still problems detail them here.

Thanks (and thanks to everyone who posted by the way. I'm going to give it the old college try today, and if I'm successful I'll try to detail what I did.
Logged

ferociousmadman

  • Escaped Lunatic
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #6 on: December 19, 2019, 07:35:18 pm »

I was able to finally (mostly anyways). Figure out how to get the game working on my machine. I did the following, and have broken everything down I did as best I could, down into instructions that anyone who uses Linux Mint 19.2 (Tina) Cinnamon can follow, along with various resources, which should hopefully make it easier. This is what I did. It is what I did on December 19th, 2019 on my particular machine. So I cannot promise anyone that this will work for them. I was overly detailed, so some users may find the instructions below tedious. But I wrote them so that it would be as easy to follow as possible. Hopefully folks find it helpful. I wish I had had instructions like this at the beginning:

Steps to install Dwarf Fortress on Linux Mint 19.2 (Tina) Cinnamon

1. Go to: https://www.bay12games.com/dwarves/

2. Click on Linux (for the Linux installation) and hit save

3. After the files have downloaded, go to downloads (or wherever the files have downloaded to. You can either extract the files there, or move them to a new folder you create, and then right click on the files (titled df_44_12_linux.tar.bz2 or something similar) and then select "Extract Here"

4. Go to the df_linux folder which will be created where you extracted the files. In this folder there is a file called README.linux file (read through this).

5. In the README.linux file it says in part:

"In addition to the hardware requirements (which will be the same as the other
platforms) your system will need these libraries installed:"

* GTK+ 2+
* SDL 1.2+
* SDL_image

6. ^ Check to ensure that these libraries are installed (or install them from the terminal).

If you are installing these libraries from the terminal see below (each line is a separate command, ignore what is in parenthesis, as it is my personal comment):

   sudo apt-get install all gtk2.0

   (I can't remember the next one but I believe I did:) sudo apt-get install SDL1.2

   apt-cache search libsdl2-image
   sudo apt-get install libsdl2-image-dev (if this is the current and latest version)

After doing these steps, the base game should work if you go to df_linux folder -> double click on the file titled df. This should pull up the actual game.

AFTER doing the above instructions, and, if you want to have a GUI installed, see below:

https://www.youtube.com/watch?v=1a4OEIQqxyo gives a great tutorial on getting the add-ons set up properly, starting from the 59 second mark.

However, I did the following (some of what I did deviates from the video):

In order to have a non-ASCI GUI (so I could better understand what was going on in the game), I went to: https://github.com/DFgraphics/Phoebus/releases/tag/44.11b and clicked on Source code (tar.gz) to start the download. Hit save when prompted.

Extract the files, a folder called Phoebus-44.11b (or something similarly named) should appear. Do the following (below): The files on the left should be in the Phoebus-44.11b folder. You will need to copy those contents and paste them into the relevant locations in the Dwarf Fortress' folder's files manually:

    Copy the contents of the /data/art/ folder into Dwarf Fortress' /data/art/ folder.
    Copy the contents of the /data/init/ folder into Dwarf Fortress' /data/init/ folder.
    Copy the contents of the /raw/objects/ folder into Dwarf Fortress' /raw/objects/ folder.
    Copy the contents of the /raw/graphics/ folder into Dwarf Fortress' /raw/graphics/ folder.

Further directions for the Phoebus graphics package can be found in the readme file which is also here: https://github.com/DFgraphics/Phoebus/blob/master/README.md

Now (still within the data folder): Go into the folder labeled init. Inside, should be a file called d_init.txt. Double click on this file to open it up. (The following is preference based but I did this as follows):

I changed AUTOSAVE:NONE to AUTOSAVE:YEARLY

Hit save, then close.

Then navigate to init.txt and open the file: Make [SOUND:NO] . (If you plan on using sound sense for sounds instead). Although this is a matter of taste.

NOTE: If you did the above directions regarding the Phoebus graphics package correctly, you should see [FULLFONT:Phoebus_16x16_text.png] or something similar. You should also see:

[GRAPHICS:YES]
[GRAPHICS_WINDOWEDX:0]
[GRAPHICS_WINDOWEDY:0]
[GRAPHICS_FONT:Phoebus_16x16.png]
[GRAPHICS_FULLSCREENX:0]
[GRAPHICS_FULLSCREENY:0]
[GRAPHICS_FULLFONT:Phoebus_16x16.png]
[GRAPHICS_BLACK_SPACE:YES]

As the video I linked to says, if you don't see this, you probably made a mistake. In my case, I had to manually paste each of the files in the correct locations (it was not as simple as it was in his video). I have already detailed the process I did above, so I will move on:

I made [MACRO_MS:0] then hit save and exited.

After this, I attempted to install dwarf therapist, and SoundSense. However, I was unsuccessful. I have in the past gotten Lazy Newb Pack installed and operational.

For Lazy Newb Pack you can go here: https://github.com/Lazy-Newb-Pack/Lazy-Newb-Pack-Linux
See Usage instructions for Linux.

Finally, if you are looking for a game play guide, and are totally new to Dwarf Fortress an old (but fairly good) playing series, which I relied on early on, is here: https://www.youtube.com/watch?v=TQv60baAy70




« Last Edit: December 19, 2019, 09:01:45 pm by ferociousmadman »
Logged

feelotraveller

  • Bay Watcher
  • whip cracking mad overseer
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #7 on: December 20, 2019, 02:00:55 am »

Glad it's working for you.

The Dwarf Therapist problem is most likely a ptrace permissions issue.  There is a longer detailed account here: https://github.com/Dwarf-Therapist/Dwarf-Therapist/blob/master/dist/ptrace_scope/README.md but my shorter recommendation (since details can confuse me) is to run
Code: [Select]
sudo setcap cap_sys_ptrace=ep /path/to/df_linux/dwarftherapist
(replace path/to/ with the actual path on your machine) which is one of the suggestions there.

I don't have experience with SoundSense but the Wiki is a good place to start and has links to the other relevant pages: http://dwarffortresswiki.org/index.php/Utility:SoundSense

Also the currently supported LinuxLNP can be found on this board at http://www.bay12forums.com/smf/index.php?topic=163211.0.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #8 on: December 20, 2019, 06:06:04 am »

setcap won't work with the appimage.

I recommend downloading this script, making it executable (chmod +x patch_df_ptracer) and run it with df path as parameter (./patch_df_ptracer /somewhere/df_44_12_linux).

The best solution would be to install Dwarf Therapist with a deb package, but I am not aware that anyone made them.
Logged

feelotraveller

  • Bay Watcher
  • whip cracking mad overseer
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #9 on: December 20, 2019, 08:24:26 am »

Oh, appimages, I like them even less  :(  Thanks for the correction.

The above link/readme probably should be updated to reflect that only some methods will work with appimages.

Logged

ferociousmadman

  • Escaped Lunatic
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #10 on: December 21, 2019, 09:08:59 pm »

One last point, (I may edit my original long post if folks think it's a good idea and delete this one, but. After installing the correct libraries, I ended up deleting dwarf fortress and other attempted installs of various packages, and installed lazy newb pack successfully by going here: https://github.com/Lazy-Newb-Pack/Lazy-Newb-Pack-Linux/blob/master/README.md I clicked on the Dwarf Fortress File Depot link, installed it from there, and followed the usage instructions in github and also executed the command shown there for Debian/Ubuntu.

Lazy Newb Pack booted right up, I went to soundsense and downloaded all the additional sounds and that started running successfully. I had a few issues with Phoebus graphics at first, but I was able to edit that by going to the graphics tab in lazy newb pack and manually editing Font and graphics front in there.

However, Dwarf Therapist still does not work. If I could wave a magic wand, I would fix this, but so far no luck at this time. If someday it does work, I'll edit this post to include that.

Logged

Clément

  • Bay Watcher
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #11 on: December 22, 2019, 06:38:26 am »

The magic wand is the script I linked. Ideally it should be pre-applied to the LNP but I don't think it is the case yet.

If you want dumb command lines to copy and paste try this:
Code: [Select]
sudo apt install gcc zenity
wget "https://raw.githubusercontent.com/Dwarf-Therapist/Dwarf-Therapist/master/dist/ptrace_scope/patch_df_ptracer" -O /tmp/patch_df_ptracer
chmod +x /tmp/patch_df_ptracer
/tmp/patch_df_ptracer
When you are asked to select the DF folder, you need to select the one containing the "df" and "dfhack" (if you use dfhack) scripts.

Another solution involves editing files in /etc/sysctl.d, but I don't remember which one exactly. What is the output of "grep -RF ptrace_scope /etc/sysctl* /usr/lib/sysctl.d/"?
Logged

ferociousmadman

  • Escaped Lunatic
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #12 on: December 25, 2019, 04:34:55 pm »

The magic wand is the script I linked. Ideally it should be pre-applied to the LNP but I don't think it is the case yet.

If you want dumb command lines to copy and paste try this:
Code: [Select]
sudo apt install gcc zenity
wget "https://raw.githubusercontent.com/Dwarf-Therapist/Dwarf-Therapist/master/dist/ptrace_scope/patch_df_ptracer" -O /tmp/patch_df_ptracer
chmod +x /tmp/patch_df_ptracer
/tmp/patch_df_ptracer
When you are asked to select the DF folder, you need to select the one containing the "df" and "dfhack" (if you use dfhack) scripts.

Another solution involves editing files in /etc/sysctl.d, but I don't remember which one exactly. What is the output of "grep -RF ptrace_scope /etc/sysctl* /usr/lib/sysctl.d/"?

I got caught up in the holiday season, so I wasn't able to look into this until today (Christmas! ^_^). The output of grep -RF ptrace_scope /etc/sysctl* /usr/lib/sysctl.d/ was:
/etc/sysctl.d/10-ptrace.conf:kernel.yama.ptrace_scope = 1
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #13 on: December 26, 2019, 06:25:54 pm »

If you want to allow all applications (like Dwarf Therapist) to debug others, you need to edit /etc/sysctl.d/10-ptrace.conf and change "kernel.yama.ptrace_scope = 1" to "kernel.yama.ptrace_scope = 0". The first method using the script only allows Dwarf Fortress to be debugged by anyone.
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Need help installing DF on linux mint 19.2 (Tina)
« Reply #14 on: December 30, 2019, 04:27:04 pm »

somebody should make a shell script that interrogates the installed linux version, then calls an appropriate apt-get (or similar package manager per distro type) to satisfy all the requirements.
what about a deb package for al lthe requirements?
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)