Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF linux  (Read 3372 times)

Elldor

  • Escaped Lunatic
    • View Profile
DF linux
« on: October 01, 2010, 04:38:34 am »

I downloaded DF for linux but I can not run it. Which file should I use to run the game and how?
Logged

varangian

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #1 on: October 01, 2010, 05:03:11 am »

Personally I'd try installing Wine (should be available in whatever repository your distro uses if not installed as standard) then run the Windows version under that. You can either install it on the Linux side (i.e. in Wine's simulated C drive) or install it under Windows directly then run that executable under both OS's, which is quite convenient if you dual boot as you can continue playing the same game whatever you boot up.

I did try the native Linux version a while back but kept on running into library conflicts - possibly it doesn't play so nice in the 64bit world - and decided not to waste further time when getting it working under Wine only takes a couple of minutes.
« Last Edit: October 01, 2010, 05:05:01 am by varangian »
Logged

Fellhuhn

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #2 on: October 01, 2010, 05:22:33 am »

simply download and unpack. you should have a df_linux folder then. there is an executable called "df" in it. run that one.
Logged

petersohn

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #3 on: October 01, 2010, 06:39:40 am »

First, try to run it from the terminal. It is possible that you have missing libraries. In this case, it will complain that it can't open "libsomething.so". You probably have to install the package "libsomething" in this case. It runs pretty fine on my Ubuntu 10.04, except for the sound.
Logged

greycat

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #4 on: October 01, 2010, 06:44:16 am »

Code: [Select]
bzip2 -dc df_31_14.linux.tar.bz2 | tar xvf -
cd df_linux
./df

(Or, possibly, you might want to play 0.31.12 instead of 0.31.14.  Or, you might want to generate your world in .12 and then play in .14.  These issues are a bit beyond the scope of this thread, though.)
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

Jake

  • Bay Watcher
  • Remember Boatmurdered!
    • View Profile
    • My Web Fiction
Re: DF linux
« Reply #5 on: October 30, 2010, 01:51:54 pm »

I'm having the same problem in Ubuntu 10.10. libsdl-image1.2 downloaded and installed just fine, but when I double click on 'df' and select 'Run' I get a very brief spike in CPU activity and then nothing. Running in Terminal initially produced a window that flickered in and out of existence in a fraction of a second, but copying and pasting the contents of 'df' into a Terminal window I already had open produced the following error message: bash: ./libs/Dwarf_Fortress: No such file or directory.
What am I doing wrong?
Logged
Never used Dwarf Therapist, mods or tilesets in all the years I've been playing.
I think Toady's confusing interface better simulates the experience of a bunch of disorganised drunken dwarves running a fort.

Black Powder Firearms - Superior firepower, realistic manufacturing and rocket launchers!

iwog

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #6 on: October 30, 2010, 02:29:56 pm »

I'm suffering the exact same problem, except when I run df in terminal mode I just get a screen the blips up for a second and then vanishes. I've tried all the things suggested on the wiki and they haven't worked.  I suppose I'll just have to be dirty and run it under wine for the time being.  If anyone comes up with a fix I'll be very grateful.

or I wont run it in wine as:
Quote
The file '/home/iwog/.wine/dosdevices/c:/DF_Phoebus_31_16v00/Dwarf Fortress.exe' is not marked as executable.  If this was downloaded or copied form an untrusted source, it may be dangerous to run.  For more details, read about the executable bit.

God dam linux, why is nothing ever simple for me.


EDIT: NVM I'm a moron, and simple tick box fixed it in wine.
« Last Edit: October 30, 2010, 02:53:06 pm by iwog »
Logged

BaronVonBullshit

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #7 on: October 30, 2010, 02:54:07 pm »

I have a Mac, and I run DF absolutely fine on the osx version.

Based on my experiences with running the windows version of DF via Crossover (A paid version of Wine for Mac, which I certainly do not advise purchasing) and it ran OK, with a few serious problems with window resizing and poor fps. So I wouldn't recommend playing it on Wine.

In my folder, I have dwarffort.exe and df. I open df in Terminal, the Mac command prompt equivalent, and then that causes dwarfort.exe to start and I play from that. I'm going to assume the Linux process is the same, just with the Linux command prompt equivalent.
Logged

greycat

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #8 on: October 30, 2010, 03:44:52 pm »

copying and pasting the contents of 'df' into a Terminal window I already had open produced the following error message: bash: ./libs/Dwarf_Fortress: No such file or directory.
What am I doing wrong?

You're sitting in the wrong directory.  You need to CHANGE DIRECTORY into the place where the "df" program is, and then run

Code: [Select]
./df

You know.  Change directory.  With the cd command.  At a shell prompt.  In a terminal emulator.  The primary, standard, normal interface that one uses on a Unix-like system.

If y'all are clicking on things in graphical file managers, then I can't help.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

forumist

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #9 on: October 31, 2010, 09:50:13 am »

You know.  Change directory.  With the cd command.  At a shell prompt.  In a terminal emulator.  The primary, standard, normal interface that one uses on a Unix-like system.

Nowadays, they seem to provide linux distributions where graphical interface is the default way to do things, and if you want a terminal emulator, it's hidden deep down some "administration" menu. It brings new users to Linux, but on the other hand this does not encourage said users to learn the way of the command line, so they miss an important part of linux.



@ Jake: I agree with greycat: it's a "wrong directory" issue (there may be other problems though).
Very often, messages about things not found are related to one not typing the commands from the right place. One thing that strongly suggests that this is the problem is the fact that the "missing" ./libs/Dwarf_Fortress is named through a relative path (note the dot at the begining).

If I look at the contents of the df file, I see this:
-----
#!/bin/sh
DF_DIR=$(dirname "$0")
cd "${DF_DIR}"
export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
#export SDL_VIDEO_CENTERED=1 # Centre the screen.  Messes up resizing.
./libs/Dwarf_Fortress $* # Go, go, go! :)
-----
The effect of the two first lines is to change to the directory where the df script is. But if you type this in a freshly opened terminal emulator, this will be your home directory instead. And there is usually no "libs/Dwarf_Fortress" in a typical user home directory.

I don't know what is supposed to happen if you double-click on the script file icon in a graphical user interface in Ubuntu.
Logged
Don't quote me on that.
Cacame channels aquifers into submission by staring at them. Cacame is so badass, kobolds give him their children to leave them alone. If Hidden Fun Stuff digs too far down, they hit Cacame. Cacame once took a Tantrum Spiral and impaled four enemies on it.

Jake

  • Bay Watcher
  • Remember Boatmurdered!
    • View Profile
    • My Web Fiction
Re: DF linux
« Reply #10 on: October 31, 2010, 12:26:11 pm »

Nowadays, they seem to provide linux distributions where graphical interface is the default way to do things, and if you want a terminal emulator, it's hidden deep down some "administration" menu. It brings new users to Linux, but on the other hand this does not encourage said users to learn the way of the command line, so they miss an important part of linux.
That's not strictly accurate; in Ubuntu, Terminal can be found in 'Accessories', presumably because it's the place recent converts from Windows will be used to looking for the command prompt.
And you have considered the possibility that most popular Linux distros are now GUI-orientated because it's actually a better way of doing a lot of things, right?

Quote
@ Jake: I agree with greycat: it's a "wrong directory" issue (there may be other problems though).
Very often, messages about things not found are related to one not typing the commands from the right place. One thing that strongly suggests that this is the problem is the fact that the "missing" ./libs/Dwarf_Fortress is named through a relative path (note the dot at the begining).
...
I don't know what is supposed to happen if you double-click on the script file icon in a graphical user interface in Ubuntu.
It brings up a dialogue box asking me if I want to display the script, run it, or run it in Terminal. I'm not sure what the difference is between these.

And the issue resolved itself after a reboot; I'd downloaded a load of updates but not restarted, so that might be related somehow, though I'm sure I don't know how that translates to a 'wrong directory' error.
Logged
Never used Dwarf Therapist, mods or tilesets in all the years I've been playing.
I think Toady's confusing interface better simulates the experience of a bunch of disorganised drunken dwarves running a fort.

Black Powder Firearms - Superior firepower, realistic manufacturing and rocket launchers!

greycat

  • Bay Watcher
    • View Profile
Re: DF linux
« Reply #11 on: October 31, 2010, 01:28:16 pm »

It's possible that one of your updates changed the functionality of your "run in Terminal" doodad so that it changes directory to wherever the file is before executing it.  And then, after you logged back in and ran the new GUI stuff, you actually got the effect of the update.

