If you run Ubuntu Linux and upgrade to the newest version (10.10, "Maverick Meerkat", due to be released in October 2010) you may notice that most of your favorite third-party utilities don't work right. That's because the Ubuntu folks decided that having programs access other programs' memory was a potential security hole (viruses could use this to search for passwords in your Firefox memory, for example), and turned this feature off by default. Just because there aren't many Linux viruses NOW, doesn't mean there won't be any in the future, so their decision makes sense for most people.
However, you aren't "most people" -- you play Dwarf Fortress. And you use utilities that poke around in DF's memory, which means you need to turn this feature back on. How do you do it?
To turn the "let programs poke around in other programs' memory" feature on for your current login session, run the following code snippet at a Linux command prompt:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
That will work until you reboot the computer, at which point the value will go back to its defaults. If you want to make the change PERMANENT, you'll also need to edit the default value, which is found in the /etc/sysctl.d/10-ptrace.conf file. Edit this file (in super-user mode) with your favorite editor:
sudo your-favorite-editor /etc/sysctl.d/10-ptrace.conf
then look for the line:
kernel.yama.ptrace_scope = 1
near the end of the file, and change it to:
kernel.yama.ptrace_scope = 0
Save, and you're done. Now Dwarf Therapist, dfhack, and your other memory-accessing utilites should be working again.NOTE:
Editing the /etc/sysctl.d/10-ptrace.conf file changes the default value, which is read at startup time. But those files aren't re-read again while Linux is running, so editing that file won't change the ptrace_scope value for your CURRENT login session. To change it for your CURRENT login session, you'll need to run the "echo 0" command above AS WELL. Hope that's clear.
Yes, I know Maverick Meerkat won't be officially released for another couple of months -- but when it does come out, people will be running into this problem. When that happens, point them to this post. (And bump it back up to the first page so people can see it