Coder Social home page Coder Social logo

Comments (14)

andrewd18 avatar andrewd18 commented on September 18, 2024 1

Got it. The "ptrace attach: operation not permitted" is good news, actually, because that means we've found the source of the problem. :)

In recent versions of Ubuntu, the Ubuntu kernel team turned on a kernel feature called "ptrace protection". This prevents an application to connect to another one and read its memory. See https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace%20Protection

Unfortunately, attaching to the memory of another program is exactly what DwarfTherapist does.

You'll need to manually disable ptrace protection on your machine. The following command should do it:

sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

I think you're reporting two different issues here.

  1. The "Open Savegames Folder" button in the LNP launcher does not work. This is a known issue with the LNP launcher. See "WARNING" in the LNP launcher thread. http://www.bay12forums.com/smf/index.php?topic=124613
  2. Dwarf Therapist complains that it cannot connect to Dwarf Fortress. Dwarf Therapist requires that you have a region loaded and running. It will not be able to find DF from the main menu screen. Please try loading a game and clicking the connect button in Dwarf Therapist.

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

Do you get a message in the command line output from LNP saying "ptrace attach: operation not permitted"?

from df-lnp-installer.

Hmpfmg avatar Hmpfmg commented on September 18, 2024

df error

here's the error message.

from df-lnp-installer.

Hmpfmg avatar Hmpfmg commented on September 18, 2024

oh.. just seen the command line output "ptrace attach: operation not permitted"

from df-lnp-installer.

Hmpfmg avatar Hmpfmg commented on September 18, 2024

You got it! You'r the best! :)

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

work's fine for me!

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

Fantastic. I'm going to add a step in the installer to check for ptrace_scope and I'll reuse your command in the documentation. I'll close this once that check gets added.

Thanks for the report.

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

Resolved in 0.3.0 branch as of commit 9cf3a8c.

from df-lnp-installer.

aalbaugh avatar aalbaugh commented on September 18, 2024

Note for anyone running Ubuntu (not sure what versions, i am using 12.10 Quantal). The above solutions will not work, because the /proc/sys/kernel/yama/... folder seems to be protected. I was unable to use sudo to make any changes via a straight echo > 0 ... The second solution, piping output from echo to a sudo-privileged 'tee' did, in fact work. I'm not sure if the change will be permanent, however.

A previous attempt, made by first 'sudo su' -ing to root did not stay.

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

The second solution, piping output from echo to a sudo-privileged 'tee' did, in fact work. I'm not sure if the change will be permanent, however.

/proc is managed by the kernel and you'd be able to find out if the option stayed by rebooting.

from df-lnp-installer.

aalbaugh avatar aalbaugh commented on September 18, 2024

yeah, i'll check after class.

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

I'd bet it won't persist. On the other hand I bet this will work:

echo "kernel.yama.ptrace_scope = 0" | sudo tee /etc/sysctl.d/10-ptrace.conf

from df-lnp-installer.

aalbaugh avatar aalbaugh commented on September 18, 2024

you're correct, it did not persist.

The change you suggested should work, will get back to you once I know for sure.

from df-lnp-installer.

andrewd18 avatar andrewd18 commented on September 18, 2024

There is now a wiki page talking about this, and 0.3.0 will look for and inform the user if ptrace protection is turned on. Closing the ticket.

https://github.com/andrewd18/df-lnp-installer/wiki/Dwarf-Therapist-Cannot-Connect-to-Dwarf-Fortress

from df-lnp-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.