That's just a guess.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

Blind Tree Frog

  • Escaped Lunatic
    • View Profile
Re: DF linux
« Reply #12 on: August 17, 2013, 03:01:44 pm »

Reviving this thread because it seems the best place for this question...

Running Arch Linux, and I keep getting the "Dwarf_Fortress: No such file or directory" error.
Code: [Select]
[17550:17548 0:483] 03:45:17 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:483)$ pacman -Ss GTK+ | grep installed
core/glib2 2.36.3-3 [installed]
extra/at-spi2-atk 2.8.1-1 [installed]
extra/glib 1.2.10-10 [installed]
extra/gtk 1.2.10-12 [installed]
extra/gtk-update-icon-cache 2.24.20-1 [installed]
extra/gtk-vnc 0.5.2-2 [installed]
extra/gtk2 2.24.20-1 [installed]
extra/gtk3 3.8.2-1 [installed]
extra/gtkmm 2.24.4-1 [installed]
extra/libreoffice-gnome 4.0.4-2 (libreoffice) [installed]
extra/pygtk 2.24.0-3 [installed]
extra/vte 0.28.2-3 [installed]
extra/vte3 0.34.7-1 [installed]
community/lxappearance 0.5.2-1 (lxde) [installed]
community/obconf 2.0.4-1 [installed]
community/sakura 3.1.0-1 [installed]
community/spice-gtk3 0.20-2 [installed]

[17550:17548 0:484] 03:45:21 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:484)$ pacman -Ss SDL | grep installed
extra/sdl 1.2.15-3 [installed]
extra/sdl_image 1.2.12-3 [installed]

[17550:17548 0:485] 03:45:49 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:485)$ pacman -Ss libgl | grep installed
extra/libglade 2.6.4-3 [installed]
extra/mesa 9.1.6-1 [installed]
extra/mesa-libgl 9.1.6-1 [installed]

[17550:17548 0:486] 03:46:07 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:486)$ ls
command line.txt  df                g_src/  raw/          readme.txt         sdl/
data/             file changes.txt  libs/   README.linux  release notes.txt

[17550:17548 0:487] 03:47:21 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:487)$ ./df
./df: line 6: ./libs/Dwarf_Fortress: No such file or directory

[17550:17548 0:488] 03:47:22 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort
(5:488)$ cd libs
[17550:17548 0:489] 03:47:27 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort/libs
(5:489)$ SDL_DISABLE_LOCK_KEYS=1 ./Dwarf_Fortress
bash: ./Dwarf_Fortress: No such file or directory

[17550:17548 0:490] 03:47:35 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort/libs
(5:490)$ ls
Dwarf_Fortress  libgcc_s.so.1  libgraphics.so  libstdc++.so.6

[17550:17548 0:493] 04:05:15 Sat Aug 17 [vault@Pandora: +5] ~/Downloads/dwarfFort/libs
(5:493)$ strace ./Dwarf_Fortress
execve("./Dwarf_Fortress", ["./Dwarf_Fortress"], [/* 29 vars */]) = -1 ENOENT (No such file or directory)
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
exit_group(1)                           = ?
+++ exited with 1 +++

Any thoughts on what detail I am missing?
« Last Edit: August 17, 2013, 03:06:07 pm by Blind Tree Frog »
Logged

Blind Tree Frog

  • Escaped Lunatic
    • View Profile
Re: DF linux
« Reply #13 on: August 17, 2013, 04:23:41 pm »

I cross posted this to Reddit as well.  An answer was presented there:

http://www.reddit.com/r/dwarffortress/comments/1kkdds/troubleshooting_cant_run_the_linux_executable/

by Lunaritian
Quote
The download from bay12games doesn't seem to work for some weird reason :/ It worked before but now I just get the same error that you do.

However, here's a solution:
pacman -S dwarffortress

It's installed in /opt/df_linux/ if you want to change the settings or something.

Please note that it appears to be in the AUR, not in the regular repo, so pacman won't work directly (unless you've aliased 'packer' or similar)

edit:
I am wrong
https://www.archlinux.org/packages/multilib/x86_64/dwarffortress/

There are related packages in AUR though.
« Last Edit: August 17, 2013, 04:33:47 pm by Blind Tree Frog »
Logged