New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error dwarf therapist / savegamefolder with kubuntu #12
Comments
I think you're reporting two different issues here.
|
Do you get a message in the command line output from LNP saying "ptrace attach: operation not permitted"? |
oh.. just seen the command line output "ptrace attach: operation not permitted" |
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:
|
You got it! You'r the best! :) echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope work's fine for me! |
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. |
Resolved in 0.3.0 branch as of commit 9cf3a8c. |
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. |
/proc is managed by the kernel and you'd be able to find out if the option stayed by rebooting. |
yeah, i'll check after class. |
I'd bet it won't persist. On the other hand I bet this will work:
|
you're correct, it did not persist. The change you suggested should work, will get back to you once I know for sure. |
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 |
LNP generates an error when pressing the "open savegame folder" button under kubuntu 12.10 and dwarf therapist can't communicate with df
errormessage:
java.lang.IllegalStateException: Cannot open folder df_linux/data/save!
at nl.dricus.df.action.OpenFolderAction.actionPerformed(OpenFolderAction.java:67)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.io.IOException: Failed to show URI:file:/home/pet/DF/df_linux/data/save/
at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:114)
at sun.awt.X11.XDesktopPeer.open(XDesktopPeer.java:77)
at java.awt.Desktop.open(Desktop.java:272)
at nl.dricus.df.action.OpenFolderAction.actionPerformed(OpenFolderAction.java:65)
... 36 more
The text was updated successfully, but these errors were encountered: