Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Run DF in Ubuntu  (Read 1094 times)

coalboat

  • Bay Watcher
    • View Profile
Run DF in Ubuntu
« on: November 17, 2021, 12:12:27 am »

I have downloaded and extracted the df_47_05_linux.tar.bz2 and now I have the folder named df_47_05_linux. How do I start the program?
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #1 on: November 17, 2021, 12:26:55 am »

If the folder is really called df_47_05_linux, then inside that folder should be a folder called df_linux and inside that is a script called df which is what you should run. You can maybe do that from whatever file manager you are using, although in the zip I just extracted the execute flag is not set, so that might not work. You could also open a terminal emulator, cd to the folder with the df script, and run the script by typing ./df.

Or you could just install the Ubuntu DF package which will give you a "desktop" file which will add DF to what ever application launcher you are using, which is what is recommended, as that will also make sure all dependencies are also installed.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

coalboat

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #2 on: November 17, 2021, 12:38:45 am »

Thanks, it works. 8)

edit:
How do I set the options? Where do I find the init.txt?
« Last Edit: November 17, 2021, 12:44:40 am by coalboat »
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #3 on: November 17, 2021, 12:56:30 am »

If you're still using the folder you downloaded (as opposed to the Ubuntu package) then everything is in folders in the folder with the df script, that file is in data/init/ .
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

coalboat

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #4 on: November 17, 2021, 01:00:33 am »

I'm using the ubuntu package. The downloaded DF didn't start and gave some errors.
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #5 on: November 17, 2021, 01:05:25 am »

~/.local/share/dwarf-fortress/run/data/init according to this user

... maybe, the package does tricky things with file locations.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Run DF in Ubuntu
« Reply #6 on: November 17, 2021, 01:07:15 am »

Give the download a second try - it's much better than the Ubuntu package (which I think is still 47.04). You probably installed any dependencies when you installed the Ubuntu package, so the download version shouldn't throw any errors this time.

For anyone else - my Ubuntu package only has a save folder - inits are hidden somewhere different.
« Last Edit: November 17, 2021, 01:10:45 am by delphonso »
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #7 on: November 17, 2021, 01:24:49 am »

Another option is the LinuxDwarfPack which I would assume can change options in it's UI (and includes utilites and graphic tile packs).
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

coalboat

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #8 on: November 17, 2021, 01:50:18 am »

I did find the path. It's "/usr/share/games". I also noticed that it's still 0.44 which is from 2018, so I decided to try the LinuxDwarfPack.

The one downloaded from bay12games gives 2 lines of some dependency errors.
Logged

coalboat

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #9 on: November 17, 2021, 01:59:59 am »

Code: [Select]
./libs/Dwarf_Fortress: /home/####/Downloads/df_47_05_linux/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib/x86_64-linux-gnu/libGLU.so.1)
./libs/Dwarf_Fortress: /home/####/Downloads/df_47_05_linux/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/x86_64-linux-gnu/libGLU.so.1)

These are the errors of the direct download from bay12games. Perhaps I do have the required packages but I just have to put them in the right place.

edit:
I'm using the LinuxDwarfPack now. It's working very well!
« Last Edit: November 17, 2021, 02:55:30 am by coalboat »
Logged

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Run DF in Ubuntu
« Reply #10 on: November 17, 2021, 02:46:34 am »

Oh right - there's an issue with some of the libraries. Forgot about that. The wiki mentions it.

Quote
If you see any errors related to libstdc++ when starting DF (for example, "version `CXXABI_1.3.8' not found"), try removing libstdc++.so.6 and libgcc_s.so.1 from the "libs" folder. This will cause DF to use the system version of these libraries, which are more up-to-date on many modern systems than the libraries that DF includes.

This will certainly work. I did the same on my df_linux folder.

coalboat

  • Bay Watcher
    • View Profile
Re: Run DF in Ubuntu
« Reply #11 on: November 17, 2021, 02:56:29 am »

Interesting! Let me check it out.

edit:
I removed libstdc++.so.6 and libgcc_s.so.1 from the "libs" folder. Now it says "Not found: data/art/curses_640x300.png", even though there is a curses_640x300.png in data/art.

I've set printmode to TEXT in init.txt so it shouldn't be using any png.

edit:
It works after I did this:
Code: [Select]
$ sudo apt install libsdl1.2debian libsdl-image1.2 libsdl-ttf2.0-0 libgtk2.0-0 libopenal1 libsndfile1 libncursesw5
« Last Edit: November 17, 2021, 03:31:21 am by coalboat »
Logged

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Run DF in Ubuntu
« Reply #12 on: November 17, 2021, 03:51:29 am »

Interesting that it couldn't find the curses file, though it was there. Well, glad it works, libraries are a pain at times.

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Run DF in Ubuntu
« Reply #13 on: November 17, 2021, 04:33:33 am »

A bit late to the party but I just wanted to add that (for linux at least) the installation wikipage truly deserves its =exceptional= rating.  Generally it should be the first point of call when df installation issues arise with linux. 

On the last little bit, under debian based 64-bit installs
Quote
[...] install libncursesw5, which is needed if you want to run Dwarf Fortress in TEXT mode.

Glad that it all got sorted.  :)
Logged